[
https://issues.apache.org/jira/browse/NIFI-3576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16419722#comment-16419722
]
Otto Fowler commented on NIFI-3576:
-----------------------------------
{code:java}
if ( (hits.size() == 0 && queryInfoRouteStrategy ==
QueryInfoRouteStrategy.NOHIT)
|| queryInfoRouteStrategy == QueryInfoRouteStrategy.ALWAYS) {
FlowFile queryInfo = flowFile == null ? session.create() :
session.create(flowFile);
session.putAttribute(queryInfo, "es.query.url", url.toExternalForm());
session.putAttribute(queryInfo, "es.query.hitCount",
String.valueOf(hits.size()));
session.putAttribute(queryInfo, MIME_TYPE.key(), "application/json");
session.importFrom(new ByteArrayInputStream(bodyBytes),queryInfo);
}
{code}
like that
> QueryElasticsearchHttp should have a "Not Found"/"Zero results" relationship
> ----------------------------------------------------------------------------
>
> Key: NIFI-3576
> URL: https://issues.apache.org/jira/browse/NIFI-3576
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Joseph Percivall
> Assignee: Otto Fowler
> Priority: Minor
>
> In the event of a successful call, QueryElasticsearchHttp always drops the
> incoming flowfile and then emits pages of results to the success
> relationship. If the search returns no results then no pages of results are
> emitted to the success relationship.
> The processor should offer other options for handling when there are no
> results returned.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)