You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ChrisSamo632 (via GitHub)" <gi...@apache.org> on 2025/03/17 17:10:29 UTC

Re: [PR] [NIFI-10304] [NIFI-14351] Added a config item to SearchElasticsearch processor to control if the processor restarts on query finish. Also removed query expiration for SEARCH_AFTER pagination type [nifi]

ChrisSamo632 commented on code in PR #9806:
URL: https://github.com/apache/nifi/pull/9806#discussion_r1999263953


##########
nifi-extension-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/SearchElasticsearch.java:
##########
@@ -88,26 +90,40 @@ public class SearchElasticsearch extends AbstractPaginatedJsonQueryElasticsearch
     static final String STATE_PAGE_EXPIRATION_TIMESTAMP = "pageExpirationTimestamp";
     static final String STATE_PAGE_COUNT = "pageCount";
     static final String STATE_HIT_COUNT = "hitCount";
+    static final String STATE_FINISHED = "finished";
 
     static final PropertyDescriptor QUERY = new PropertyDescriptor.Builder().fromPropertyDescriptor(ElasticsearchRestProcessor.QUERY)
             .description("A query in JSON syntax, not Lucene syntax. Ex: {\"query\":{\"match\":{\"somefield\":\"somevalue\"}}}. " +
                     "If the query is empty, a default JSON Object will be used, which will result in a \"match_all\" query in Elasticsearch.")
             .build();
 
-    private static final Set<Relationship> relationships = Set.of(REL_HITS, REL_AGGREGATIONS);
+    static final PropertyDescriptor RESTART_ON_FINISH = new PropertyDescriptor.Builder()

Review Comment:
   `ConsumeElasticsearch` already satisfies this use case I think, is this additional property and logic achieving anything different?



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org