Skip to content

Commit b8416cf

Browse files
committed
added feature flag
1 parent a6cde48 commit b8416cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/src/main/java/org/elasticsearch/index/codec/PerFieldFormatSupplier.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import org.apache.lucene.codecs.lucene90.Lucene90DocValuesFormat;
1616
import org.apache.lucene.codecs.lucene99.Lucene99HnswVectorsFormat;
1717
import org.elasticsearch.common.util.BigArrays;
18+
import org.elasticsearch.common.util.FeatureFlag;
1819
import org.elasticsearch.index.IndexMode;
1920
import org.elasticsearch.index.IndexSettings;
2021
import org.elasticsearch.index.IndexVersions;
@@ -34,6 +35,8 @@
3435
*/
3536
public class PerFieldFormatSupplier {
3637

38+
private static final FeatureFlag SEQNO_FIELD_USE_TSDB_DOC_VALUES_FORMAT = new FeatureFlag("seqno_field_use_tsdb_doc_values_format");
39+
3740
private static final DocValuesFormat docValuesFormat = new Lucene90DocValuesFormat();
3841
private static final KnnVectorsFormat knnVectorsFormat = new Lucene99HnswVectorsFormat();
3942
private static final ES819TSDBDocValuesFormat tsdbDocValuesFormat = new ES819TSDBDocValuesFormat();
@@ -129,7 +132,7 @@ private boolean excludeFields(String fieldName) {
129132
return fieldName.startsWith("_")
130133
&& fieldName.equals("_tsid") == false
131134
&& fieldName.equals("_ts_routing_hash") == false
132-
&& fieldName.equals(SeqNoFieldMapper.NAME) == false;
135+
&& (SEQNO_FIELD_USE_TSDB_DOC_VALUES_FORMAT.isEnabled() && fieldName.equals(SeqNoFieldMapper.NAME) == false);
133136
}
134137

135138
private boolean isTimeSeriesModeIndex() {

0 commit comments

Comments
 (0)