lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rasik Pandey" <>
Subject RE : BooleanQuery/Clauses with Linked Filters
Date Wed, 25 Feb 2004 14:39:28 GMT

> On Feb 25, 2004, at 6:48 AM, Rasik Pandey wrote:
> > I was wondering if it is somehow possible to tie filters to
> individual
> > boolean queries/clauses. I didn't see any such possibility
> with a
> > quick inspection of the code and I am not sure if a special
> > HitCollector implementation would be sufficient or even
> merited. Any
> > ideas, suggestions, or comments would be appreciated.
> I'm not following what you mean.  Could you describe a concrete
> example
> of what you're after?

Searching Lucene with a BooleanQuery using query, Filter filter) does
not allow for coupling filters to sub-queries of the BooleanQuery, but rather coupling a filter
to the parent BooleanQuery.

Currently we can do this:

BooleanQuery not Filter(state, texas) not Filter(country, georgia)
-TermQuery(city, paris) 
-TermQuery(state, georgia)

instead we would like to be able to do this.
-TermQuery(city, paris) not Filter(state, texas)
-TermQuery(state, georgia) not Filter(country, georgia)

Let me know if this isn't clear.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message