SetGeoAnchor() public method

latitude and longitude must be in radians
public SetGeoAnchor ( $attrlat, $attrlong, $lat, $long )
コード例 #1
0
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
0
 public function setGeoAnchor($attrlat, $attrlong, $lat, $long)
 {
     $this->sphinx->SetGeoAnchor($attrlat, $attrlong, $lat, $long);
 }
コード例 #3
0
ファイル: sphinxsearch.php プロジェクト: 290329416/guahao
 function setGeoAnchor($attrlat, $attrlong, $lat = null, $long = null)
 {
     $this->sphinx->SetGeoAnchor($attrlat, $attrlong, $lat, $long);
     return $this;
 }
コード例 #4
0
ファイル: geo_anchor.php プロジェクト: alpbs/sphinx
<?php

require "spec/fixtures/sphinxapi.php";
$cl = new SphinxClient();
$cl->SetGeoAnchor('attrlat', 'attrlong', 20.3, 40.7);
$cl->Query('query');