Package org.elasticsearch.action.bulk
Class BulkRequestParser
java.lang.Object
org.elasticsearch.action.bulk.BulkRequestParser
Helper to parse bulk requests. This should be considered an internal class.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
parse(BytesReference data, String defaultIndex, String defaultType, String defaultRouting, FetchSourceContext defaultFetchSourceContext, String defaultPipeline, Boolean defaultRequireAlias, boolean allowExplicitIndex, org.elasticsearch.common.xcontent.XContentType xContentType, Consumer<IndexRequest> indexRequestConsumer, Consumer<UpdateRequest> updateRequestConsumer, Consumer<DeleteRequest> deleteRequestConsumer)
Deprecated.void
parse(BytesReference data, String defaultIndex, String defaultRouting, FetchSourceContext defaultFetchSourceContext, String defaultPipeline, Boolean defaultRequireAlias, boolean allowExplicitIndex, org.elasticsearch.common.xcontent.XContentType xContentType, Consumer<IndexRequest> indexRequestConsumer, Consumer<UpdateRequest> updateRequestConsumer, Consumer<DeleteRequest> deleteRequestConsumer)
Parse the provideddata
assuming the provided default values.
-
Constructor Details
-
BulkRequestParser
public BulkRequestParser(boolean warnOnTypeUsage)Create a new parser.- Parameters:
warnOnTypeUsage
- whether it warns upon types being explicitly specified
-
-
Method Details
-
parse
public void parse(BytesReference data, @Nullable String defaultIndex, @Nullable String defaultRouting, @Nullable FetchSourceContext defaultFetchSourceContext, @Nullable String defaultPipeline, @Nullable Boolean defaultRequireAlias, boolean allowExplicitIndex, org.elasticsearch.common.xcontent.XContentType xContentType, Consumer<IndexRequest> 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
-
parse
@Deprecated public void parse(BytesReference data, @Nullable String defaultIndex, @Nullable String defaultType, @Nullable String defaultRouting, @Nullable FetchSourceContext defaultFetchSourceContext, @Nullable String defaultPipeline, @Nullable Boolean defaultRequireAlias, boolean allowExplicitIndex, org.elasticsearch.common.xcontent.XContentType xContentType, Consumer<IndexRequest> indexRequestConsumer, Consumer<UpdateRequest> updateRequestConsumer, Consumer<DeleteRequest> deleteRequestConsumer) throws IOExceptionDeprecated.Parse 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
-
parse(BytesReference, String, String, FetchSourceContext, String, Boolean, boolean, XContentType, Consumer, Consumer, Consumer)
instead.