Marco
Marco

Reputation: 33

sortMissingLast doesn't seem to be working

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"/>

Upvotes: 1

Views: 3980

Answers (1)

Mauricio Scheffer
Mauricio Scheffer

Reputation: 99730

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.

Upvotes: 1

Related Questions