本文整理汇总了PHP中SphinxClient::SetGeoAnchor方法的典型用法代码示例。如果您正苦于以下问题:PHP SphinxClient::SetGeoAnchor方法的具体用法?PHP SphinxClient::SetGeoAnchor怎么用?PHP SphinxClient::SetGeoAnchor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SphinxClient
的用法示例。
在下文中一共展示了SphinxClient::SetGeoAnchor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fopen
fclose($file);
$client->ResetGroupBy();
// distinct
$client->SetGroupDistinct("id");
$file = fopen("spec/fixtures/data/distinct.bin", "w");
fwrite($file, $client->_reqs[$client->AddQuery("test ")]);
fclose($file);
$client->ResetGroupBy();
// weights
$client->SetWeights(array(100, 1));
$file = fopen("spec/fixtures/data/weights.bin", "w");
fwrite($file, $client->_reqs[$client->AddQuery("test ")]);
fclose($file);
$client->SetWeights(array());
// anchor
$client->SetGeoAnchor("latitude", "longitude", 10.0, 95.0);
$file = fopen("spec/fixtures/data/anchor.bin", "w");
fwrite($file, $client->_reqs[$client->AddQuery("test ")]);
fclose($file);
$client->ResetFilters();
// rank_mode
$client->SetRankingMode(SPH_RANK_WORDCOUNT);
$file = fopen("spec/fixtures/data/rank_mode.bin", "w");
fwrite($file, $client->_reqs[$client->AddQuery("test ")]);
fclose($file);
$client->SetRankingMode(SPH_RANK_PROXIMITY_BM25);
// index_weights
$client->SetIndexWeights(array("people" => 101));
$file = fopen("spec/fixtures/data/index_weights.bin", "w");
fwrite($file, $client->_reqs[$client->AddQuery("test ")]);
fclose($file);
示例2: setGeoAnchor
public function setGeoAnchor($attrlat, $attrlong, $lat, $long)
{
$this->sphinx->SetGeoAnchor($attrlat, $attrlong, $lat, $long);
}
示例3: setGeoAnchor
function setGeoAnchor($attrlat, $attrlong, $lat = null, $long = null)
{
$this->sphinx->SetGeoAnchor($attrlat, $attrlong, $lat, $long);
return $this;
}
示例4: SphinxClient
<?php
require "spec/fixtures/sphinxapi.php";
$cl = new SphinxClient();
$cl->SetGeoAnchor('attrlat', 'attrlong', 20.3, 40.7);
$cl->Query('query');