LUCENE-6962: fix simple text dim values: writer was missing newlines, and max was incorrectly returning min

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1723728 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2016-01-08 14:13:36 +00:00
parent 6ad14b34dd
commit bcf2913b9f
2 changed files with 3 additions and 1 deletions

View File

@ -225,7 +225,7 @@ class SimpleTextDimensionalReader extends DimensionalReader {
// now all docs having this dimensional field were deleted in this segment: // now all docs having this dimensional field were deleted in this segment:
return null; return null;
} }
return bkdReader.getMinPackedValue(); return bkdReader.getMaxPackedValue();
} }
@Override @Override

View File

@ -95,10 +95,12 @@ class SimpleTextDimensionalWriter extends DimensionalWriter {
write(out, MIN_VALUE); write(out, MIN_VALUE);
BytesRef br = new BytesRef(minPackedValue, 0, minPackedValue.length); BytesRef br = new BytesRef(minPackedValue, 0, minPackedValue.length);
write(out, br.toString()); write(out, br.toString());
newline(out);
write(out, MAX_VALUE); write(out, MAX_VALUE);
br = new BytesRef(maxPackedValue, 0, maxPackedValue.length); br = new BytesRef(maxPackedValue, 0, maxPackedValue.length);
write(out, br.toString()); write(out, br.toString());
newline(out);
for(int i=0;i<leafBlockFPs.length;i++) { for(int i=0;i<leafBlockFPs.length;i++) {
write(out, BLOCK_FP); write(out, BLOCK_FP);