don't return invalid bytesref in lookupTerm

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1439262 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2013-01-28 05:53:34 +00:00
parent d70a0e0406
commit 41cfa17016
1 changed files with 4 additions and 0 deletions

View File

@ -111,12 +111,16 @@ public abstract class SortedDocValues extends BinaryDocValues {
// pass this spare down to DiskDV, which will then
// "use" our byte[] ...
spare.bytes = BytesRef.EMPTY_BYTES;
spare.offset = 0;
spare.length = 0;
return mid; // key found
}
}
// nocommit is this the right way...
spare.bytes = BytesRef.EMPTY_BYTES;
spare.offset = 0;
spare.length = 0;
return -(low + 1); // key not found.
}
}