Correctly indexing latitude and longitude values in Lucene

后端 未结 2 1078
太阳男子
太阳男子 2021-02-10 05:31

Am working on a \"US based nearest city search within a given radius\" functionality using Lucene API. Am indexing city\'s lat and long values in Lucene as follows:

<         


        
2条回答
  •  被撕碎了的回忆
    2021-02-10 06:08

    Here's the bleeding edge about Searching Numerical Fields in Lucene by Uwe Schindler, the expert on the subject. You may need to use the older (and slower) ConstantScoreRangeQuery because Lucene.net is a bit behind Lucene, and the class NumericRangeQuery described in the link was not yet released in Java Lucene.

提交回复
热议问题