|
@@ -10,6 +10,7 @@
|
|
|
package org.elasticsearch.index.codec;
|
|
|
|
|
|
import org.apache.lucene.codecs.PostingsFormat;
|
|
|
+import org.apache.lucene.codecs.lucene101.Lucene101PostingsFormat;
|
|
|
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
|
|
import org.elasticsearch.common.compress.CompressedXContent;
|
|
|
import org.elasticsearch.common.settings.Settings;
|
|
@@ -93,7 +94,8 @@ public class PerFieldMapperCodecTests extends ESTestCase {
|
|
|
assertThat(perFieldMapperCodec.getPostingsFormatForField("_id"), instanceOf(ES87BloomFilterPostingsFormat.class));
|
|
|
assertThat(perFieldMapperCodec.useBloomFilter("another_field"), is(false));
|
|
|
|
|
|
- Class<? extends PostingsFormat> expectedPostingsFormat = ES812PostingsFormat.class;
|
|
|
+ Class<? extends PostingsFormat> expectedPostingsFormat = PerFieldFormatSupplier.USE_DEFAULT_LUCENE_POSTINGS_FORMAT.isEnabled()
|
|
|
+ && timeSeries == false ? Lucene101PostingsFormat.class : ES812PostingsFormat.class;
|
|
|
assertThat(perFieldMapperCodec.getPostingsFormatForField("another_field"), instanceOf(expectedPostingsFormat));
|
|
|
}
|
|
|
|
|
@@ -108,7 +110,9 @@ public class PerFieldMapperCodecTests extends ESTestCase {
|
|
|
public void testUseBloomFilterWithTimestampFieldEnabled_noTimeSeriesMode() throws IOException {
|
|
|
PerFieldFormatSupplier perFieldMapperCodec = createFormatSupplier(true, false, false);
|
|
|
assertThat(perFieldMapperCodec.useBloomFilter("_id"), is(false));
|
|
|
- Class<? extends PostingsFormat> expectedPostingsFormat = ES812PostingsFormat.class;
|
|
|
+ Class<? extends PostingsFormat> expectedPostingsFormat = PerFieldFormatSupplier.USE_DEFAULT_LUCENE_POSTINGS_FORMAT.isEnabled()
|
|
|
+ ? Lucene101PostingsFormat.class
|
|
|
+ : ES812PostingsFormat.class;
|
|
|
assertThat(perFieldMapperCodec.getPostingsFormatForField("_id"), instanceOf(expectedPostingsFormat));
|
|
|
}
|
|
|
|