basho/riak-php-client — Issue #23: [X] TEST FAILED: testSearchIntegration 
Author: ButuzGOL
Created: 2012-03-05 14:50:13+00:00
State: open

[X] TEST FAILED: testSearchIntegration

function testSearchIntegration() {
# Create some objects to search across...
$client = new RiakClient(HOST, PORT);
$bucket = $client->bucket("searchbucket");
$bucket->newObject("one", array("foo"=>"one", "bar"=>"red"))->store();
$bucket->newObject("two", array("foo"=>"two", "bar"=>"green"))->store();
$bucket->newObject("three", array("foo"=>"three", "bar"=>"blue"))->store();
$bucket->newObject("four", array("foo"=>"four", "bar"=>"orange"))->store();
$bucket->newObject("five", array("foo"=>"five", "bar"=>"yellow"))->store();

# Run some operations...
$results = $client->search("searchbucket", "foo:one OR foo:two")->run();
if (count($results) == 0) {
print "\n\nNot running test \"testSearchIntegration()\".\n";
print "Please ensure that you have installed the Riak Search hook on bucket \"searchbucket\" by running \"bin/search-cmd install searchbucket\".\n\n";
return;
}
test_assert(count($results) == 2);

$results = $client->search("searchbucket", "(foo:one OR foo:two OR foo:three OR foo:four) AND (NOT bar:green)")->run();
test_assert(count($results) == 3);
}

**count($results) => always gives me 1**