diff options
| author | Robin Edwards <robin.ge@gmail.com> | 2013-03-01 02:04:58 -0800 |
|---|---|---|
| committer | Robin Edwards <robin.ge@gmail.com> | 2013-03-01 02:04:58 -0800 |
| commit | 5f99cd866eb23113ea46ac78720f5608c54982ce (patch) | |
| tree | 3c35ac04f3d748942c2e973e6f42164ff02e4316 /lib/Net/Riak/Search.pm | |
| parent | Update changelog (diff) | |
| parent | *Added secondary index support using method names from the riak python (diff) | |
| download | net-riak-5f99cd866eb23113ea46ac78720f5608c54982ce.tar.gz | |
Merge pull request #22 from Mainframe2008/master
Secondary index support
Diffstat (limited to '')
| -rw-r--r-- | lib/Net/Riak/Search.pm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Net/Riak/Search.pm b/lib/Net/Riak/Search.pm index ee2ed57..368b7e7 100644 --- a/lib/Net/Riak/Search.pm +++ b/lib/Net/Riak/Search.pm @@ -33,6 +33,13 @@ sub setup_indexing { $bucket->delete_object($key, 3); # optional w val + # Secondary index setup + my $obj3 = $bucket->new_object('foo3', {...}); + $obj3->add_index('index', 'first'); + $obj3->store; + + my @keys = $client->index('bucket', 'myindex_bin', 'first_value' [, 'last_value'] ); + =head1 DESCRIPTION L<Net::Riak::Search> allows you to enable indexing documents for a given bucket and querying/searching the index. @@ -80,6 +87,19 @@ is the default index you want to query, if no index is provided you have to add is the number of documents you want to be returned in the response +=item add_index + +add secondary index to object + += item remove_index + +remove secondary index from object + +=item index + +Find keys via secondary index. + + =back More parameters are available, just check at L<http://wiki.basho.com/Riak-Search---Querying.html#Querying-via-the-Solr-Interface> |
