Re: BooleanScorer - Maximum Prohibited Scorers?

2014-04-17 Thread Gregory Dearing
David, I believe I misunderstood your question in my earlier response. I think you can create a logical "MaximumNumberMustNotMatch" by nesting Boolean Queries. 1.) Create a Boolean Query, using 'SHOULD' clauses and setting Minimum Number Should Match. 2. ) Wrap the BooleanQuery with a 'MUST_NOT

Re: BooleanScorer - Maximum Prohibited Scorers?

2014-04-17 Thread Gregory Dearing
David, Any document that matches a MUST_NOT clause will not match the BooleanQuery. By definition. This means that "maximumNumberMustNotMatch" is effectively hardcoded to zero. -Greg On Wed, Apr 16, 2014 at 3:59 PM, David Stimpert wrote: > Hello, > I have found useful functionality in Boolea

BooleanScorer - Maximum Prohibited Scorers?

2014-04-16 Thread David Stimpert
Hello, I have found useful functionality in BooleanQuery which allows me to specify a minimum number of matching optional terms (i.e. setMinimumNumberShouldMatch). I do not, however, see similar functionality available for setting the maximum number of MUST_NOTs (i.e. setMaximumNumberMustNotMatch)

Re: BooleanScorer

2009-12-27 Thread Michael McCandless
BooleanQuery uses BooleanScorer when possible because that gives better performance than BooleanScorer2. If you really want to force it, you'd need to create the weight/scorer yourself, passing "true" for scoreDocsInOrder. Alternatively, you could make your collector, for e

BooleanScorer

2009-12-25 Thread Elias Khsheibun
When I write the following query: "Computer AND Science" - the code that is in BooleanScorer2 is invoked, and when I write "Computer OR Science" the code in BooleanScorer is invoked. How can I make the OR (the conjunctive query) to use the BooleanScorer2 and not BooleanScor