You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2014/10/05 16:08:34 UTC

[jira] [Created] (LUCENE-5990) Merging should pass correct fieldinfos to producers always

Robert Muir created LUCENE-5990:
-----------------------------------

             Summary: Merging should pass correct fieldinfos to producers always
                 Key: LUCENE-5990
                 URL: https://issues.apache.org/jira/browse/LUCENE-5990
             Project: Lucene - Core
          Issue Type: Bug
            Reporter: Robert Muir


I think its been a longstanding issue, but I noticed it in the bulk merge code today and see that we can fix it...

instead of:
{code}
DocumentStoredFieldVisitor visitor = new DocumentStoredFieldVisitor();
storedFieldsReader.visitDocument(docID, visitor);
Document doc = visitor.getDocument();
addDocument(doc, mergeState.mergeFieldInfos);
{code}

we should do:
{code}
addDocument(doc, mergeState.fieldInfos[i]);
{code}

This is a lot more consistent and reduce the possibility of scary bugs during merge because the codec does something strange. We should look into all merge logic to see if it can be improved here.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org