本文整理汇总了PHP中SphinxClient::BuildKeywords方法的典型用法代码示例。如果您正苦于以下问题:PHP SphinxClient::BuildKeywords方法的具体用法?PHP SphinxClient::BuildKeywords怎么用?PHP SphinxClient::BuildKeywords使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SphinxClient
的用法示例。
在下文中一共展示了SphinxClient::BuildKeywords方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createKeywords
public function createKeywords($query, $index, $hits = false)
{
return $this->sphinxClient->BuildKeywords($query, $index, $hits);
}
示例2: SphinxClient
<?php
require "spec/fixtures/sphinxapi.php";
$cl = new SphinxClient();
$cl->BuildKeywords('test', 'index', true);
示例3: fopen
$client->SetFieldWeights(array("city" => 101));
$file = fopen("spec/fixtures/data/field_weights.bin", "w");
fwrite($file, $client->_reqs[$client->AddQuery("test ")]);
fclose($file);
$client->SetFieldWeights(array());
// comment
$file = fopen("spec/fixtures/data/comment.bin", "w");
fwrite($file, $client->_reqs[$client->AddQuery("test ", "*", "commenting")]);
fclose($file);
// update_simple
$file = fopen("spec/fixtures/data/update_simple.bin", "w");
fwrite($file, $client->UpdateAttributes("people", array("birthday"), array(1 => array(191163600))));
fclose($file);
// keywords_without_hits
$file = fopen("spec/fixtures/data/keywords_without_hits.bin", "w");
fwrite($file, $client->BuildKeywords("pat", "people", false));
fclose($file);
// keywords_with_hits
$file = fopen("spec/fixtures/data/keywords_with_hits.bin", "w");
fwrite($file, $client->BuildKeywords("pat", "people", true));
fclose($file);
// filter_array
$client->SetFilter("field", array(1, 2, 3));
$file = fopen("spec/fixtures/data/filter_array.bin", "w");
fwrite($file, $client->FilterOutput());
fclose($file);
$client->ResetFilters();
// filter_array_exclude
$client->SetFilter("field", array(1, 2, 3), true);
$file = fopen("spec/fixtures/data/filter_array_exclude.bin", "w");
fwrite($file, $client->FilterOutput());