Issue with range queries on Lucene 6.6 using IntPoint

2017-07-01 Thread Alexander Filipchik
Not sure if I'm doi9ng something wrong, or there is a bug somewhere but: I was trying to create a test index of a lot every second in a year and try query it (doesn't have to be time, I'm using it to explain the problem). Example document consists of 7 fields: document.add(new IntPoint("year", y

Re: Issue with range queries on Lucene 6.6 using IntPoint

2017-07-01 Thread Michael McCandless
I think there is a bug in your collector, because the "int doc" that is passed to the collect method is per-segment, but you are passing it to the top-level reader. You should override the setNextReader method in Collector, and hold onto the "int docBase" that's passed in that LeafReaderContext, t

Re: Lucene GeoNear Search and Sort Performance

2017-07-01 Thread Michael McCandless
You can use LatLonPoint.newDistanceQuery to get the results within the specified distance, and then use LatLonDocValuesField.newDistanceSort to sort by distance, and use the IndexSearcher.search method that takes Sort. Then the results should be all points within the radius, sorted by distance. Th