sortMissingLast 似乎不起作用
我想对 Solr 索引中的年份字段(色调类型)进行排序,并且我想确保缺失的字段在末尾进行排序。我已经在 schema.xml 中进行了配置,将 sortMissingLast 设置为 true 并重新启动服务器,但它似乎没有效果。按年份排序,空虚的岁月还处于开头。
我是否需要完成重建索引才能使此更改生效?
谢谢,
Marco
以下是 schema.xml 中的相关行。我们正在使用 Solr 3.1
<fieldType name="tint" class="solr.TrieIntField" sortMissingLast="true" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<field name="year" type="tint" indexed="true" stored="true"/>
I want to sort on the year field (of type tint) in our Solr index and I want to make sure that missing fields are sorted at the end. I have configured that in schema.xml by setting the sortMissingLast to true and restarted the server, but it doesn't seem to have an effect. The empty years are still at the beginning when I sort by year.
Do I need to complete rebuild the index to make this change work?
Thanks,
Marco
Here are the relevant lines from schema.xml. We are using Solr 3.1
<fieldType name="tint" class="solr.TrieIntField" sortMissingLast="true" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<field name="year" type="tint" indexed="true" stored="true"/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Trie 字段目前不支持 sortMissingLast。请改用可排序字段。
根据最后的评论,这个问题已经在 Solr 4.0 中修复,所以您可能想要每晚构建一次。
Trie fields don't support sortMissingLast at the moment. Use a sortable field instead.
According to the last comments, this is already fixed in Solr 4.0, so alternatively you might want to get a nightly build.