org.elasticsearch.index.get
Class ShardGetService

java.lang.Object
  extended by org.elasticsearch.index.shard.AbstractIndexShardComponent
      extended by org.elasticsearch.index.get.ShardGetService
All Implemented Interfaces:
IndexShardComponent

public class ShardGetService
extends AbstractIndexShardComponent


Field Summary
 
Fields inherited from class org.elasticsearch.index.shard.AbstractIndexShardComponent
componentSettings, indexSettings, logger, shardId
 
Constructor Summary
ShardGetService(ShardId shardId, Settings indexSettings, ScriptService scriptService, MapperService mapperService, IndexCache indexCache)
           
 
Method Summary
 GetResult get(Engine.GetResult engineGetResult, String id, String type, String[] fields)
          Returns GetResult based on the specified Engine.GetResult argument.
 GetResult get(String type, String id, String[] gFields, boolean realtime)
           
 GetResult innerGet(String type, String id, String[] gFields, boolean realtime)
           
 ShardGetService setIndexShard(IndexShard indexShard)
           
 GetStats stats()
           
 
Methods inherited from class org.elasticsearch.index.shard.AbstractIndexShardComponent
indexSettings, managementGroupName, nodeName, shardId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShardGetService

@Inject
public ShardGetService(ShardId shardId,
                              @IndexSettings
                              Settings indexSettings,
                              ScriptService scriptService,
                              MapperService mapperService,
                              IndexCache indexCache)
Method Detail

stats

public GetStats stats()

setIndexShard

public ShardGetService setIndexShard(IndexShard indexShard)

get

public GetResult get(String type,
                     String id,
                     String[] gFields,
                     boolean realtime)
              throws ElasticSearchException
Throws:
ElasticSearchException

get

public GetResult get(Engine.GetResult engineGetResult,
                     String id,
                     String type,
                     String[] fields)
Returns 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!


innerGet

public GetResult innerGet(String type,
                          String id,
                          String[] gFields,
                          boolean realtime)
                   throws ElasticSearchException
Throws:
ElasticSearchException


Copyright © 2009-2012. All Rights Reserved.