开发者

sortMissingLast doesn't seem to be working

开发者 https://www.devze.com 2023-03-27 04:21 出处:网络
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

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" precisio开发者_运维技巧nStep="8" omitNorms="true" positionIncrementGap="0"/>


 <field name="year" type="tint" indexed="true" stored="true"/>


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消