lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Boolean query with 50,000 clauses! Possible? Scalable?
Date Sun, 26 Jul 2009 09:43:06 GMT
This is not so simple and needs more programming experience and knowledge
about the Lucene internals. They simpliest way (but works only in the not
yet released Lucene 2.9) is to create a FilteredTermEnum (you iterate over
all terms of the field in your index and pick all those up that match your
criteria) and build a MultiTermQuery on top of it (override
MultiTermQuery.getFilter()).

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Edoardo Marcora [mailto:edoardo.marcora@gmail.com]
> Sent: Sunday, July 26, 2009 11:27 AM
> To: general@lucene.apache.org
> Subject: RE: Boolean query with 50,000 clauses! Possible? Scalable?
> 
> 
> Thanx for your prompt reply. Being a total noob on this, do you mind if I
> ask
> you how would I change this to a filter?
> 
> Cheers,
> 
> 
> Uwe Schindler wrote:
> >
> > I would change this to a Filter. BooleanQueries are not scalable this
> way
> > and will take very long time.
> >
> > -----
> > Uwe Schindler
> > H.-H.-Meier-Allee 63, D-28213 Bremen
> > http://www.thetaphi.de
> > eMail: uwe@thetaphi.de
> >
> >> From: Edoardo Marcora [mailto:edoardo.marcora@gmail.com]
> >> Sent: Sunday, July 26, 2009 10:14 AM
> >> To: general@lucene.apache.org
> >> Subject: Boolean query with 50,000 clauses! Possible? Scalable?
> >>
> >>
> >> I am faced with the requirement for a boolean query composed of 50,000
> >> clauses (all of them directed at the same field) all OR'ed together.
> >>
> >> I know that maxClauseCount can be set arbitrarily, but I am wondering
> >> whether this kind of query would chock and how scalable are this kind
> of
> >> queries (time/memory).
> >>
> >> Thank you in advance for your help and consideration
> >> --
> >> View this message in context: http://www.nabble.com/Boolean-query-with-
> >> 50%2C000-clauses%21-Possible--Scalable--tp24664839p24664839.html
> >> Sent from the Lucene - General mailing list archive at Nabble.com.
> >
> >
> >
> >
> 
> --
> View this message in context: http://www.nabble.com/Boolean-query-with-
> 50%2C000-clauses%21-Possible--Scalable--tp24664839p24665291.html
> Sent from the Lucene - General mailing list archive at Nabble.com.



Mime
View raw message