On Feb 25, 2004, at 6:48 AM, Rasik Pandey wrote:I was wondering if it is somehow possible to tie filters toindividualboolean queries/clauses. I didn't see any such possibilitywith amerited. Anyquick inspection of the code and I am not sure if a special HitCollector implementation would be sufficient or evenideas, 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.
right - you cannot apply filters to subqueries. A filter is really a pre-query screen, not really part of the query itself.
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.
Its still not entirely clear, but it seems you could accomplish what you want by putting in some AND TermQuery's in there instead of trying to use a Filter. Wouldn't that do what you want?
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]