This is an automated email from the ASF dual-hosted git repository.
pvillard pushed a commit to branch support/nifi-1.x
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/support/nifi-1.x by this push:
new 54030bfe11 NIFI-12254 clarify Bulk operation header documentation for
PutElasticsearchRecord and PutElasticsearchJson processors
54030bfe11 is described below
commit 54030bfe11fecee83fc402b04274fe5a478d2c4d
Author: Chris Sampson <[email protected]>
AuthorDate: Fri Oct 20 00:04:52 2023 +0100
NIFI-12254 clarify Bulk operation header documentation for
PutElasticsearchRecord and PutElasticsearchJson processors
Signed-off-by: Pierre Villard <[email protected]>
This closes #7912.
---
.../apache/nifi/processors/elasticsearch/PutElasticsearchJson.java | 4 +++-
.../nifi/processors/elasticsearch/PutElasticsearchRecord.java | 7 +++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git
a/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchJson.java
b/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchJson.java
index 1038b83e95..c4cdc166a5 100644
---
a/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchJson.java
+++
b/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchJson.java
@@ -58,7 +58,8 @@ import java.util.stream.Collectors;
@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED)
@Tags({"json", "elasticsearch", "elasticsearch5", "elasticsearch6",
"elasticsearch7", "elasticsearch8", "put", "index"})
-@CapabilityDescription("An Elasticsearch put processor that uses the official
Elastic REST client libraries.")
+@CapabilityDescription("An Elasticsearch put processor that uses the official
Elastic REST client libraries. " +
+ "Each FlowFile is treated as a document to be sent to the
Elasticsearch _bulk API. Multiple FlowFiles can be batched together into each
Request sent to Elasticsearch.")
@WritesAttributes({
@WritesAttribute(attribute = "elasticsearch.put.error",
description = "The error message if there is an issue parsing
the FlowFile, sending the parsed document to Elasticsearch or parsing the
Elasticsearch response"),
@@ -72,6 +73,7 @@ import java.util.stream.Collectors;
expressionLanguageScope =
ExpressionLanguageScope.FLOWFILE_ATTRIBUTES,
description = "Prefix: " +
AbstractPutElasticsearch.BULK_HEADER_PREFIX +
" - adds the specified property name/value as a Bulk
request header in the Elasticsearch Bulk API body used for processing. " +
+ "If the value is null or blank, the Bulk header will
be omitted for the document operation. " +
"These parameters will override any matching
parameters in the _bulk request body."),
@DynamicProperty(
name = "The name of a URL query parameter to add",
diff --git
a/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchRecord.java
b/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchRecord.java
index 442d9d70d0..f6be9c9e6b 100644
---
a/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchRecord.java
+++
b/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchRecord.java
@@ -86,7 +86,9 @@ import java.util.stream.Collectors;
@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED)
@Tags({"json", "elasticsearch", "elasticsearch5", "elasticsearch6",
"elasticsearch7", "elasticsearch8", "put", "index", "record"})
-@CapabilityDescription("A record-aware Elasticsearch put processor that uses
the official Elastic REST client libraries.")
+@CapabilityDescription("A record-aware Elasticsearch put processor that uses
the official Elastic REST client libraries. " +
+ "Each Record within the FlowFile is converted into a document to be
sent to the Elasticsearch _bulk APi. " +
+ "Multiple documents can be batched into each Request sent to
Elasticsearch. Each document's Bulk operation can be configured using Record
Path expressions.")
@WritesAttributes({
@WritesAttribute(attribute = "elasticsearch.put.error",
description = "The error message if there is an issue parsing
the FlowFile records, sending the parsed documents to Elasticsearch or parsing
the Elasticsearch response."),
@@ -98,10 +100,11 @@ import java.util.stream.Collectors;
@DynamicProperties({
@DynamicProperty(
name = "The name of the Bulk request header",
- value = "The value of the Bulk request header",
+ value = "A Record Path expression to retrieve the Bulk request
header value",
expressionLanguageScope =
ExpressionLanguageScope.FLOWFILE_ATTRIBUTES,
description = "Prefix: " +
AbstractPutElasticsearch.BULK_HEADER_PREFIX +
" - adds the specified property name/value as a Bulk
request header in the Elasticsearch Bulk API body used for processing. " +
+ "If the Record Path expression results in a null or
blank value, the Bulk header will be omitted for the document operation. " +
"These parameters will override any matching
parameters in the _bulk request body."),
@DynamicProperty(
name = "The name of a URL query parameter to add",