java.lang.Object
org.elasticsearch.search.lookup.SearchLookup
-
Constructor Summary
ConstructorDescriptionSearchLookup
(Function<String, MappedFieldType> fieldTypeLookup, TriFunction<MappedFieldType, Supplier<SearchLookup>, MappedFieldType.FielddataOperation, IndexFieldData<?>> fieldDataLookup, SourceLookup.SourceProvider sourceProvider) Create the top level field lookup for a search request. -
Method Summary
Modifier and TypeMethodDescriptionfinal SearchLookup
Creates a copy of the currentSearchLookup
that looks fields up in the same way, but also tracks field references in order to detect cycles and prevent resolving fields that depend on more thanMAX_FIELD_CHAIN_DEPTH
other fields.getForField
(MappedFieldType fieldType, MappedFieldType.FielddataOperation options) getLeafSearchLookup
(org.apache.lucene.index.LeafReaderContext context) source()
-
Constructor Details
-
SearchLookup
public SearchLookup(Function<String, MappedFieldType> fieldTypeLookup, TriFunction<MappedFieldType, Supplier<SearchLookup>, MappedFieldType.FielddataOperation, IndexFieldData<?>> fieldDataLookup, SourceLookup.SourceProvider sourceProvider) Create the top level field lookup for a search request. Provides a way to look up fields from doc_values, stored fields, or _source.
-
-
Method Details
-
forkAndTrackFieldReferences
Creates a copy of the currentSearchLookup
that looks fields up in the same way, but also tracks field references in order to detect cycles and prevent resolving fields that depend on more thanMAX_FIELD_CHAIN_DEPTH
other fields.- Parameters:
field
- the field being referred to, for which fielddata needs to be loaded- Returns:
- the new lookup
- Throws:
IllegalArgumentException
- if a cycle is detected in the fields required to build doc values, or if the field being resolved depends on more thanMAX_FIELD_CHAIN_DEPTH
-
getLeafSearchLookup
-
fieldType
-
getForField
public IndexFieldData<?> getForField(MappedFieldType fieldType, MappedFieldType.FielddataOperation options) -
source
-