|
8 | 8 |
|
9 | 9 | import org.apache.lucene.search.FieldExistsQuery; |
10 | 10 | import org.apache.lucene.search.Query; |
11 | | -import org.elasticsearch.cluster.metadata.IndexMetadata; |
12 | 11 | import org.elasticsearch.common.Strings; |
13 | 12 | import org.elasticsearch.core.CheckedConsumer; |
14 | | -import org.elasticsearch.index.IndexMode; |
15 | | -import org.elasticsearch.index.IndexSettings; |
16 | | -import org.elasticsearch.index.IndexVersions; |
17 | 13 | import org.elasticsearch.index.mapper.DocumentMapper; |
18 | 14 | import org.elasticsearch.index.mapper.DocumentParsingException; |
19 | | -import org.elasticsearch.index.mapper.IndexType; |
20 | 15 | import org.elasticsearch.index.mapper.LuceneDocument; |
21 | 16 | import org.elasticsearch.index.mapper.MappedFieldType; |
22 | 17 | import org.elasticsearch.index.mapper.Mapper; |
|
25 | 20 | import org.elasticsearch.index.mapper.MapperTestCase; |
26 | 21 | import org.elasticsearch.index.mapper.ParsedDocument; |
27 | 22 | import org.elasticsearch.plugins.Plugin; |
28 | | -import org.elasticsearch.test.index.IndexVersionUtils; |
29 | 23 | import org.elasticsearch.xcontent.XContentBuilder; |
30 | 24 | import org.elasticsearch.xcontent.XContentFactory; |
31 | 25 | import org.elasticsearch.xcontent.json.JsonXContent; |
@@ -632,42 +626,6 @@ protected List<SortShortcutSupport> getSortShortcutSupport() { |
632 | 626 |
|
633 | 627 | @Override |
634 | 628 | protected boolean supportsDocValuesSkippers() { |
635 | | - return false; // can't configure `index` so normal test doesn't work |
636 | | - } |
637 | | - |
638 | | - public void testIndexTypes() throws Exception { |
639 | | - { |
640 | | - var indexSettings = getIndexSettingsBuilder().put(IndexSettings.MODE.getKey(), IndexMode.TIME_SERIES.getName()) |
641 | | - .put(IndexMetadata.INDEX_ROUTING_PATH.getKey(), "dimension_field") |
642 | | - .build(); |
643 | | - MapperService mapperService = createMapperService(indexSettings, fieldMapping(this::minimalMapping)); |
644 | | - MappedFieldType ft = mapperService.fieldType("field"); |
645 | | - assertIndexType(ft, IndexType.skippers()); |
646 | | - } |
647 | | - { |
648 | | - var oldVersion = IndexVersionUtils.randomPreviousCompatibleVersion(random(), IndexVersions.STANDARD_INDEXES_USE_SKIPPERS); |
649 | | - MapperService mapperService = createMapperService(oldVersion, fieldMapping(this::minimalMapping)); |
650 | | - MappedFieldType ft = mapperService.fieldType("field"); |
651 | | - assertIndexType(ft, IndexType.points(true, true)); |
652 | | - } |
653 | | - { |
654 | | - MapperService mapperService = createMapperService( |
655 | | - IndexVersions.STANDARD_INDEXES_USE_SKIPPERS, |
656 | | - fieldMapping(this::minimalMapping) |
657 | | - ); |
658 | | - MappedFieldType ft = mapperService.fieldType("field"); |
659 | | - assertIndexType(ft, IndexType.skippers()); |
660 | | - } |
661 | | - } |
662 | | - |
663 | | - private void assertIndexType(MappedFieldType ft, IndexType indexType) { |
664 | | - assertThat(ft, instanceOf(AggregateMetricDoubleFieldMapper.AggregateMetricDoubleFieldType.class)); |
665 | | - AggregateMetricDoubleFieldMapper.AggregateMetricDoubleFieldType aft = |
666 | | - (AggregateMetricDoubleFieldMapper.AggregateMetricDoubleFieldType) ft; |
667 | | - assertThat(aft.indexType(), equalTo(indexType)); |
668 | | - for (MappedFieldType subField : aft.getMetricFields().values()) { |
669 | | - assertThat(subField.indexType(), equalTo(indexType)); |
670 | | - } |
| 629 | + return false; |
671 | 630 | } |
672 | | - |
673 | 631 | } |
0 commit comments