java.lang.Object
org.elasticsearch.action.bulk.BulkRequestParser
Helper to parse bulk requests. This should be considered an internal class.
-
Constructor Summary
ConstructorDescriptionBulkRequestParser
(boolean deprecateOrErrorOnType, RestApiVersion restApiVersion) Create a new parser. -
Method Summary
Modifier and TypeMethodDescriptionvoid
parse
(BytesReference data, String defaultIndex, String defaultRouting, FetchSourceContext defaultFetchSourceContext, String defaultPipeline, Boolean defaultRequireAlias, Boolean defaultRequireDataStream, Boolean defaultListExecutedPipelines, boolean allowExplicitIndex, XContentType xContentType, BiConsumer<IndexRequest, String> indexRequestConsumer, Consumer<UpdateRequest> updateRequestConsumer, Consumer<DeleteRequest> deleteRequestConsumer) Parse the provideddata
assuming the provided default values.
-
Constructor Details
-
BulkRequestParser
Create a new parser.- Parameters:
deprecateOrErrorOnType
- whether to allow _type information in the index line; used by BulkMonitoringrestApiVersion
-
-
-
Method Details
-
parse
public void parse(BytesReference data, @Nullable String defaultIndex, @Nullable String defaultRouting, @Nullable FetchSourceContext defaultFetchSourceContext, @Nullable String defaultPipeline, @Nullable Boolean defaultRequireAlias, @Nullable Boolean defaultRequireDataStream, @Nullable Boolean defaultListExecutedPipelines, boolean allowExplicitIndex, XContentType xContentType, BiConsumer<IndexRequest, String> indexRequestConsumer, Consumer<UpdateRequest> updateRequestConsumer, Consumer<DeleteRequest> deleteRequestConsumer) throws IOExceptionParse the provideddata
assuming the provided default values. Index requests will be passed to theindexRequestConsumer
, update requests to theupdateRequestConsumer
and delete requests to thedeleteRequestConsumer
.- Throws:
IOException
-