Module org.elasticsearch.xcore
Class IterationResult<JobPosition>
java.lang.Object
org.elasticsearch.xpack.core.indexing.IterationResult<JobPosition>
Result object to hold the result of 1 iteration of iterative indexing.
Acts as an interface between the implementation and the generic indexer.
-
Constructor Summary
ConstructorsConstructorDescriptionIterationResult(Stream<IndexRequest> toIndex, JobPosition position, boolean isDone) Constructor for the result of 1 iteration. -
Method Summary
Modifier and TypeMethodDescriptionReturn the position of the job, a generic to be passed to the next query construction.Stream of requests to be passed to bulk indexing.booleanisDone()Returns true if this indexing iteration is done and job should go into sleep mode.
-
Constructor Details
-
IterationResult
Constructor for the result of 1 iteration.- Parameters:
toIndex- the stream of requests to be indexedposition- the extracted, persistable position of the job required for the search phaseisDone- true if source is exhausted and job should go to sleep Note: toIndex.empty() != isDone due to possible filtering in the specific implementation
-
-
Method Details
-
isDone
public boolean isDone()Returns true if this indexing iteration is done and job should go into sleep mode. -
getPosition
Return the position of the job, a generic to be passed to the next query construction.- Returns:
- the position
-
getToIndex
Stream of requests to be passed to bulk indexing.- Returns:
- Stream of index requests.
-