fix sortedbytes merge bugs

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1411411 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-11-19 21:05:01 +00:00
parent 711e29366d
commit b357f6f8a6
1 changed files with 2 additions and 3 deletions

View File

@ -139,7 +139,6 @@ public abstract class SortedDocValuesConsumer {
}
BytesRef lastTerm = null;
boolean first = true;
int ord = 0;
while (q.size() != 0) {
SegmentState top = q.top();
@ -148,10 +147,10 @@ public abstract class SortedDocValuesConsumer {
// nocommit we could spill this to disk instead of
// RAM, and replay on finish...
mergedTerms.add(lastTerm);
if (lastTerm == null) {
ord++;
if (fixedLength == -2) {
fixedLength = lastTerm.length;
} else {
ord++;
if (lastTerm.length != fixedLength) {
fixedLength = -1;
}