getQueryText() public method

Spellcheck fulltext query.
public getQueryText ( ) : string
return string
Example #1
0
 /**
  * Run a term vectors query against the index and return the result.
  *
  * @param RequestInterface $request The spellcheck request.
  *
  * @return array
  */
 private function getTermVectors(RequestInterface $request)
 {
     $termVectorsQuery = ['index' => $request->getIndex(), 'type' => $request->getType(), 'id' => '', 'term_statistics' => true];
     $termVectorsQuery['body']['doc'] = [MappingInterface::DEFAULT_SPELLING_FIELD => $request->getQueryText()];
     return $this->client->termvectors($termVectorsQuery);
 }