lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rasik Pandey" <rasik.pan...@ajlsm.com>
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 Searcher.search(Query 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) 
OR
-TermQuery(state, georgia)


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


Let me know if this isn't clear.

RBP



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message