Robert Muir created LUCENE-4717: ----------------------------------- Summary: Lucene40's DocValues (sometimes?) have a bogus extra ordinal Key: LUCENE-4717 URL: https://issues.apache.org/jira/browse/LUCENE-4717 Project: Lucene - Core Issue Type: Bug Components: core/index Affects Versions: 4.1, 4.0 Reporter: Robert Muir Fix For: 4.2
I committed the following commented out check in CheckIndex: {noformat} if (seenOrds.cardinality() != sortedValues.getValueCount()) { // TODO: find the bug here and figure out a workaround (we can implement in LUCENE-4547's back compat layer maybe) // basically ord 0 is unused by any docs: so the sortedbytes ords are all off-by-one // does it always happen? e.g. maybe only if there are missing values? or a bug in its merge optimizations? // throw new RuntimeException("dv for field: " + fieldName + " has holes in its ords, valueCount=" + sortedValues.getValueCount() + " but only used: " + seenOrds.cardinality()); } {noformat} I'd really like to have this check in CheckIndex, and so it would be great to understand the conditions when the bug happens, and if we can correct it on-the-fly in Lucene40DocValuesReader in LUCENE-4547 branch... otherwise we will have to conditionalize the check based on when the segment was written (it will ultimately be corrected on merge, just annoying) -- 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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org