lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven White <swhite4...@gmail.com>
Subject Re: What is considered too many terms on a field search?
Date Sat, 12 Mar 2016 16:38:19 GMT
Thanks Yonik.

1) How would I enforce OR on the list of terms when AND is my default
search Boolean setting in solrconfig.xml?

2) And just to confirm that I understand your solution, here is my current
implementation:


q=user-real-search-terms&fq={!join+fromIndex=sku_idex+from=SkuID+to=SkuFfolder}FooField:(a
OR b OR c ...)

Based on what you showed, I'm assuming I can now do the following:


q=user-real-search-terms&fq={!join+fromIndex=sku_idex+from=SkuID+to=SkuFfolder}FooField:({!terms
f=FooField}a,b,c,d,e)

Did I get this right?

Steve


On Sat, Mar 12, 2016 at 11:21 AM, Yonik Seeley <yseeley@gmail.com> wrote:

> On Sat, Mar 12, 2016 at 11:00 AM, Steven White <swhite4141@gmail.com>
> wrote:
> > Hi folks
> >
> > I need to search for terms in a field that will be AND'ed with user's
> real
> > search terms, such as:
> >
> >     user-real-search-terms AND FooField:(a OR b OR c OR d OR e OR ...)
> >
> > The list of terms in the field FooField can be as large as 1000 items,
> but
> > will average around 100.
>
>
> Stay away from BooleanQuery for this - it's trappy as it has a limit
> (1024 by default) after which it will start throwing an exception.
> Use {!terms f=FooField}a,b,c,d,e
>
> When embedding in another query, it may be easiest/convenient to use a
> separate parameter for your term list:
> q=user-real-search-terms AND {!terms f=FooField v=$biglist)
> &biglist=a,b,c,d,e
>
>
> -Yonik
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message