lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-4139) multivalued field with offsets makes corrumpt index
Date Tue, 12 Jun 2012 14:59:43 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-4139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Robert Muir updated LUCENE-4139:
--------------------------------

    Attachment: LUCENE-4139.patch

updated patch, i renamed the prevOffset in writeOffset to offsetAccum (i think this is less
misleading). also added a random test.
                
> multivalued field with offsets makes corrumpt index 
> ----------------------------------------------------
>
>                 Key: LUCENE-4139
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4139
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-4139.patch, LUCENE-4139.patch, LUCENE-4139_test.patch, LUCENE-4139_test.patch
>
>
> I was trying to beef up TestBackwardsCompatibility (LUCENE-4085) but i accidentally made
a corrupt index due to a typo:
> {code}
> // a field with both offsets and term vectors for a cross-check
> FieldType customType3 = new FieldType(TextField.TYPE_STORED);
> customType3.setStoreTermVectors(true);
> customType3.setStoreTermVectorPositions(true);
> customType3.setStoreTermVectorOffsets(true);    customType3.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS);
> doc.add(new Field("content3", "here is more content with aaa aaa aaa", customType3));
> // a field that omits only positions
> FieldType customType4 = new FieldType(TextField.TYPE_STORED);
> customType4.setStoreTermVectors(true);
> customType4.setStoreTermVectorPositions(false);
> customType4.setStoreTermVectorOffsets(true);
> customType4.setIndexOptions(IndexOptions.DOCS_AND_FREQS);
> // check out the copy-paste typo here! i forgot to change this to content4
>  doc.add(new Field("content3", "here is more content with aaa aaa aaa", customType3));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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