首先是建立索引:
然后就是搜索了,只要新建对应的:
Query query = NumericRangeQuery.newDoubleRange(field, 0.0, 0.5, true, true);
更详细的使用方法,请参考:
http://wiki.apache.org/lucene-java/SearchNumericalFields
http://lucene.apache.org/java/3_0_2/api/core/org/apache/lucene/search/NumericRangeQuery.html