exceptionfactory commented on code in PR #7195:
URL: https://github.com/apache/nifi/pull/7195#discussion_r1178114045
##########
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/AbstractJsonQueryElasticsearch.java:
##########
@@ -65,7 +65,7 @@
.name("el-rest-split-up-hits")
.displayName("Search Results Split")
.description("Output a flowfile containing all hits or one
flowfile for each individual hit.")
- .allowableValues(ResultOutputStrategy.PER_RESPONSE.getValue(),
ResultOutputStrategy.PER_HIT.getValue())
+
.allowableValues(ResultOutputStrategy.getNonPaginatedResponseOutputStrategies())
Review Comment:
It should be possible to use `ResultOutputStrategy.class`:
```suggestion
.allowableValues(ResultOutputStrategy.class)
```
##########
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/api/ResultOutputStrategy.java:
##########
@@ -52,6 +53,10 @@ public String getDescription() {
return description;
}
+ public static EnumSet<ResultOutputStrategy>
getNonPaginatedResponseOutputStrategies() {
+ return EnumSet.of(PER_RESPONSE, PER_HIT);
+ }
Review Comment:
Using the Class reference to `ResultOutputStrategy` should obviate the need
for this method.
--
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]