|
14 | 14 | import org.apache.lucene.analysis.core.WhitespaceTokenizer; |
15 | 15 | import org.apache.lucene.analysis.standard.StandardAnalyzer; |
16 | 16 | import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; |
| 17 | +import org.apache.lucene.document.BinaryDocValuesField; |
17 | 18 | import org.apache.lucene.document.Document; |
18 | 19 | import org.apache.lucene.document.Field; |
19 | 20 | import org.apache.lucene.document.SortedSetDocValuesField; |
@@ -126,7 +127,7 @@ public void testEnableDocValues() throws IOException { |
126 | 127 | IndexableField[] fields = doc.rootDoc().getFields("field"); |
127 | 128 | assertEquals(2, fields.length); |
128 | 129 | assertEquals(DocValuesType.NONE, fields[0].fieldType().docValuesType()); |
129 | | - assertEquals(DocValuesType.SORTED_SET, fields[1].fieldType().docValuesType()); |
| 130 | + assertEquals(DocValuesType.BINARY, fields[1].fieldType().docValuesType()); |
130 | 131 |
|
131 | 132 | mapper = createDocumentMapper(fieldMapping(b -> b.field("type", "wildcard"))); |
132 | 133 | doc = mapper.parse(source(b -> b.field("field", "1234"))); |
@@ -214,7 +215,7 @@ public void testNormalizer() throws IOException { |
214 | 215 | assertEquals(new BytesRef("abc"), fields[1].binaryValue()); |
215 | 216 | fieldType = fields[1].fieldType(); |
216 | 217 | assertEquals(IndexOptions.NONE, fieldType.indexOptions()); |
217 | | - assertEquals(DocValuesType.SORTED_SET, fieldType.docValuesType()); |
| 218 | + assertEquals(DocValuesType.BINARY, fieldType.docValuesType()); |
218 | 219 | } |
219 | 220 |
|
220 | 221 | public void testNullValue() throws IOException { |
@@ -251,7 +252,7 @@ public void testNullValue() throws IOException { |
251 | 252 | ); |
252 | 253 | assertEquals(new BytesRef("uri"), fields[1].binaryValue()); |
253 | 254 | assertEquals(IndexOptions.NONE, fields[1].fieldType().indexOptions()); |
254 | | - assertEquals(DocValuesType.SORTED_SET, fields[1].fieldType().docValuesType()); |
| 255 | + assertEquals(DocValuesType.BINARY, fields[1].fieldType().docValuesType()); |
255 | 256 | } |
256 | 257 |
|
257 | 258 | public void testDefaults() throws Exception { |
@@ -386,7 +387,7 @@ private Document createDocument(WildcardFieldMapper mapper, String value) throws |
386 | 387 | NamedAnalyzer normalizer = mapper.fieldType().normalizer(); |
387 | 388 | value = normalizeValue(normalizer, FIELD_NAME, value); |
388 | 389 | final BytesRef binaryValue = new BytesRef(value); |
389 | | - doc.add(new SortedSetDocValuesField(FIELD_NAME, binaryValue)); |
| 390 | + doc.add(new BinaryDocValuesField(FIELD_NAME, binaryValue)); |
390 | 391 | return doc; |
391 | 392 | } |
392 | 393 | } |
0 commit comments