|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-03-25 09:25 UTC] tony2001@php.net
-Status: Open
+Status: Feedback
[2014-03-25 09:25 UTC] tony2001@php.net
[2014-12-30 10:42 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 17:00:01 2025 UTC |
Description: ------------ Usually, when I set the GeoAnchor I would usually also expect a attrs->@geodist value in the result->matches array. Since Sphinx 2.1.6 (most probably also earlier versions) - the geo search still works fine, but the result array does not contain any "geodist" information anymore. I switched to SphinxQL and it works fine, so it seems not to be a problem with my config, but maybe this package lacking support for newer sphinx versions. No stress though, seeing that nobody has filed this as a bug yet means I might be the only one using this (until now) useful php-extension. Test script: --------------- $sphinx = new SphinxClient; $sphinx->setServer("127.0.0.1", 9312); $sphinx->setMatchMode(SPH_MATCH_ALL); $sphinx->setArrayResult(true); $sphinx->setLimits(0, $num, $num); $sphinx->setGeoAnchor("latitude", "longitude", deg2rad($lat), deg2rad($lng)); $sphinx->setFilterFloatRange("@geodist", (float) 0, (float) 2 * 1000); $sphinx->setSortMode(SPH_SORT_EXTENDED, "@geodist ASC"); $result = $sphinx->query("", "poi"); var_dump($result); unset($sphinx);