I'm trying to work with Riak on PHP. I read the documentation but no luck.

So I've already configured the "search" option in /etc/init.d/app.conf as true.

So, print_r($results) returns as null array.

<?php
require_once('riakclient.php');
$client = new RiakClient('127.0.0.1', 8098);

$bucket = $client->bucket("searchbucket");
$bucket->newObject("one", array("foo"=>"one", "bar"=>"red"))->store();
$bucket->newObject("two", array("foo"=>"two", "bar"=>"green"))->store();

$results = $client->search("searchbucket", "foo:one")->run();

print_r($results);

?>

Note: When I use http call like:

http://localhost:8098/solr/searchbucket/select?q=foo:one&wt=json

I get the results successfully.

What is wrong with my code? What I misunderstood?

Any help would be great.

Ibrahim YILMAZ
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to