On 11-Oct-07, at 6:47 PM, BrendanD wrote:


Hi,

I have the following query that I've found in my production logs:

INFO: /select/
rows=0&start=0&f.category_id.facet.limit=-1&facet=true&facet.field=cat egory_id&fq=product_is_active:true&fq=product_status_code:complete&fq= category_id:"1001644"&fq=attribute_id_value_en_pair:"1005585 \:Wedding"&fq=merchant_id:"1000156"&qt=sti_dismax_en
0 40734

It took almost 41 seconds to run. ick!

I'd like to pre-warm that query in the solrconfig.xml, but I'd like to leave
off a parameter or two. For example:

rows=0&start=0&f.category_id.facet.limit=-1&facet=true&facet.field=cat egory_id&fq=product_is_active:true&fq=product_status_code:complete&fq= category_id:"1001644"&qt=sti_dismax_en

This time is almost certainly being spent in faceting on category_id. In that case, any facet query on that field will warm the cache just fine. (Since you don't care about the results, use facet.limit=1, not unlimited). It'll also warm all the fq parameters, which can be shared by future queries.

Any reason why you are faceting on a field that you are restricting? Clearly, the answer will be '1001644' --> <numFound>, (all other categories) -> 0. Just use numFound.

Also, if there can only be one category per doc, make sure you are using the fieldCache method for category_id.

-Mike


Reply via email to