lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-5103) join on single-valued field with deleted docs scores too few docs
Date Thu, 11 Jul 2013 06:45:48 GMT

    [ 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


Mime
View raw message