On Fri, Jul 18, 2014 at 2:10 PM, Hayden Muhl <haydenm...@gmail.com> wrote:
> I was doing some performance testing on facet queries and I noticed
> something odd. Most queries tended to be under 500 ms, but every so often
> the query time jumped to something like 5000 ms.
>
> q=*:*&fq={!tag=productBrandId}productBrandId:(156
> 1227)&facet.field={!ex=productBrandId}productBrandId&facet=true
>
> I noticed that the drop in performance happened any time I had a filter
> query tag match up with a facet exclusion.

Is this an actual query that took a long time, or just an example?
My guess is that "q" is actually much more expensive.

If a filter is excluded, the base DocSet for faceting must be re-computed.
This involves intersecting all the DocSets for the other filters not
excluded (which should all be cached) with the DocSet of the query
(which won't be cached and will need to be generated).  That last step
can be expensive, depending on the query.

-Yonik
http://heliosearch.org - native code faceting, facet functions,
sub-facets, off-heap data

Reply via email to