/**
  * @return \Riak\Client\Core\Message\Index\IndexQueryRequest
  */
 private function createIndexQueryRequest()
 {
     $request = new IndexQueryRequest();
     $request->bucket = $this->query->getNamespace()->getBucketName();
     $request->type = $this->query->getNamespace()->getBucketType();
     $request->paginationSort = $this->query->getPaginationSort();
     $request->continuation = $this->query->getContinuation();
     $request->returnTerms = $this->query->getReturnTerms();
     $request->maxResults = $this->query->getMaxResults();
     $request->termRegex = $this->query->getTermFilter();
     $request->index = $this->query->getIndexName();
     $request->timeout = $this->query->getTimeout();
     if ($this->query->getMatch() !== null) {
         $request->key = $this->query->getMatch();
         $request->qtype = 'eq';
     }
     if ($this->query->getMatch() === null) {
         $request->rangeMin = $this->query->getStart();
         $request->rangeMax = $this->query->getEnd();
         $request->qtype = 'range';
     }
     return $request;
 }
Example #2
0
 /**
  * @param string $end
  *
  * @return \Riak\Client\Command\Index\Builder\Builder
  */
 public function withEnd($end)
 {
     $this->query->setEnd($end);
     return $this;
 }