Package org.elasticsearch.ingest
Class Pipeline
java.lang.Object
org.elasticsearch.ingest.Pipeline
A pipeline is a list of
Processor
instances grouped under a unique id.-
Field Summary
-
Constructor Summary
ConstructorDescriptionPipeline(String id, String description, Integer version, CompoundProcessor compoundProcessor)
-
Method Summary
Modifier and TypeMethodDescriptionstatic Pipeline
create(String id, Map<String,Object> config, Map<String,Processor.Factory> processorFactories, ScriptService scriptService)
void
execute(IngestDocument ingestDocument, BiConsumer<IngestDocument,Exception> handler)
Modifies the data of a document to be indexed based on the processor this pipeline holds Ifnull
is returned then this document will be dropped and not indexed, otherwise this document will be kept and indexed.Flattens the normal and on failure processors into a single list.Get the underlyingCompoundProcessor
containing the Pipeline's processorsAn optional description of what this pipeline is doing to the data gets processed by this pipeline.getId()
The unique id of this pipelineorg.elasticsearch.ingest.IngestMetric
The metrics associated with this pipeline.Unmodifiable list containing each on_failure processor that operates on the data in case of exception thrown in pipeline processorsUnmodifiable list containing each processor that operates on the data.An optional version stored with the pipeline so that it can be used to determine if the pipeline should be updated / replaced.
-
Field Details
-
DESCRIPTION_KEY
- See Also:
- Constant Field Values
-
PROCESSORS_KEY
- See Also:
- Constant Field Values
-
VERSION_KEY
- See Also:
- Constant Field Values
-
ON_FAILURE_KEY
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Pipeline
public Pipeline(String id, @Nullable String description, @Nullable Integer version, CompoundProcessor compoundProcessor)
-
-
Method Details
-
create
public static Pipeline create(String id, Map<String,Object> config, Map<String,Processor.Factory> processorFactories, ScriptService scriptService) throws Exception- Throws:
Exception
-
execute
Modifies the data of a document to be indexed based on the processor this pipeline holds Ifnull
is returned then this document will be dropped and not indexed, otherwise this document will be kept and indexed. -
getId
The unique id of this pipeline -
getDescription
An optional description of what this pipeline is doing to the data gets processed by this pipeline. -
getVersion
An optional version stored with the pipeline so that it can be used to determine if the pipeline should be updated / replaced.- Returns:
null
if not supplied.
-
getCompoundProcessor
Get the underlyingCompoundProcessor
containing the Pipeline's processors -
getProcessors
Unmodifiable list containing each processor that operates on the data. -
getOnFailureProcessors
Unmodifiable list containing each on_failure processor that operates on the data in case of exception thrown in pipeline processors -
flattenAllProcessors
Flattens the normal and on failure processors into a single list. The original order is lost. This can be useful for pipeline validation purposes. -
getMetrics
public org.elasticsearch.ingest.IngestMetric getMetrics()The metrics associated with this pipeline.
-