One small question - did you re-index in-between? The index structure
will be different for each.

Upayavira

On Tue, Dec 4, 2012, at 02:30 PM, Aaron Daubman wrote:
> Greetings,
> 
> I'm finally updating an old instance and in testing, discovered that
> using
> the recommended TrieField instead of SortableIntField for range queries
> returns unexpected and seemingly incorrect results.
> 
> A query with:
> 
> q=*:*&fq=+i_yearStartSort:{* TO 1995}&fq=+i_yearStopSort:{* TO *}
> 
> Should, and does under 1.4.1 with SortableIntField, only return docs that
> have some i_yearStopSort value and have an i_yearStartSort value less
> than
> 1995.
> 
> Unfortunately, under 3.6.1 with class="solr.TrieField" type="integer",
> this
> query is returning docs that have neither an i_yearStopSort nor a
> i_yearStartSort value.
> 
> 
> Here are the two schemas:
> 
> Solr 1.4.1 Relevant Schema Parts - Working as desired:
> ---------------------------------------------------------------------------------
> <fieldType name="sint" class="solr.SortableIntField"
> sortMissingLast="true"
> omitNorms="true"/>
> ...
> <field name="i_yearStartSort" type="sint" indexed="true" stored="false"
> required="false" multiValued="true"/>
> <field name="i_yearStopSort" type="sint" indexed="true"  stored="false"
> required="false" multiValued="true"/>
> 
> 
> Solr 3.6.1 Relevant Schema Parts - Not working as expected:
> -----------------------------------------------------------------------------------------
> <fieldType name="tint" class="solr.TrieField" type="integer"
> precisionStep="4" sortMissingLast="true" positionIncrementGap="0"
> omitNorms="true"/>
> ...
> <field name="i_yearStartSort" type="tint" indexed="true" stored="false"
> required="false" multiValued="false"/>
> <field name="i_yearStopSort" type="tint" indexed="true" stored="false"
> required="false" multiValued="false"/>
> 
> 
> 1) What is the best way to return to the desired/expected behavior?
> 2) Can you explain to me why this happens?
> 3) I have a sneaking suspicion (but could be totally wrong) that this
> relates to sortMissingLast="true" - if it does, can you explain the
> seeming
> discrepancies in:
> SOLR-2881 and SOLR-2134? If I am reading these correctly, SOLR-2134 says
> this was fixed for Trie in 4.0, but not in 3.x... SOLR-2881 has a fix
> version of 3.5 listed, but some of the comments also seem to indicate
> this
> was not actually fixed in 3.5+
> 
> Thanks,
>      Aaron

Reply via email to