diff options
| author | gmaurice <germain.maurice@linkfluence.net> | 2011-07-07 13:19:06 +0200 |
|---|---|---|
| committer | gmaurice <germain.maurice@linkfluence.net> | 2011-07-07 13:19:06 +0200 |
| commit | 08cf0c72671e94086352b03683e1ad57348bee1f (patch) | |
| tree | 621a78228ff694e030ca72a4b30ab8b30e992a63 /lib/Net/Riak.pm | |
| parent | fix conflict (diff) | |
| download | net-riak-08cf0c72671e94086352b03683e1ad57348bee1f.tar.gz | |
documentation added for search
Diffstat (limited to 'lib/Net/Riak.pm')
| -rw-r--r-- | lib/Net/Riak.pm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Net/Riak.pm b/lib/Net/Riak.pm index dbfc6a5..49a4d0f 100644 --- a/lib/Net/Riak.pm +++ b/lib/Net/Riak.pm @@ -58,6 +58,14 @@ sub bucket { $obj = $bucket->get('new_post'); say "title for ".$obj->key." is ".$obj->data->{title}; + + # Indexing and searching (REST interface) + $client->setup_indexing("bucket_name"); + ...adding documents to riak... + my $response = $client->search( + index => 'bucket_name', + q => 'field:value' + ); =head1 DESCRIPTION @@ -173,6 +181,18 @@ Start assembling a Map/Reduce operation say Dumper $client->stats; +=head2 search (REST only) + + $client->search( index => 'bucket_name', q => 'field:value' ); + +Makes a query to the index (see L<Net::Riak::Search> for more details on parameters) + +=head2 setup_indexing (REST only) + + $client->setup_indexing('bucket_name'); + +Define precommit hook in order to enable indexing documents written into the given bucket + =head1 SEE ALSO L<Net::Riak::MapReduce> |
