[ 
https://issues.apache.org/jira/browse/NIFI-10304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vijaya Gorla updated NIFI-10304:
--------------------------------
    Description:     (was: When GetElasticsearch processor has an incoming 
connection, and the document id is an expression, this results in expression 
evaluating to null when the processor runs without a flow file. This in turn 
results in elasticsearch GET api being invoked without an ID and elastic 
throwing an error.

Also noticed that other processors handle this scenario by short-circuiting at 
the beginning of onTrigger method

{code:java}
        FlowFile input = null;
        if (context.hasIncomingConnection()) {
            input = session.get();

            // If we have no FlowFile, and all incoming connections are 
self-loops then we can continue on.
            // However, if we have no FlowFile and we have connections coming 
from other Processors, then
            // we know that we should run only if we have a FlowFile.
            if (input == null && context.hasNonLoopConnection()) {
                return;
            }
        }
{code}

However GetElasticsearch  does not.
)

> SearchElasticsearch behaves differently to ScrollElasticsearchHttp, the 
> processor it replaces
> ---------------------------------------------------------------------------------------------
>
>                 Key: NIFI-10304
>                 URL: https://issues.apache.org/jira/browse/NIFI-10304
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.16.3
>            Reporter: Vijaya Gorla
>            Priority: Major
>              Labels: elasticsearch
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to