You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "rajeev.nadgauda" <ra...@leadenrich.com> on 2014/02/11 15:47:38 UTC

Urgent Help. Best Way to have multiple OR Conditions for same field in SOLR

HI,

I am new to SOLR , we have CRM data for Contacts and Companies which are in
millions, we have switched to SOLR for fast search results.

PROBLEM: We have large inclusion and exclusion lists with names of companies
or contacts.
Ex: Include or Exclude : "company A" & "Company B" & "Company C" .... &
"Company n"  where assume  n = 10000;

What would be the best way to do this kind of a query using SOLR.

WHAT I HAVE TRIED: 
Setting "q" ==> field_name: ("companyA" OR "companyB" ..... OR "Company n");
This works only for a list of 400 odd.

Looking forward for assistance on this.

Thank You,
Rajeev.





--
View this message in context: http://lucene.472066.n3.nabble.com/Urgent-Help-Best-Way-to-have-multiple-OR-Conditions-for-same-field-in-SOLR-tp4116681.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Urgent Help. Best Way to have multiple OR Conditions for same field in SOLR

Posted by Erick Erickson <er...@gmail.com>.
right, 10K Boolean clauses are not very efficient. You actually can
up the limit here, but still...

Consider a "post filter", here's a place to start:
http://lucene.apache.org/solr/4_3_1/solr-core/org/apache/solr/search/PostFilter.html

Best,
Erick


On Tue, Feb 11, 2014 at 6:47 AM, rajeev.nadgauda <
rajeev.nadgauda@leadenrich.com> wrote:

> HI,
>
> I am new to SOLR , we have CRM data for Contacts and Companies which are in
> millions, we have switched to SOLR for fast search results.
>
> PROBLEM: We have large inclusion and exclusion lists with names of
> companies
> or contacts.
> Ex: Include or Exclude : "company A" & "Company B" & "Company C" .... &
> "Company n"  where assume  n = 10000;
>
> What would be the best way to do this kind of a query using SOLR.
>
> WHAT I HAVE TRIED:
> Setting "q" ==> field_name: ("companyA" OR "companyB" ..... OR "Company
> n");
> This works only for a list of 400 odd.
>
> Looking forward for assistance on this.
>
> Thank You,
> Rajeev.
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Urgent-Help-Best-Way-to-have-multiple-OR-Conditions-for-same-field-in-SOLR-tp4116681.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>