Im currently using sphinx, which has a nice geo searching interface: If given a query and an origin (latitude, longitude, both in radians), and told which fields correspond to latitude/longitude in the index, I can get back results ordered by distance from that point (and get the actual distance as well). I would be interested in exploring xapian further, but I'm not sure if I can get this functionality or not. Ive been told it may be possible with a a value range processor? Is this something anyone else has already explored? Or know if it would even be possible? Thanks, Joe
On Mon, Aug 04, 2008 at 01:16:04AM -0700, Joe Noon wrote:> I would be interested in exploring xapian further, but I'm not sure if > I can get this functionality or not. Ive been told it may be possible > with a a value range processor? Is this something anyone else has > already explored? Or know if it would even be possible?You could filter with two value ranges to get results restricted to a rectangle in the coordinate system (which is in general not quite a rectangle on the ground). To actually get a circle, you'd want to use a MatchDecider subclass to select points based on coordinates stored in one or two document values. It would probably be useful to ship a standard solution, so if you implement something please consider sending a patch, even if it needs a bit of work for general use. There's also some code Richard has been working on in the geospatial branch in SVN, but he's better placed to talk about that: http://trac.xapian.org/browser/branches/geospatial Cheers, Olly
Charlie Hull
2008-Aug-04 14:27 UTC
[Xapian-discuss] Can xapian do geo search/calculations?
Joe Noon wrote:> Im currently using sphinx, which has a nice geo searching interface: > > If given a query and an origin (latitude, longitude, both in radians), > and told which fields correspond to latitude/longitude in the index, I > can get back results ordered by distance from that point (and get the > actual distance as well). > > I would be interested in exploring xapian further, but I'm not sure if > I can get this functionality or not. Ive been told it may be possible > with a a value range processor? Is this something anyone else has > already explored? Or know if it would even be possible? > > Thanks, > > Joe >I believe there is some work in progress on this, but it it not yet complete, and is waiting on those who are paying for it to give us the go-ahead. It's certainly possible! Cheers Charlie