diff options
Diffstat (limited to 'lib/Net/Riak/Search.pm')
-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> |