buildKeywords() public method

Extracts keywords from query using tokenizer settings for a given index
public buildKeywords ( string $query, string $index, boolean $hits ) : array | false
$query string query to extract keywords from
$index string name of the index to get tokenizing settings and keyword occurrence statistics from
$hits boolean whether keyword occurrence statistics are required
return array | false Array of hashes with per-keyword information, or false on failure.
示例#1
0
 public function testBuildKeywordsWithUnicode()
 {
     $sphinx = new SphinxClient();
     $keyword = $this->utf16to8('65e5672c8a9e');
     $results = $sphinx->buildKeywords($keyword, 'sphinxtest', 1);
     $this->assertEquals($results, array(array('tokenized' => $keyword, 'normalized' => $keyword, 'docs' => 1, 'hits' => 1)));
 }
 /**
  * {@inheritdoc}
  */
 public function buildKeywords($query, $index, $hits)
 {
     return $this->proxy->buildKeywords($query, $index, $hits);
 }