Re: why the of advance(int target) function of DocIdSetIterator is defined with uncertain?

2012-04-23 Thread Li Li
I got it. I found my test codes some problem. the new test result is: when minShould=1, new algorithm is a little bit faster than old one. when minShould1, old algorithm is faster. On Sun, Apr 22, 2012 at 3:32 AM, Mikhail Khludnev mkhlud...@griddynamics.com wrote: Li, I can give you my

Re: why the of advance(int target) function of DocIdSetIterator is defined with uncertain?

2012-04-18 Thread Li Li
I found the patch has removed the score(Collector) and score(Collector,int,int) method. this seems to mean that this scorer is not possibly used as top-level scorer. Why old implementation has this method? anywhere use DisjunctionSumScorer as top level scorer? On Wed, Apr 18, 2012 at 12:18 PM, Li

Re: why the of advance(int target) function of DocIdSetIterator is defined with uncertain?

2012-04-18 Thread Li Li
Michael McCandless wrote: So... the good news is I made a new scorer (basically copied DisjunctionMaxScorer and then tweaked from there) that scores the OR-only case. All tests pass w/ this new scorer. And more good news is that if you don't score (I sort by doctitle to do that), you get a

why the of advance(int target) function of DocIdSetIterator is defined with uncertain?

2012-04-17 Thread Li Li
hi all, I am now hacking the BooleanScorer2 to let it keep the docID() of the leaf scorer(mostly possible TermScorer) the same as the top-level Scorer. Why I want to do this is: When I Collect a doc, I want to know which term is matched(especially for BooleanClause whose Occur is SHOULD). we

Re: why the of advance(int target) function of DocIdSetIterator is defined with uncertain?

2012-04-17 Thread Li Li
some mistakes of the example: after first call advance(5) currentDoc=6 first scorer's nextDoc is called to in advance, the heap is empty now. then call advance(6) because scorerDocQueue.size() minimumNrMatchers, it just return NO_MORE_DOCS On Tue, Apr 17, 2012 at 6:37 PM, Li Li

Re: why the of advance(int target) function of DocIdSetIterator is defined with uncertain?

2012-04-17 Thread Mikhail Khludnev
Hello, I can't help with the particular question, but can share some experience. My task is roughly the same I've found the patch https://issues.apache.org/jira/browse/LUCENE-2686 is absolutely useful (with one small addition, I'll post it in comments soon). By using it I have disjunction summing

Re: why the of advance(int target) function of DocIdSetIterator is defined with uncertain?

2012-04-17 Thread Li Li
thanks. it's great. On Tue, Apr 17, 2012 at 8:16 PM, Mikhail Khludnev mkhlud...@griddynamics.com wrote: Hello, I can't help with the particular question, but can share some experience. My task is roughly the same I've found the patch https://issues.apache.org/jira/browse/LUCENE-2686 is