We're testing SolrCloud 4.1 for NRT search over hundreds of millions of
documents. I've been really impressed. The query performance is so much
better than we were getting out of our database.

With filter queries, we're able to get query times of less than 100ms under
moderate load. That's amazing.

My question today is on faceting. Let me give some examples to help make my
point.

*fq=state:California*
numFound = 92193
QTime = *80*

*fq=state:Calforni*
numFound = 0
QTime = *8*

*fq=state:California&facet=true&facet.field=city*
numFound = 92193
QTime = *1316*

*fq=city:"San Francisco"&facet=true&facet.field=city*
numFound = 1961
QTime = *1477*

*fq=state:Californi&facet=true&facet.field=city*
numFound = 0
QTime = *1380*

So filtering is fast and faceting is slow, which is understandable.

But why is it slow to generate facets on a result set of 0? Furthermore,
why does it take the same amount of time to generate facets on a result set
of 2000 as 100,000 documents?

This leads me to believe that the FQ is being applied AFTER the facets are
calculated on the whole data set. For my use case it would make a ton of
sense to apply the FQ first and then facet. Is it possible to specify this
behavior or do I need to get into the code and get my hands dirty?

Best Regards,
Daniel

Reply via email to