$command = (new Command\Builder\QueryIndex($riak)) ->buildBucket('users') ->withIndex('users_name', 'Knuth') ->build(); $response = $command->execute(); $index_results = $response->getIndexResults();
Inheritance: extends Basho\Riak\Command\Builder, implements Basho\Riak\Command\BuilderInterface, use trait Basho\Riak\Command\Builder\BucketTrait, use trait Basho\Riak\Command\Builder\IndexTrait
 /**
  * Test command builder settings for options
  *
  * @dataProvider getLocalNodeConnection
  *
  * @param $riak \Basho\Riak
  */
 public function testOptionSettings($riak)
 {
     // build an object
     $builder = new Command\Builder\QueryIndex($riak);
     $builder->buildBucket('some_bucket', 'some_bucket_type')->withIndexName('foo_int')->withScalarValue(42)->withContinuation('12345')->withReturnTerms(true)->withPaginationSort(true)->withTermFilter('foobar')->withTimeout(43);
     $command = $builder->build();
     $this->assertEquals('12345', $command->getParameter('continuation'));
     $this->assertEquals('true', $command->getParameter('return_terms'));
     $this->assertEquals('true', $command->getParameter('pagination_sort'));
     $this->assertEquals('foobar', $command->getParameter('term_regex'));
     $this->assertEquals(43, $command->getParameter('timeout'));
 }