如何在Lucene 6中对IntPont或LongPoint字段进行排序 [英] How to sort IntPont or LongPoint field in Lucene 6
本文介绍了如何在Lucene 6中对IntPont或LongPoint字段进行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好:我正在从Lucene 5.1迁移到Lucene 6.我发现InPoint不支持排序,因为它的DocValuesType被冻结为NONE,并且排序需要NUMERIC.在Lucene 5.1中,我可以设置一个newmeric字段的字段类型,这样我就可以进行基于范围的搜索并对结果进行排序.我知道我可以迁移到LegacyIntField,但我想迁移到新的IntPoint.有谁知道如何索引数值以支持基于范围的查询和排序?
Hi: I am migrating to Lucene 6 from Lucene 5.1. I found out that InPoint does not support sorting as its DocValuesType is frozen to NONE and sorting requires NUMERIC. In Lucene 5.1, I could set the field type of a newmeric field so I could do range based search and sort the result. I know I can migrate to LegacyIntField but I'd like migrate to the new IntPoint instead. Does any one know how to index a numeric value to support both range based query and sorting?
谢谢!
推荐答案
查看全文