gresockj commented on a change in pull request #5665:
URL: https://github.com/apache/nifi/pull/5665#discussion_r811895749



##########
File path: 
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchJson.java
##########
@@ -95,21 +101,28 @@
         .name("put-es-json-error-documents")
         .displayName("Output Error Documents")
         .description("If this configuration property is true, the response 
from Elasticsearch will be examined for failed documents " +
-                "and the failed documents will be sent to the \"errors\" 
relationship.")
+                "and the failed documents will be sent to the \"" + 
REL_FAILED_DOCUMENTS.getName() + "\" relationship.")
         .allowableValues("true", "false")
         .defaultValue("false")
         .expressionLanguageSupported(ExpressionLanguageScope.NONE)
         .required(true)
         .build();
 
-    static final Relationship REL_FAILED_DOCUMENTS = new Relationship.Builder()
-            .name("errors").description("If \"" + 
OUTPUT_ERROR_DOCUMENTS.getDisplayName() + "\" is set, " +
-                    "any FlowFile that failed to process the way it was 
configured will be sent to this relationship " +
-                    "as part of a failed document set.")
-            .autoTerminateDefault(true).build();
+    static final PropertyDescriptor NOT_FOUND_IS_SUCCESSFUL = new 
PropertyDescriptor.Builder()
+        .name("put-es-json-not_found-is-error")
+        .displayName("Treat \"Not Found\" as Error")
+        .description("If true, \"not_found\" Elasticsearch Documents will be 
routed to the \"" + REL_SUCCESS.getName() +
+                "\" (true) or the \"" + REL_FAILED_DOCUMENTS.getName() + "\" 
(false) relationship.")

Review comment:
       Since you already say "if true", I think the (true)/(false) are 
redundant.  Could be: "If true, 'not_found' Elasticsearch Documents will be 
routed to the 'success' relationship, otherwise they will be routed to the 
'errors' relationship"

##########
File path: 
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchRecord.java
##########
@@ -182,17 +202,30 @@
         
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
         .build();
 
-    static final PropertyDescriptor ERROR_RECORD_WRITER = new 
PropertyDescriptor.Builder()
+    static final PropertyDescriptor RESULT_RECORD_WRITER = new 
PropertyDescriptor.Builder()
         .name("put-es-record-error-writer")
-        .displayName("Error Record Writer")
+        .displayName("Result Record Writer")
         .description("If this configuration property is set, the response from 
Elasticsearch will be examined for failed records " +
-                "and the failed records will be written to a record set with 
this record writer service and sent to the \"errors\" " +
-                "relationship.")
+                "and the failed records will be written to a record set with 
this record writer service and sent to the \"" +
+                REL_FAILED_RECORDS.getName() + "\" relationship. Successful 
records will be written to a record set" +
+                "with this record writer service and sent to the \"" + 
REL_SUCCESSFUL_RECORDS.getName() + "\" relationship.")
         .identifiesControllerService(RecordSetWriterFactory.class)
         .addValidator(Validator.VALID)
         .required(false)
         .build();
 
+    static final PropertyDescriptor NOT_FOUND_IS_SUCCESSFUL = new 
PropertyDescriptor.Builder()
+        .name("put-es-record-not_found-is-error")
+        .displayName("Treat \"Not Found\" as Error")
+        .description("If set, \"not_found\" Elasticsearch Documents associated 
Records will be routed to the \"" +

Review comment:
       (same comment as just mentioned above)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to