Class IngestRequest
- All Implemented Interfaces:
JsonpSerializable
This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch.
The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. No data is indexed into Elasticsearch. Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result.
This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index.
By default, the pipeline definitions that are currently in the system are used. However, you can supply substitute pipeline definitions in the body of the request. These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<IngestRequest>Json deserializer forIngestRequeststatic final Endpoint<IngestRequest,IngestResponse, ErrorResponse> Endpoint "simulate.ingest". -
Method Summary
Modifier and TypeMethodDescriptionfinal Map<String,ComponentTemplateNode> A map of component template names to substitute component template definition objects.docs()Required - Sample documents to test in the pipeline.final Stringindex()The index to simulate ingesting into.final Map<String,IndexTemplate> A map of index template names to substitute index template definition objects.final TypeMappingAPI name:mapping_additionfinal MergeTypeThe mapping merge type if mapping overrides are being provided in mapping_addition.static IngestRequestfinal Stringpipeline()The pipeline to use as the default pipeline.Pipelines to test.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidMethods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forIngestRequest -
_ENDPOINT
Endpoint "simulate.ingest".
-
-
Method Details
-
of
-
componentTemplateSubstitutions
A map of component template names to substitute component template definition objects.API name:
component_template_substitutions -
docs
Required - Sample documents to test in the pipeline.API name:
docs -
index
The index to simulate ingesting into. This value can be overridden by specifying an index on each document. If you specify this parameter in the request path, it is used for any documents that do not explicitly specify an index argument.API name:
index -
indexTemplateSubstitutions
A map of index template names to substitute index template definition objects.API name:
index_template_substitutions -
mappingAddition
API name:mapping_addition -
mergeType
The mapping merge type if mapping overrides are being provided in mapping_addition. The allowed values are one of index or template. The index option merges mappings the way they would be merged into an existing index. The template option merges mappings the way they would be merged into a template.API name:
merge_type -
pipeline
The pipeline to use as the default pipeline. This value can be used to override the default pipeline of the index.API name:
pipeline -
pipelineSubstitutions
Pipelines to test. If you don’t specify thepipelinerequest path parameter, this parameter is required. If you specify both this and the request path parameter, the API only uses the request path parameter.API name:
pipeline_substitutions -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupIngestRequestDeserializer
-