Lucene.net 2.9.2 sorting (sort doesn't work)

北城以北 提交于 2019-12-05 07:47:51

The field does not need to be stored unless you are returning the data in your query. It is however still added to the index.

The reason you do not analyze a field you wish to sort on is that an analyzer breaks the field into seperate terms, which makes sorting very difficult as the index for the document will have multiple words in it, which obviously cannot be sorted against the whole index. This applies to all field types, wether they are a single term or not.

I believe you can store the field, but unless you want to return it in your query there is no need.

one important thing i suspect to know about sorting.

It doesn't work on tokenized (analyzed) data.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!