org.elasticsearch.index.shard.service
Interface IndexShard
- All Superinterfaces:
- CloseableComponent, IndexShardComponent
- All Known Implementing Classes:
- InternalIndexShard
@ThreadSafe
public interface IndexShard
- extends IndexShardComponent, CloseableComponent
Method Summary |
long |
count(float minScore,
byte[] querySource,
java.lang.String queryParserName,
java.lang.String... types)
|
ParsedDocument |
create(java.lang.String type,
java.lang.String id,
byte[] source)
|
void |
delete(java.lang.String type,
java.lang.String id)
|
void |
delete(org.apache.lucene.index.Term uid)
|
void |
deleteByQuery(byte[] querySource,
java.lang.String queryParserName,
java.lang.String... types)
|
SizeValue |
estimateFlushableMemorySize()
Returns the estimated flushable memory size. |
void |
flush(Engine.Flush flush)
|
byte[] |
get(java.lang.String type,
java.lang.String id)
|
boolean |
ignoreRecoveryAttempt()
Returns true if this shard can ignore a recovery attempt made to it (since the already doing/done it) |
ParsedDocument |
index(java.lang.String type,
java.lang.String id,
byte[] source)
|
void |
optimize(Engine.Optimize optimize)
|
void |
recover(Engine.RecoveryHandler recoveryHandler)
|
void |
refresh(Engine.Refresh refresh)
|
ShardRouting |
routingEntry()
|
Engine.Searcher |
searcher()
|
|
snapshot(Engine.SnapshotHandler<T> snapshotHandler)
|
IndexShardState |
state()
|
routingEntry
ShardRouting routingEntry()
state
IndexShardState state()
estimateFlushableMemorySize
SizeValue estimateFlushableMemorySize()
throws ElasticSearchException
- Returns the estimated flushable memory size. Returns null if not available.
- Throws:
ElasticSearchException
create
ParsedDocument create(java.lang.String type,
java.lang.String id,
byte[] source)
throws ElasticSearchException
- Throws:
ElasticSearchException
index
ParsedDocument index(java.lang.String type,
java.lang.String id,
byte[] source)
throws ElasticSearchException
- Throws:
ElasticSearchException
delete
void delete(java.lang.String type,
java.lang.String id)
delete
void delete(org.apache.lucene.index.Term uid)
deleteByQuery
void deleteByQuery(byte[] querySource,
@Nullable
java.lang.String queryParserName,
java.lang.String... types)
throws ElasticSearchException
- Throws:
ElasticSearchException
get
byte[] get(java.lang.String type,
java.lang.String id)
throws ElasticSearchException
- Throws:
ElasticSearchException
count
long count(float minScore,
byte[] querySource,
@Nullable
java.lang.String queryParserName,
java.lang.String... types)
throws ElasticSearchException
- Throws:
ElasticSearchException
refresh
void refresh(Engine.Refresh refresh)
throws ElasticSearchException
- Throws:
ElasticSearchException
flush
void flush(Engine.Flush flush)
throws ElasticSearchException
- Throws:
ElasticSearchException
optimize
void optimize(Engine.Optimize optimize)
throws ElasticSearchException
- Throws:
ElasticSearchException
snapshot
<T> T snapshot(Engine.SnapshotHandler<T> snapshotHandler)
throws EngineException
- Throws:
EngineException
recover
void recover(Engine.RecoveryHandler recoveryHandler)
throws EngineException
- Throws:
EngineException
searcher
Engine.Searcher searcher()
ignoreRecoveryAttempt
boolean ignoreRecoveryAttempt()
- Returns true if this shard can ignore a recovery attempt made to it (since the already doing/done it)