Class BulkRequestParser

java.lang.Object
org.elasticsearch.action.bulk.BulkRequestParser

public final class BulkRequestParser extends Object
Helper to parse bulk requests. This should be considered an internal class.
  • Constructor Details

    • BulkRequestParser

      public BulkRequestParser(boolean deprecateOrErrorOnType, org.elasticsearch.core.RestApiVersion restApiVersion)
      Create a new parser.
      Parameters:
      deprecateOrErrorOnType - whether to allow _type information in the index line; used by BulkMonitoring
      restApiVersion -
  • 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, BiConsumer<IndexRequest,​String> indexRequestConsumer, Consumer<UpdateRequest> updateRequestConsumer, Consumer<DeleteRequest> deleteRequestConsumer) throws IOException
      Parse the provided data assuming the provided default values. Index requests will be passed to the indexRequestConsumer, update requests to the updateRequestConsumer and delete requests to the deleteRequestConsumer.
      Throws:
      IOException