diff options
author | franck cuny <franck@lumberjaph.net> | 2011-07-07 13:24:37 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2011-07-07 13:24:37 +0200 |
commit | 99ea7825711a11b7fe7978838bca5880ba2e6231 (patch) | |
tree | 119cc0b0d866f29857a7e04bd06ac29b607cb7c4 /lib/Net/Riak.pm | |
parent | Merge pull request #13 from gmaurice/master (diff) | |
parent | removed more white spaces (diff) | |
download | net-riak-99ea7825711a11b7fe7978838bca5880ba2e6231.tar.gz |
Merge branch 'review/gmaurice'
* review/gmaurice: removed more white spaces perltidy + whitespaces removed remove white spaces documentation added for search
Diffstat (limited to 'lib/Net/Riak.pm')
-rw-r--r-- | lib/Net/Riak.pm | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/lib/Net/Riak.pm b/lib/Net/Riak.pm index dbfc6a5..45d445a 100644 --- a/lib/Net/Riak.pm +++ b/lib/Net/Riak.pm @@ -37,7 +37,7 @@ sub bucket { 1; =head1 SYNOPSIS - + # REST interface my $client = Net::Riak->new( host => 'http://10.0.0.40:8098', @@ -59,6 +59,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 =head2 ATTRIBUTES @@ -117,7 +125,7 @@ Disable returning of object content in response in a store operation. If set to true and the object has siblings these will not be available without an additional fetch. -This will become the default behaviour in 0.17 +This will become the default behaviour in 0.17 =back @@ -166,13 +174,25 @@ Start assembling a Map/Reduce operation Start assembling a Map/Reduce operation =head2 server_info (PBC only) - + $client->server_info->{server_version}; =head2 stats (REST only) 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> |