public class ShardGetService extends AbstractIndexShardComponent
componentSettings, indexSettings, logger, shardId
Constructor and Description |
---|
ShardGetService(ShardId shardId,
Settings indexSettings,
ScriptService scriptService,
MapperService mapperService,
IndexFieldDataService fieldDataService) |
Modifier and Type | Method and Description |
---|---|
GetResult |
get(Engine.GetResult engineGetResult,
String id,
String type,
String[] fields,
FetchSourceContext fetchSourceContext,
boolean ignoreErrorsOnGeneratedFields)
Returns
GetResult based on the specified Engine.GetResult argument. |
GetResult |
get(String type,
String id,
String[] gFields,
boolean realtime,
long version,
VersionType versionType,
FetchSourceContext fetchSourceContext,
boolean ignoreErrorsOnGeneratedFields) |
GetResult |
innerGet(String type,
String id,
String[] gFields,
boolean realtime,
long version,
VersionType versionType,
FetchSourceContext fetchSourceContext,
boolean ignoreErrorsOnGeneratedFields) |
protected FetchSourceContext |
normalizeFetchSourceContent(FetchSourceContext context,
String[] gFields)
decides what needs to be done based on the request input and always returns a valid non-null FetchSourceContext
|
ShardGetService |
setIndexShard(IndexShard indexShard) |
protected boolean |
shouldGetFromSource(boolean ignoreErrorsOnGeneratedFields,
DocumentMapper docMapper,
FieldMapper<?> fieldMapper) |
GetStats |
stats() |
indexSettings, nodeName, shardId
@Inject public ShardGetService(ShardId shardId, @IndexSettings Settings indexSettings, ScriptService scriptService, MapperService mapperService, IndexFieldDataService fieldDataService)
public GetStats stats()
public ShardGetService setIndexShard(IndexShard indexShard)
public GetResult get(String type, String id, String[] gFields, boolean realtime, long version, VersionType versionType, FetchSourceContext fetchSourceContext, boolean ignoreErrorsOnGeneratedFields) throws ElasticsearchException
ElasticsearchException
public GetResult get(Engine.GetResult engineGetResult, String id, String type, String[] fields, FetchSourceContext fetchSourceContext, boolean ignoreErrorsOnGeneratedFields)
GetResult
based on the specified Engine.GetResult
argument.
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!protected FetchSourceContext normalizeFetchSourceContent(@Nullable FetchSourceContext context, @Nullable String[] gFields)
public GetResult innerGet(String type, String id, String[] gFields, boolean realtime, long version, VersionType versionType, FetchSourceContext fetchSourceContext, boolean ignoreErrorsOnGeneratedFields) throws ElasticsearchException
ElasticsearchException
protected boolean shouldGetFromSource(boolean ignoreErrorsOnGeneratedFields, DocumentMapper docMapper, FieldMapper<?> fieldMapper)
Copyright © 2009–2015. All rights reserved.