lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Klaas <>
Subject Re: Slow performance using MatchAllDocsQuery with filter query
Date Tue, 01 Jul 2008 21:25:44 GMT
On 1-Jul-08, at 12:25 PM, Guangwei Yuan wrote:

> I've noticed some bad performance in faceted browsing, when the  
> query is
> empty (so the MatchAllDocsQuery is used) and there are only filter  
> queries.
> An example of the search url is:
> http://hostname:8080/solr/select/?q=&qt=dismax&fq=color:%23000000
> One idea is to switch to the StandardRequest in such case, by putting
> filters into the query filed, like "q=color:%23000000". But the  
> downside is
> the boost functions for dismax are lost and extra code maintenance.  
> Any
> ideas?

I too have noticed surprisingly poor performance in similar  
situations.  I've never quite have enough time to track it down, and  
at times I have done things like what you suggest (though implemented  
using a custom param I can pass to dismax; see

  , though that patch will not apply to current trunk).  We've also  
discussed giving Solr the ability to detect these situations itself  
and apply the appropriate optimizations.  It is difficult to come up  
with heuristics that always result in faster queries.

It is important to think about how the cache is interacting with  
this.  Are these cached queries?  Filters?  What do the cache  
statistics read like after re-executing the query multiple times?


View raw message