You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2019/05/27 12:39:00 UTC
[jira] [Commented] (LUCENE-8806) WANDScorer should support
two-phase iterator
[ https://issues.apache.org/jira/browse/LUCENE-8806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16848902#comment-16848902 ]
Adrien Grand commented on LUCENE-8806:
--------------------------------------
The change to correct. Regarding tests, could you have a separate testRandomTwoPhase from testRandom so that we get an idea whether a problem is related to two-phase iteration or not when we get a failure? It'd also be nice to have something similar to testBasics, but for two-phase iterators, maybe we can somehow rewrite testBasics with phrase queries?
I'm wondering whether we could make this more efficient (possibly as a follow-up, the way changes to WANDScorer are designed in your patch is already an improvement, and the ideas I am suggesting may be difficult to implement):
- Right now your patch checks all clauses that are positioned on the current doc. Maybe we could improve this logic to exit early if the fact that one clause doesn't match makes leadMaxScore less than the min competitive score.
- As a follow-up of the above point, we could then look into advancing disis from the tail lazily instead of calling advanceAllTail like the current patch does. In some cases, leadMaxScore+tailMaxScore might become less than the min competitive score before all disis from the tail have advanced.
- We could look into making TwoPhaseIterator#matches return true as soon as one clause returns true instead of checking them all? This would help in the case that score() isn't called.
> WANDScorer should support two-phase iterator
> --------------------------------------------
>
> Key: LUCENE-8806
> URL: https://issues.apache.org/jira/browse/LUCENE-8806
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Jim Ferenczi
> Priority: Major
> Attachments: LUCENE-8806.patch
>
>
> Following https://issues.apache.org/jira/browse/LUCENE-8770 the WANDScorer should leverage two-phase iterators in order to be faster when used in conjunctions.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org