lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Complex query, need filtering after query not before
Date Thu, 02 Feb 2012 18:28:32 GMT

: 700ms. The problem is, we are using geofiltering and that is happening *
: before* the queries, so we have to geofilter on the 1B docs to restrict our
: set of docs first, and then do the query on a name field. But it seems that

	...

: I've looked at the "cache=false" param, and the "cost=" param, but that's
: not going to help much because we still have to do the filtering. (We
: *will* use
: "cache=false" to avoid the overhead of caching queries that will very
: rarely be the same.)
: 
: Is there any way to indicate a filter query should happen *after* the other
: results? The other fq on source restricts the docset somewhat, but

that's what the "cost" param does, it tels Solr the order to evaluate the 
filters, and won't bother asking a filter with cost "50" to evalaute a doc 
that a filter with cost "10" has already ruled out.

One thing you may be overlooking is this little bit of juicy goodness...

http://wiki.apache.org/solr/CommonQueryParameters#Caching_of_filters

>> As an additional feature for very high cost filters, if cache=false and 
>> cost>=100 and the query implements the PostFilter interface, a 
>> Collector will be requested from that query and used to filter 
>> documents only after they have matched the main query and all other 
>> filter queries.  

...at the moment only frange implements PostFilter, but maybe using that 
as a model you could patch geofilt to implement it?

hell: couldn't you rewrite your fq={!geofilt ...} to be an fq={!frange 
...}geodist(...) w/o any code changes?


-Hoss

Mime
View raw message