AW: Can't get distance sorting to work in Lucene Spatial 4.10.3

2015-02-26 Thread Simon Rainer
f: AW: Can't get distance sorting to work in Lucene Spatial 4.10.3 Hi David, thanks for these hints! Unfortunately that didn't change anything yet. I made the fixes that you suggested: val queryPoint = spatialCtx.makePoint(lon, lat) val args = new SpatialArgs(SpatialOpe

AW: Can't get distance sorting to work in Lucene Spatial 4.10.3

2015-02-25 Thread Simon Rainer
ail.com [david.w.smi...@gmail.com] Gesendet: Mittwoch, 25. Februar 2015 16:25 An: java-user@lucene.apache.org Betreff: Re: Can't get distance sorting to work in Lucene Spatial 4.10.3 Hi Rainer, I see two issues. One is that you call makePoint with latitude (Y) then longitude (X). Spatial4j is X

Re: Can't get distance sorting to work in Lucene Spatial 4.10.3

2015-02-25 Thread david.w.smi...@gmail.com
Hi Rainer, I see two issues. One is that you call makePoint with latitude (Y) then longitude (X). Spatial4j is X then Y order. The second issue is more stylistic (but in this case it may explain your symptom due to the X & Y mixup) is that, since you already have a ‘point’, when you call makeCi

Can't get distance sorting to work in Lucene Spatial 4.10.3

2015-02-25 Thread Simon Rainer
Hi! I have problems getting distance sorting to work in Lucene Spatial. (I'm using v4.10.3.) I'm following the SpatialExample.java from the Lucene docs. My code is below (it's Scala, but translates 1:1 into Java). When I run the query, results don't seem to be affected by the sorting at all. Ch