mirror of https://github.com/apache/lucene.git
DV fields must index empty BytesRef when field is missing
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1438228 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a1aacefde1
commit
c2e535a5dc
|
@ -170,6 +170,17 @@ public class TestSort extends LuceneTestCase {
|
||||||
default:
|
default:
|
||||||
throw new IllegalStateException("unknown type " + stringDVType);
|
throw new IllegalStateException("unknown type " + stringDVType);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
switch(stringDVType) {
|
||||||
|
case SORTED:
|
||||||
|
doc.add(new SortedDocValuesField("string_dv", new BytesRef()));
|
||||||
|
break;
|
||||||
|
case BINARY:
|
||||||
|
doc.add(new BinaryDocValuesField("string_dv", new BytesRef()));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new IllegalStateException("unknown type " + stringDVType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (data[i][5] != null) doc.add(new StringField("custom", data[i][5], Field.Store.NO));
|
if (data[i][5] != null) doc.add(new StringField("custom", data[i][5], Field.Store.NO));
|
||||||
if (data[i][6] != null) doc.add(new StringField("i18n", data[i][6], Field.Store.NO));
|
if (data[i][6] != null) doc.add(new StringField("i18n", data[i][6], Field.Store.NO));
|
||||||
|
|
Loading…
Reference in New Issue