Mike Klaas wrote: > > 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 >
Thanks Mike, that's good to hear it will help. Unfortunately pretty much ALL of our fields are multi-valued. A product can exist in multiple categories, be sold by multiple merchants, and have multiple attributes with multiple attribute values assigned to it. E.g. an iPod in a special Gifts category and also in the MP3 Players category who's audio format support attribute values are MP3, AAC, WAV, and Apple Lossless. I'm not sure what you mean by "just use numFound"? I will have to speak with my developer on this one as I'm not the one who originally wrote the code. Thanks, Brendan -- View this message in context: http://www.nabble.com/autowarm-partial-queries-in-solrconfig.xml-tf4611014.html#a13168240 Sent from the Solr - User mailing list archive at Nabble.com.