summaryrefslogtreecommitdiff
path: root/lib/Net/Riak/Search.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Net/Riak/Search.pm')
-rw-r--r--lib/Net/Riak/Search.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Net/Riak/Search.pm b/lib/Net/Riak/Search.pm
index ee2ed57..646d4d3 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->i2index({ myindex_bin => 'myvalue' });
+ $obj3->store;
+
+ my @keys = $client->i2search(bucket => 'foo', index => 'myindex_bin', key => 'myvalue' );
+
=head1 DESCRIPTION
L<Net::Riak::Search> allows you to enable indexing documents for a given bucket and querying/searching the index.
@@ -80,6 +87,15 @@ 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 i2index
+
+add secondary index to object
+
+=item i2search
+
+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>