php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66953 results missing geodist
Submitted: 2014-03-25 09:14 UTC Modified: 2014-12-30 10:42 UTC
From: guenter at weheartwebsites dot de Assigned:
Status: No Feedback Package: sphinx (PECL)
PHP Version: 5.4.26 OS: Debian Wheezy
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: guenter at weheartwebsites dot de
New email:
PHP Version: OS:

 

 [2014-03-25 09:14 UTC] guenter at weheartwebsites dot de
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);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-03-25 09:25 UTC] tony2001@php.net
-Status: Open +Status: Feedback
 [2014-03-25 09:25 UTC] tony2001@php.net
I don't see any mention of geodist in libsphinxclient sources that come with 2.1.6-release, so I suppose libsphinxclient doesn't support it (yet?).
Since this library is the one used in the extension, there's not much we can do about it.
This issue probably has to be reported to the upstream first.
 [2014-12-30 10:42 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed May 27 16:01:25 2020 UTC