You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2013/07/11 08:45:48 UTC
[jira] [Commented] (LUCENE-5103) join on single-valued field with
deleted docs scores too few docs
[ https://issues.apache.org/jira/browse/LUCENE-5103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13705528#comment-13705528 ]
David Smiley commented on LUCENE-5103:
--------------------------------------
A working implementation of the method should looks like this:
{code:java}
int nextDocOutOfOrder() throws IOException {
while (true) {
if (docsEnum != null) {
int docId = docsEnum.nextDoc();
if (docId == DocIdSetIterator.NO_MORE_DOCS) {
docsEnum = null;
} else {
return doc = docId;
}
}
if (upto == terms.size()) {
return doc = DocIdSetIterator.NO_MORE_DOCS;
}
scoreUpto = upto;
if (termsEnum.seekExact(terms.get(ords[upto++], spare), true)) {
docsEnum = reuse = termsEnum.docs(acceptDocs, reuse, DocsEnum.FLAG_NONE);
}
}
}
{code}
I'll code a proper patch another day as it's very late right now.
> join on single-valued field with deleted docs scores too few docs
> -----------------------------------------------------------------
>
> Key: LUCENE-5103
> URL: https://issues.apache.org/jira/browse/LUCENE-5103
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/join
> Affects Versions: 4.3.1
> Reporter: David Smiley
> Assignee: David Smiley
> Fix For: 4.4
>
>
> TermsIncludingScoreQuery has an inner class SVInnerScorer used when the "to" side of a join is single-valued. This has a nextDocOutOfOrder() method that is faulty when there are deleted documents, and a document that is deleted is matched by the join. It'll terminate with NO_MORE_DOCS prematurely. Interestingly, it _appears_ MVInnerScorer (multi-valued) was coded properly to not have this problem.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org