Of course putting more clauses in an OR query will
have a performance cost, there's more work to do....

OK, being a smart-alec aside you will probably
be fine with a few hundred clauses. The question
is simply whether the performance hit is acceptable.
I'm afraid that question can't be answered in the
abstract, you'll have to test...

Since you're putting them in an fq, there's also some chance
that they'll be re-used from the cache, at least if there
are common patterns.

Best
Erick

On Wed, Apr 4, 2012 at 8:05 PM, roz dev <rozde...@gmail.com> wrote:
> Hi All,
>
> I am working on an application which makes few solr calls to get the data.
>
> On the high level, We have a requirement like this
>
>
>   - Make first call to Solr, to get the list of products which are
>   children of a given category
>   - Make 2nd solr call to get product documents based on a list of product
>   ids
>
> 2nd query will look like
>
> q=document_type:SKU&fq=product_id:(34 OR 45 OR 56 OR 77)
>
> We can have close to 100 product ids in fq.
>
> is there a performance cost of doing these solr calls which have lots of OR?
>
> As per Slide # 41 of Presentation "The Seven Deadly Sins of Solr", it is a
> bad idea to have these kind of queries.
>
> http://www.slideshare.net/lucenerevolution/hill-jay-7-sins-of-solrpdf
>
> But, It does not become clear the reason it is bad.
>
> Any inputs will be welcome.
>
> Thanks
>
> Saroj

Reply via email to