Skip to content

Commit 7b9b790

Browse files
authored
Merge branch 'main' into mtv2
2 parents 298162b + e785661 commit 7b9b790

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,6 @@ tests:
537537
- class: org.elasticsearch.compute.data.BasicBlockTests
538538
method: testFloatBlock
539539
issue: https://github.com/elastic/elasticsearch/issues/133621
540-
- class: org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT
541-
method: test {csv-spec:inlinestats.EvalBeforeDoubleInlinestats1}
542-
issue: https://github.com/elastic/elasticsearch/issues/133729
543540
- class: org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT
544541
method: test
545542
issue: https://github.com/elastic/elasticsearch/issues/133077

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

Lines changed: 9 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;
@@ -25,6 +26,7 @@
2526
import org.elasticsearch.index.mapper.IdFieldMapper;
2627
import org.elasticsearch.index.mapper.Mapper;
2728
import org.elasticsearch.index.mapper.MapperService;
29+
import org.elasticsearch.index.mapper.SeqNoFieldMapper;
2830
import org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapper;
2931

3032
/**
@@ -33,6 +35,8 @@
3335
*/
3436
public class PerFieldFormatSupplier {
3537

38+
private static final FeatureFlag SEQNO_FIELD_USE_TSDB_DOC_VALUES_FORMAT = new FeatureFlag("seqno_field_use_tsdb_doc_values_format");
39+
3640
private static final DocValuesFormat docValuesFormat = new Lucene90DocValuesFormat();
3741
private static final KnnVectorsFormat knnVectorsFormat = new Lucene99HnswVectorsFormat();
3842
private static final ES819TSDBDocValuesFormat tsdbDocValuesFormat = new ES819TSDBDocValuesFormat();
@@ -122,9 +126,13 @@ boolean useTSDBDocValuesFormat(final String field) {
122126
}
123127

124128
private boolean excludeFields(String fieldName) {
129+
// TODO: should we just allow all fields to use tsdb doc values codec?
125130
// Avoid using tsdb codec for fields like _seq_no, _primary_term.
126131
// But _tsid and _ts_routing_hash should always use the tsdb codec.
127-
return fieldName.startsWith("_") && fieldName.equals("_tsid") == false && fieldName.equals("_ts_routing_hash") == false;
132+
return fieldName.startsWith("_")
133+
&& fieldName.equals("_tsid") == false
134+
&& fieldName.equals("_ts_routing_hash") == false
135+
&& (SEQNO_FIELD_USE_TSDB_DOC_VALUES_FORMAT.isEnabled() && fieldName.equals(SeqNoFieldMapper.NAME) == false);
128136
}
129137

130138
private boolean isTimeSeriesModeIndex() {

0 commit comments

Comments
 (0)