java.lang.Object
org.elasticsearch.index.shard.AbstractIndexShardComponent
org.elasticsearch.index.get.ShardGetService
- All Implemented Interfaces:
IndexShardComponent
-
Field Summary
Fields inherited from class org.elasticsearch.index.shard.AbstractIndexShardComponent
indexSettings, logger, shardId -
Constructor Summary
ConstructorsConstructorDescriptionShardGetService(IndexSettings indexSettings, IndexShard indexShard, MapperService mapperService, MapperMetrics mapperMetrics) -
Method Summary
Modifier and TypeMethodDescriptionget(String id, String[] gFields, boolean realtime, long version, VersionType versionType, FetchSourceContext fetchSourceContext, boolean forceSyntheticSource) get(Engine.GetResult engineGetResult, String id, String[] fields, FetchSourceContext fetchSourceContext) ReturnsGetResultbased on the specifiedEngine.GetResultargument.getForUpdate(String id, long ifSeqNo, long ifPrimaryTerm, String[] gFields) getFromTranslog(String id, String[] gFields, boolean realtime, long version, VersionType versionType, FetchSourceContext fetchSourceContext, boolean forceSyntheticSource) static Tuple<FetchSourceContext, SourceFilter> maybeExcludeSyntheticVectorFields(MappingLookup mappingLookup, IndexSettings indexSettings, FetchSourceContext fetchSourceContext, FetchFieldsContext fetchFieldsContext) Returns aSourceFilterthat excludes vector fields not associated with semantic text fields, unless vectors are explicitly requested to be included in the source.mget(String id, String[] gFields, boolean realtime, long version, VersionType versionType, FetchSourceContext fetchSourceContext, boolean forceSyntheticSource, MultiEngineGet mget) static booleanshouldExcludeVectorsFromSource(IndexSettings indexSettings, FetchSourceContext fetchSourceContext) Determines whether vector fields should be excluded from the source based on theFetchSourceContext.stats()Methods inherited from class org.elasticsearch.index.shard.AbstractIndexShardComponent
indexSettings, shardId
-
Constructor Details
-
ShardGetService
public ShardGetService(IndexSettings indexSettings, IndexShard indexShard, MapperService mapperService, MapperMetrics mapperMetrics)
-
-
Method Details
-
stats
-
get
public GetResult get(String id, String[] gFields, boolean realtime, long version, VersionType versionType, FetchSourceContext fetchSourceContext, boolean forceSyntheticSource) throws IOException - Throws:
IOException
-
mget
public GetResult mget(String id, String[] gFields, boolean realtime, long version, VersionType versionType, FetchSourceContext fetchSourceContext, boolean forceSyntheticSource, MultiEngineGet mget) throws IOException - Throws:
IOException
-
getFromTranslog
public GetResult getFromTranslog(String id, String[] gFields, boolean realtime, long version, VersionType versionType, FetchSourceContext fetchSourceContext, boolean forceSyntheticSource) throws IOException - Throws:
IOException
-
getForUpdate
public GetResult getForUpdate(String id, long ifSeqNo, long ifPrimaryTerm, String[] gFields) throws IOException - Throws:
IOException
-
get
public GetResult get(Engine.GetResult engineGetResult, String id, String[] fields, FetchSourceContext fetchSourceContext) throws IOException ReturnsGetResultbased on the specifiedEngine.GetResultargument. This method basically loads specified fields for the associated document in the engineGetResult. This method load the fields from the Lucene index and not from transaction log and therefore isn't realtime.Note: Call must release engine searcher associated with engineGetResult!
- Throws:
IOException
-
shouldExcludeVectorsFromSource
public static boolean shouldExcludeVectorsFromSource(IndexSettings indexSettings, FetchSourceContext fetchSourceContext) Determines whether vector fields should be excluded from the source based on theFetchSourceContext. Returnstrueif vector fields are explicitly marked to be excluded andfalseotherwise. -
maybeExcludeSyntheticVectorFields
public static Tuple<FetchSourceContext,SourceFilter> maybeExcludeSyntheticVectorFields(MappingLookup mappingLookup, IndexSettings indexSettings, FetchSourceContext fetchSourceContext, FetchFieldsContext fetchFieldsContext) Returns aSourceFilterthat excludes vector fields not associated with semantic text fields, unless vectors are explicitly requested to be included in the source. Returnsnullwhen vectors should not be filtered out.
-