Skip to content

Commit ebede78

Browse files
committed
Fix KeywordFieldBlockLoaderTests
1 parent fcd7c9f commit ebede78

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -380,15 +380,9 @@ tests:
380380
- class: org.elasticsearch.search.CCSDuelIT
381381
method: testTerminateAfter
382382
issue: https://github.com/elastic/elasticsearch/issues/126085
383-
- class: org.elasticsearch.index.mapper.blockloader.KeywordFieldBlockLoaderTests
384-
method: testBlockLoaderForFieldInObject {preference=Params[syntheticSource=false, preference=DOC_VALUES]}
385-
issue: https://github.com/elastic/elasticsearch/issues/126088
386383
- class: org.elasticsearch.search.sort.GeoDistanceIT
387384
method: testDistanceSortingWithUnmappedField
388385
issue: https://github.com/elastic/elasticsearch/issues/126118
389-
- class: org.elasticsearch.index.mapper.blockloader.KeywordFieldBlockLoaderTests
390-
method: testBlockLoader {preference=Params[syntheticSource=false, preference=DOC_VALUES]}
391-
issue: https://github.com/elastic/elasticsearch/issues/126121
392386
- class: org.elasticsearch.search.basic.SearchWithRandomDisconnectsIT
393387
method: testSearchWithRandomDisconnects
394388
issue: https://github.com/elastic/elasticsearch/issues/122707

server/src/test/java/org/elasticsearch/index/mapper/blockloader/KeywordFieldBlockLoaderTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ protected Object expected(Map<String, Object> fieldMapping, Object value, TestCo
4646
.filter(Objects::nonNull);
4747

4848
boolean hasDocValues = hasDocValues(fieldMapping, false);
49-
boolean useDocValues = params.preference() == MappedFieldType.FieldExtractPreference.NONE || params.syntheticSource();
49+
boolean useDocValues = params.preference() == MappedFieldType.FieldExtractPreference.NONE
50+
|| params.preference() == MappedFieldType.FieldExtractPreference.DOC_VALUES
51+
|| params.syntheticSource();
5052
if (hasDocValues && useDocValues) {
5153
// Sorted and no duplicates
5254
var resultList = convertValues.andThen(Stream::distinct)

0 commit comments

Comments
 (0)