Gang,

We've got an indexed solr.DateField that we'd like to use for sorting our query 
results. In January, Mike Klaas suggested turning on <useFilterForSortedQuery> 
to make sorting search results on a field efficient:

At 4:18 PM -0800 1/31/08, Mike Klaas wrote:
>The situation could be optimized in Solr, but there is a related case that 
>_is_ optimized that should be almost as fast.  If you
>
>a) don't ask for document score in field list (fl)
>b) enable <useFilterForSortedQuery> in solrconfig.xml
>c) specify _some_ sort order other than score
>
>Then Solr will do cached bitset intersections only.  It will also do sorting, 
>but that may not be terribly expensive.  If it is close to the desired 
>performance, it would be relatively easy to patch solr to not do that step.
>
>(Note: this is query sort, no facet sort).

However, it sounds like the original motivation for <useFilterForSortedQuery> 
was to overcome performance problems and bugs in older versions of Lucene using 
multi-segment indices:

At 18:03 PM -0400 12/11/06, Yonik Seeley wrote:
>People may want to consider changing the useFilterForSortedQuery
>option from true to false (or commenting it out) in solrconfig.xml
>I believe it should result in a speedup for the average query that
>sorts on something other than score.
>Generating and using filters for base queries used to be a win due to:
>1) a set of complex queries that were almost never sorted by score,
>but the sort changed
>2) bugs/slowness in Lucene when dealing with multi-segment indicies
>The deficiencies in Lucene have been corrected, and the introduction
>of fq filter parameters that are cached separately go a long way
>toward mitigating #1. The downside to this optimization is extra
>work when the same base query isn't resorted often, and pollution of
>the filterCache. I've changed the default to false for the example
>solrconfig.xml

For the moment, our solrconfig.xml looks like the example one (i.e., 
useFilterForSortedQuery is commented out).

Thanks in advance for any advice,

- Chris
-- 
----------------------------
Chris Schneider
Krugle, Inc.
http://www.krugle.com
[EMAIL PROTECTED]
----------------------------

Reply via email to