Skip to content

Commit f769821

Browse files
javannanik9000
andauthored
Pass SearchLookup supplier through to fielddataBuilder (#61430) (#61638)
Runtime fields need to have a SearchLookup available, when building their fielddata implementations, so that they can look up other fields, runtime or not. To achieve that, we add a Supplier<SearchLookup> argument to the existing MappedFieldType#fielddataBuilder method. As we introduce the ability to look up other fields while building fielddata for mapped fields, we implicitly add the ability for a field to require other fields. This requires some protection mechanism that detects dependency cycles to prevent stack overflow errors. With this commit we also introduce detection for cycles, as well as a limit on the depth of the references for a runtime field. Note that we also plan on introducing cycles detection at compile time, so the runtime cycles detection is a last resort to prevent stack overflow errors but we hope that we can reject runtime fields from being registered in the mappings when they create a cycle in their definition. Note that this commit does not introduce any production implementation of runtime fields, but is rather a pre-requisite to merge the runtime fields feature branch. This is a breaking change for MapperPlugins that plug in a mapper, as the signature of MappedFieldType#fielddataBuilder changes from taking a single argument (the index name), to also accept a Supplier<SearchLookup>. Relates to #59332 Co-authored-by: Nik Everett <[email protected]>
1 parent 05aaa2e commit f769821

File tree

55 files changed

+567
-145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+567
-145
lines changed

modules/lang-expression/src/test/java/org/elasticsearch/script/expression/ExpressionFieldScriptTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
package org.elasticsearch.script.expression;
2121

22-
import org.elasticsearch.index.fielddata.LeafNumericFieldData;
2322
import org.elasticsearch.index.fielddata.IndexNumericFieldData;
23+
import org.elasticsearch.index.fielddata.LeafNumericFieldData;
2424
import org.elasticsearch.index.fielddata.SortedNumericDoubleValues;
2525
import org.elasticsearch.index.mapper.MapperService;
2626
import org.elasticsearch.index.mapper.NumberFieldMapper;
@@ -64,7 +64,7 @@ public void setUp() throws Exception {
6464
when(fieldData.load(anyObject())).thenReturn(atomicFieldData);
6565

6666
service = new ExpressionScriptEngine();
67-
lookup = new SearchLookup(mapperService, ignored -> fieldData, null);
67+
lookup = new SearchLookup(mapperService, (ignored, lookup) -> fieldData, null);
6868
}
6969

7070
private FieldScript.LeafFactory compile(String expression) {

modules/lang-expression/src/test/java/org/elasticsearch/script/expression/ExpressionNumberSortScriptTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void setUp() throws Exception {
6363
when(fieldData.load(anyObject())).thenReturn(atomicFieldData);
6464

6565
service = new ExpressionScriptEngine();
66-
lookup = new SearchLookup(mapperService, ignored -> fieldData, null);
66+
lookup = new SearchLookup(mapperService, (ignored, lookup) -> fieldData, null);
6767
}
6868

6969
private NumberSortScript.LeafFactory compile(String expression) {

modules/lang-expression/src/test/java/org/elasticsearch/script/expression/ExpressionTermsSetQueryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void setUp() throws Exception {
6363
when(fieldData.load(anyObject())).thenReturn(atomicFieldData);
6464

6565
service = new ExpressionScriptEngine();
66-
lookup = new SearchLookup(mapperService, ignored -> fieldData, null);
66+
lookup = new SearchLookup(mapperService, (ignored, lookup) -> fieldData, null);
6767
}
6868

6969
private TermsSetQueryScript.LeafFactory compile(String expression) {

modules/lang-painless/src/test/java/org/elasticsearch/painless/NeedsScoreTests.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.elasticsearch.painless.spi.Whitelist;
2626
import org.elasticsearch.script.NumberSortScript;
2727
import org.elasticsearch.script.ScriptContext;
28-
import org.elasticsearch.search.lookup.SearchLookup;
2928
import org.elasticsearch.test.ESSingleNodeTestCase;
3029

3130
import java.util.Collections;
@@ -47,23 +46,21 @@ public void testNeedsScores() {
4746
PainlessScriptEngine service = new PainlessScriptEngine(Settings.EMPTY, contexts);
4847

4948
QueryShardContext shardContext = index.newQueryShardContext(0, null, () -> 0, null);
50-
SearchLookup lookup = new SearchLookup(index.mapperService(), shardContext::getForField, null);
5149

5250
NumberSortScript.Factory factory = service.compile(null, "1.2", NumberSortScript.CONTEXT, Collections.emptyMap());
53-
NumberSortScript.LeafFactory ss = factory.newFactory(Collections.emptyMap(), lookup);
51+
NumberSortScript.LeafFactory ss = factory.newFactory(Collections.emptyMap(), shardContext.lookup());
5452
assertFalse(ss.needs_score());
5553

5654
factory = service.compile(null, "doc['d'].value", NumberSortScript.CONTEXT, Collections.emptyMap());
57-
ss = factory.newFactory(Collections.emptyMap(), lookup);
55+
ss = factory.newFactory(Collections.emptyMap(), shardContext.lookup());
5856
assertFalse(ss.needs_score());
5957

6058
factory = service.compile(null, "1/_score", NumberSortScript.CONTEXT, Collections.emptyMap());
61-
ss = factory.newFactory(Collections.emptyMap(), lookup);
59+
ss = factory.newFactory(Collections.emptyMap(), shardContext.lookup());
6260
assertTrue(ss.needs_score());
6361

6462
factory = service.compile(null, "doc['d'].value * _score", NumberSortScript.CONTEXT, Collections.emptyMap());
65-
ss = factory.newFactory(Collections.emptyMap(), lookup);
63+
ss = factory.newFactory(Collections.emptyMap(), shardContext.lookup());
6664
assertTrue(ss.needs_score());
6765
}
68-
6966
}

modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/RankFeatureFieldMapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@
3131
import org.elasticsearch.common.xcontent.support.XContentMapValues;
3232
import org.elasticsearch.index.fielddata.IndexFieldData;
3333
import org.elasticsearch.index.query.QueryShardContext;
34+
import org.elasticsearch.search.lookup.SearchLookup;
3435

3536
import java.io.IOException;
3637
import java.util.Iterator;
3738
import java.util.List;
3839
import java.util.Map;
40+
import java.util.function.Supplier;
3941

4042
/**
4143
* A {@link FieldMapper} that exposes Lucene's {@link FeatureField}.
@@ -118,7 +120,7 @@ public Query existsQuery(QueryShardContext context) {
118120
}
119121

120122
@Override
121-
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) {
123+
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName, Supplier<SearchLookup> searchLookup) {
122124
throw new IllegalArgumentException("[rank_feature] fields do not support sorting, scripting or aggregating");
123125
}
124126

modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/RankFeaturesFieldMapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@
2727
import org.elasticsearch.common.xcontent.XContentParser.Token;
2828
import org.elasticsearch.index.fielddata.IndexFieldData;
2929
import org.elasticsearch.index.query.QueryShardContext;
30+
import org.elasticsearch.search.lookup.SearchLookup;
3031

3132
import java.io.IOException;
3233
import java.util.List;
3334
import java.util.Map;
35+
import java.util.function.Supplier;
3436

3537
/**
3638
* A {@link FieldMapper} that exposes Lucene's {@link FeatureField} as a sparse
@@ -91,7 +93,7 @@ public Query existsQuery(QueryShardContext context) {
9193
}
9294

9395
@Override
94-
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) {
96+
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName, Supplier<SearchLookup> searchLookup) {
9597
throw new IllegalArgumentException("[rank_features] fields do not support sorting, scripting or aggregating");
9698
}
9799

modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/ScaledFloatFieldMapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import org.elasticsearch.index.query.QueryShardContext;
4949
import org.elasticsearch.search.DocValueFormat;
5050
import org.elasticsearch.search.aggregations.support.ValuesSourceType;
51+
import org.elasticsearch.search.lookup.SearchLookup;
5152

5253
import java.io.IOException;
5354
import java.math.BigDecimal;
@@ -57,6 +58,7 @@
5758
import java.util.Collections;
5859
import java.util.List;
5960
import java.util.Map;
61+
import java.util.function.Supplier;
6062

6163
/** A {@link FieldMapper} for scaled floats. Values are internally multiplied
6264
* by a scaling factor and rounded to the closest long. */
@@ -216,7 +218,7 @@ public Query rangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower
216218
}
217219

218220
@Override
219-
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) {
221+
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName, Supplier<SearchLookup> searchLookup) {
220222
failIfNoDocValues();
221223
return (cache, breakerService, mapperService) -> {
222224
final IndexNumericFieldData scaledValues = new SortedNumericIndexFieldData.Builder(

modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/ScaledFloatFieldTypeTests.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ public void testFieldData() throws IOException {
150150
// single-valued
151151
ScaledFloatFieldMapper.ScaledFloatFieldType f1
152152
= new ScaledFloatFieldMapper.ScaledFloatFieldType("scaled_float1", scalingFactor);
153-
IndexNumericFieldData fielddata = (IndexNumericFieldData) f1.fielddataBuilder("index").build(null, null, null);
153+
IndexNumericFieldData fielddata = (IndexNumericFieldData) f1.fielddataBuilder("index", () -> {
154+
throw new UnsupportedOperationException();
155+
}).build(null, null, null);
154156
assertEquals(fielddata.getNumericType(), IndexNumericFieldData.NumericType.DOUBLE);
155157
LeafNumericFieldData leafFieldData = fielddata.load(reader.leaves().get(0));
156158
SortedNumericDoubleValues values = leafFieldData.getDoubleValues();
@@ -161,7 +163,9 @@ public void testFieldData() throws IOException {
161163
// multi-valued
162164
ScaledFloatFieldMapper.ScaledFloatFieldType f2
163165
= new ScaledFloatFieldMapper.ScaledFloatFieldType("scaled_float2", scalingFactor);
164-
fielddata = (IndexNumericFieldData) f2.fielddataBuilder("index").build(null, null, null);
166+
fielddata = (IndexNumericFieldData) f2.fielddataBuilder("index", () -> {
167+
throw new UnsupportedOperationException();
168+
}).build(null, null, null);
165169
leafFieldData = fielddata.load(reader.leaves().get(0));
166170
values = leafFieldData.getDoubleValues();
167171
assertTrue(values.advanceExact(0));

modules/parent-join/src/main/java/org/elasticsearch/join/mapper/MetaJoinFieldMapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@
3333
import org.elasticsearch.index.mapper.ValueFetcher;
3434
import org.elasticsearch.index.query.QueryShardContext;
3535
import org.elasticsearch.search.aggregations.support.CoreValuesSourceType;
36+
import org.elasticsearch.search.lookup.SearchLookup;
3637

3738
import java.io.IOException;
3839
import java.util.Collections;
3940
import java.util.List;
41+
import java.util.function.Supplier;
4042

4143
/**
4244
* Simple field mapper hack to ensure that there is a one and only {@link ParentJoinFieldMapper} per mapping.
@@ -90,7 +92,7 @@ public String typeName() {
9092
}
9193

9294
@Override
93-
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) {
95+
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName, Supplier<SearchLookup> searchLookup) {
9496
failIfNoDocValues();
9597
return new SortedSetOrdinalsIndexFieldData.Builder(name(), CoreValuesSourceType.BYTES);
9698
}

modules/parent-join/src/main/java/org/elasticsearch/join/mapper/ParentIdFieldMapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@
4343
import org.elasticsearch.index.mapper.ValueFetcher;
4444
import org.elasticsearch.index.query.QueryShardContext;
4545
import org.elasticsearch.search.aggregations.support.CoreValuesSourceType;
46+
import org.elasticsearch.search.lookup.SearchLookup;
4647

4748
import java.io.IOException;
4849
import java.util.Collection;
4950
import java.util.List;
5051
import java.util.Map;
5152
import java.util.Set;
53+
import java.util.function.Supplier;
5254

5355
/**
5456
* A field mapper used internally by the {@link ParentJoinFieldMapper} to index
@@ -108,7 +110,7 @@ public String typeName() {
108110
}
109111

110112
@Override
111-
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) {
113+
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName, Supplier<SearchLookup> searchLookup) {
112114
failIfNoDocValues();
113115
return new SortedSetOrdinalsIndexFieldData.Builder(name(), CoreValuesSourceType.BYTES);
114116
}

modules/parent-join/src/main/java/org/elasticsearch/join/mapper/ParentJoinFieldMapper.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,21 @@
3434
import org.elasticsearch.index.fielddata.IndexFieldData;
3535
import org.elasticsearch.index.fielddata.plain.SortedSetOrdinalsIndexFieldData;
3636
import org.elasticsearch.index.mapper.ContentPath;
37-
import org.elasticsearch.index.mapper.MappingLookup;
3837
import org.elasticsearch.index.mapper.DocumentMapper;
3938
import org.elasticsearch.index.mapper.FieldMapper;
4039
import org.elasticsearch.index.mapper.MappedFieldType;
4140
import org.elasticsearch.index.mapper.Mapper;
4241
import org.elasticsearch.index.mapper.MapperParsingException;
4342
import org.elasticsearch.index.mapper.MapperService;
43+
import org.elasticsearch.index.mapper.MappingLookup;
4444
import org.elasticsearch.index.mapper.ParseContext;
4545
import org.elasticsearch.index.mapper.SourceValueFetcher;
4646
import org.elasticsearch.index.mapper.StringFieldType;
4747
import org.elasticsearch.index.mapper.TextSearchInfo;
4848
import org.elasticsearch.index.mapper.ValueFetcher;
4949
import org.elasticsearch.index.query.QueryShardContext;
5050
import org.elasticsearch.search.aggregations.support.CoreValuesSourceType;
51+
import org.elasticsearch.search.lookup.SearchLookup;
5152

5253
import java.io.IOException;
5354
import java.util.ArrayList;
@@ -58,6 +59,7 @@
5859
import java.util.List;
5960
import java.util.Map;
6061
import java.util.Set;
62+
import java.util.function.Supplier;
6163

6264
/**
6365
* A {@link FieldMapper} that creates hierarchical joins (parent-join) between documents in the same index.
@@ -218,7 +220,7 @@ public String typeName() {
218220
}
219221

220222
@Override
221-
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) {
223+
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName, Supplier<SearchLookup> searchLookup) {
222224
failIfNoDocValues();
223225
return new SortedSetOrdinalsIndexFieldData.Builder(name(), CoreValuesSourceType.BYTES);
224226
}

modules/percolator/src/main/java/org/elasticsearch/percolator/PercolateQueryBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,8 @@ public BitSetProducer bitsetFilter(Query query) {
725725
@Override
726726
@SuppressWarnings("unchecked")
727727
public <IFD extends IndexFieldData<?>> IFD getForField(MappedFieldType fieldType) {
728-
IndexFieldData.Builder builder = fieldType.fielddataBuilder(shardContext.getFullyQualifiedIndex().getName());
728+
IndexFieldData.Builder builder = fieldType.fielddataBuilder(shardContext.getFullyQualifiedIndex().getName(),
729+
shardContext::lookup);
729730
IndexFieldDataCache cache = new IndexFieldDataCache.None();
730731
CircuitBreakerService circuitBreaker = new NoneCircuitBreakerService();
731732
return (IFD) builder.build(cache, circuitBreaker, shardContext.getMapperService());

plugins/analysis-icu/src/main/java/org/elasticsearch/index/mapper/ICUCollationKeywordFieldMapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import org.elasticsearch.index.query.QueryShardContext;
4747
import org.elasticsearch.search.DocValueFormat;
4848
import org.elasticsearch.search.aggregations.support.CoreValuesSourceType;
49+
import org.elasticsearch.search.lookup.SearchLookup;
4950

5051
import java.io.IOException;
5152
import java.time.ZoneId;
@@ -54,6 +55,7 @@
5455
import java.util.List;
5556
import java.util.Map;
5657
import java.util.Objects;
58+
import java.util.function.Supplier;
5759

5860
public class ICUCollationKeywordFieldMapper extends FieldMapper {
5961

@@ -105,7 +107,7 @@ public Query existsQuery(QueryShardContext context) {
105107
}
106108

107109
@Override
108-
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) {
110+
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName, Supplier<SearchLookup> searchLookup) {
109111
failIfNoDocValues();
110112
return new SortedSetOrdinalsIndexFieldData.Builder(name(), CoreValuesSourceType.BYTES);
111113
}

plugins/mapper-murmur3/src/main/java/org/elasticsearch/index/mapper/murmur3/Murmur3FieldMapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@
4242
import org.elasticsearch.index.mapper.ValueFetcher;
4343
import org.elasticsearch.index.query.QueryShardContext;
4444
import org.elasticsearch.index.query.QueryShardException;
45+
import org.elasticsearch.search.lookup.SearchLookup;
4546

4647
import java.io.IOException;
4748
import java.util.List;
4849
import java.util.Map;
50+
import java.util.function.Supplier;
4951

5052
public class Murmur3FieldMapper extends FieldMapper {
5153

@@ -105,7 +107,7 @@ public String typeName() {
105107
}
106108

107109
@Override
108-
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) {
110+
public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName, Supplier<SearchLookup> searchLookup) {
109111
failIfNoDocValues();
110112
return new SortedNumericIndexFieldData.Builder(name(), NumericType.LONG);
111113
}

server/src/main/java/org/elasticsearch/index/IndexService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ public IndexService(
200200
// The sort order is validated right after the merge of the mapping later in the process.
201201
this.indexSortSupplier = () -> indexSettings.getIndexSortConfig().buildIndexSort(
202202
mapperService::fieldType,
203-
indexFieldData::getForField
203+
fieldType -> indexFieldData.getForField(fieldType, indexFieldData.index().getName(), () -> {
204+
throw new UnsupportedOperationException("search lookup not available for index sorting");
205+
})
204206
);
205207
} else {
206208
this.indexSortSupplier = () -> null;

server/src/main/java/org/elasticsearch/index/IndexSortConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public Sort buildIndexSort(Function<String, MappedFieldType> fieldTypeLookup,
202202
try {
203203
fieldData = fieldDataLookup.apply(ft);
204204
} catch (Exception e) {
205-
throw new IllegalArgumentException("docvalues not found for index sort field:[" + sortSpec.field + "]");
205+
throw new IllegalArgumentException("docvalues not found for index sort field:[" + sortSpec.field + "]", e);
206206
}
207207
if (fieldData == null) {
208208
throw new IllegalArgumentException("docvalues not found for index sort field:[" + sortSpec.field + "]");

server/src/main/java/org/elasticsearch/index/IndexWarmer.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ public TerminationHandle warmReader(final IndexShard indexShard, final Elasticse
131131
executor.execute(() -> {
132132
try {
133133
final long start = System.nanoTime();
134-
IndexFieldData.Global ifd = indexFieldDataService.getForField(fieldType);
134+
IndexFieldData.Global<?> ifd = indexFieldDataService.getForField(fieldType,
135+
indexFieldDataService.index().getName(),
136+
() -> {
137+
throw new UnsupportedOperationException("search lookup not available when warming an index");
138+
});
135139
IndexFieldData<?> global = ifd.loadGlobal(reader);
136140
if (reader.leaves().isEmpty() == false) {
137141
global.load(reader.leaves().get(0));

server/src/main/java/org/elasticsearch/index/fielddata/IndexFieldDataService.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import org.elasticsearch.index.shard.ShardId;
3131
import org.elasticsearch.indices.breaker.CircuitBreakerService;
3232
import org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache;
33+
import org.elasticsearch.search.lookup.SearchLookup;
3334

3435
import java.io.Closeable;
3536
import java.io.IOException;
@@ -38,6 +39,7 @@
3839
import java.util.HashMap;
3940
import java.util.List;
4041
import java.util.Map;
42+
import java.util.function.Supplier;
4143

4244
public class IndexFieldDataService extends AbstractIndexComponent implements Closeable {
4345
public static final String FIELDDATA_CACHE_VALUE_NODE = "node";
@@ -106,14 +108,16 @@ public synchronized void clearField(final String fieldName) {
106108
ExceptionsHelper.maybeThrowRuntimeAndSuppress(exceptions);
107109
}
108110

109-
public <IFD extends IndexFieldData<?>> IFD getForField(MappedFieldType fieldType) {
110-
return getForField(fieldType, index().getName());
111-
}
112-
111+
/**
112+
* Returns fielddata for the provided field type, given the provided fully qualified index name, while also making
113+
* a {@link SearchLookup} supplier available that is required for runtime fields.
114+
*/
113115
@SuppressWarnings("unchecked")
114-
public <IFD extends IndexFieldData<?>> IFD getForField(MappedFieldType fieldType, String fullyQualifiedIndexName) {
116+
public <IFD extends IndexFieldData<?>> IFD getForField(MappedFieldType fieldType,
117+
String fullyQualifiedIndexName,
118+
Supplier<SearchLookup> searchLookup) {
115119
final String fieldName = fieldType.name();
116-
IndexFieldData.Builder builder = fieldType.fielddataBuilder(fullyQualifiedIndexName);
120+
IndexFieldData.Builder builder = fieldType.fielddataBuilder(fullyQualifiedIndexName, searchLookup);
117121

118122
IndexFieldDataCache cache;
119123
synchronized (this) {

0 commit comments

Comments
 (0)