Re: TermsFilter and MUST

2008-09-12 Thread mark harwood
nal Message From: Konstantyn Smirnov <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Friday, 12 September, 2008 15:32:29 Subject: Re: TermsFilter and MUST Hi Mark, I ended up implementing a MandatoryTermsFilter, which looks like: class MandatoryTermsFilter extends Filter

Re: TermsFilter and MUST

2008-09-12 Thread Konstantyn Smirnov
Hi Mark, I ended up implementing a MandatoryTermsFilter, which looks like: class MandatoryTermsFilter extends Filter { List terms BitSet bits( IndexReader reader ){ int size = reader.maxDoc() BitSet result = new BitSet( size ) BitSet andMask = new BitSet( size ) andMas

Re: TermsFilter and MUST

2008-09-12 Thread mark harwood
TermsFilter has taken the relatively easy option of ORing terms and this is inexpensive to construct. Adding more complex features (mixes of MUST/SHOULD/NOT clauses) starts to require the sorts of optimisations you see in BooleanQuery (MUST clauses accelerating processing of other clauses throu