diff options
| author | Mainframe2008 <thg.bot@gmail.com> | 2013-02-26 08:44:28 +0100 |
|---|---|---|
| committer | Mainframe2008 <thg.bot@gmail.com> | 2013-02-26 08:44:28 +0100 |
| commit | 1b442767f0bc92b98c3a398dde02dae6212ecd1c (patch) | |
| tree | 103131ad787226886342fa39d44317ce9438c5e1 /lib/Net/Riak/Search.pm | |
| parent | Add documentation for secondary indexes (diff) | |
| download | net-riak-1b442767f0bc92b98c3a398dde02dae6212ecd1c.tar.gz | |
*Added secondary index support using method names from the riak python
client.
* Added tests for secondary indexes
* Added documentation
Diffstat (limited to 'lib/Net/Riak/Search.pm')
| -rw-r--r-- | lib/Net/Riak/Search.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Net/Riak/Search.pm b/lib/Net/Riak/Search.pm index 646d4d3..368b7e7 100644 --- a/lib/Net/Riak/Search.pm +++ b/lib/Net/Riak/Search.pm @@ -35,10 +35,10 @@ sub setup_indexing { # Secondary index setup my $obj3 = $bucket->new_object('foo3', {...}); - $obj3->i2index({ myindex_bin => 'myvalue' }); + $obj3->add_index('index', 'first'); $obj3->store; - my @keys = $client->i2search(bucket => 'foo', index => 'myindex_bin', key => 'myvalue' ); + my @keys = $client->index('bucket', 'myindex_bin', 'first_value' [, 'last_value'] ); =head1 DESCRIPTION @@ -87,11 +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 +=item add_index add secondary index to object -=item i2search += item remove_index + +remove secondary index from object + +=item index Find keys via secondary index. |
