Esempio n. 1
0
 /**
  * Set the default operation.
  * Allowed settings are either “and” or “or”.
  * Overrides the “default_op” setting in the schema file.
  *
  * @param string $op
  *
  * @return \Riak\Client\Core\Query\RiakSearchQuery
  */
 public function withDefaultOperation($op)
 {
     $this->query->setDefaultOperation($op);
     return $this;
 }
Esempio n. 2
0
 /**
  * @return \Riak\Client\Core\Message\Search\SearchRequest
  */
 private function createGetSearchRequest()
 {
     $request = new SearchRequest();
     $request->q = $this->query->getQuery();
     $request->index = $this->query->getIndex();
     $request->start = $this->query->getStart();
     $request->presort = $this->query->getPresort();
     $request->rows = $this->query->getNumRows();
     $request->sort = $this->query->getSortField();
     $request->filter = $this->query->getFilterQuery();
     $request->fl = $this->query->getReturnFields();
     $request->df = $this->query->getDefaultField();
     $request->op = $this->query->getDefaultOperation();
     return $request;
 }