blob: cd845682efa2b5c5fa23ab0a7341a6e777a33e1d [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>QueryElasticsearchHttp</title><link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css"></link></head><script type="text/javascript">window.onload = function(){if(self==top) { document.getElementById('nameHeader').style.display = "inherit"; } }</script><body><h1 id="nameHeader" style="display: none;">QueryElasticsearchHttp</h1><h2>Deprecation notice: </h2><p>This processor is deprecated and may be removed in future releases.</p><p>Please consider using one the following alternatives: <a href="../../../nifi-elasticsearch-restapi-nar/1.19.1/org.apache.nifi.processors.elasticsearch.PaginatedJsonQueryElasticsearch/index.html">PaginatedJsonQueryElasticsearch</a></p><h2>Description: </h2><p>Queries Elasticsearch using the specified connection properties. Note that the full body of each page of documents will be read into memory before being written to Flow Files for transfer. Also note that the Elasticsearch max_result_window index setting is the upper bound on the number of records that can be retrieved using this query. To retrieve more records, use the ScrollElasticsearchHttp processor.</p><h3>Tags: </h3><p>elasticsearch, query, read, get, http</p><h3>Properties: </h3><p>In the list below, the names of required properties appear in <strong>bold</strong>. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the <a href="../../../../../html/expression-language-guide.html">NiFi Expression Language</a>.</p><table id="properties"><tr><th>Display Name</th><th>API Name</th><th>Default Value</th><th>Allowable Values</th><th>Description</th></tr><tr><td id="name"><strong>Elasticsearch URL</strong></td><td>elasticsearch-http-url</td><td></td><td id="allowable-values"></td><td id="description">Elasticsearch URL which will be connected to, including scheme (http, e.g.), host, and port. The default port for the REST API is 9200.<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name">SSL Context Service</td><td>SSL Context Service</td><td></td><td id="allowable-values"><strong>Controller Service API: </strong><br/>SSLContextService<br/><strong>Implementations: </strong><a href="../../../nifi-ssl-context-service-nar/1.19.1/org.apache.nifi.ssl.StandardRestrictedSSLContextService/index.html">StandardRestrictedSSLContextService</a><br/><a href="../../../nifi-ssl-context-service-nar/1.19.1/org.apache.nifi.ssl.StandardSSLContextService/index.html">StandardSSLContextService</a></td><td id="description">The SSL Context Service used to provide client certificate information for TLS/SSL connections. This service only applies if the Elasticsearch endpoint(s) have been secured with TLS/SSL.</td></tr><tr><td id="name"><strong>Character Set</strong></td><td>Character Set</td><td id="default-value">UTF-8</td><td id="allowable-values"></td><td id="description">Specifies the character set of the document data.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Username</td><td>Username</td><td></td><td id="allowable-values"></td><td id="description">Username to access the Elasticsearch cluster<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name">Password</td><td>Password</td><td></td><td id="allowable-values"></td><td id="description">Password to access the Elasticsearch cluster<br/><strong>Sensitive Property: true</strong><br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>Connection Timeout</strong></td><td>elasticsearch-http-connect-timeout</td><td id="default-value">5 secs</td><td id="allowable-values"></td><td id="description">Max wait time for the connection to the Elasticsearch REST API.<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>Response Timeout</strong></td><td>elasticsearch-http-response-timeout</td><td id="default-value">15 secs</td><td id="allowable-values"></td><td id="description">Max wait time for a response from the Elasticsearch REST API.<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name">Proxy Configuration Service</td><td>proxy-configuration-service</td><td></td><td id="allowable-values"><strong>Controller Service API: </strong><br/>ProxyConfigurationService<br/><strong>Implementation: </strong><a href="../../../nifi-proxy-configuration-nar/1.19.1/org.apache.nifi.proxy.StandardProxyConfigurationService/index.html">StandardProxyConfigurationService</a></td><td id="description">Specifies the Proxy Configuration Controller Service to proxy network requests. If set, it supersedes proxy settings configured per component. Supported proxies: HTTP + AuthN, SOCKS In case of SOCKS, it is not guaranteed that the selected SOCKS Version will be used by the processor.</td></tr><tr><td id="name">Proxy Host</td><td>elasticsearch-http-proxy-host</td><td></td><td id="allowable-values"></td><td id="description">The fully qualified hostname or IP address of the proxy server<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name">Proxy Port</td><td>elasticsearch-http-proxy-port</td><td></td><td id="allowable-values"></td><td id="description">The port of the proxy server<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name">Proxy Username</td><td>proxy-username</td><td></td><td id="allowable-values"></td><td id="description">Proxy Username<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name">Proxy Password</td><td>proxy-password</td><td></td><td id="allowable-values"></td><td id="description">Proxy Password<br/><strong>Sensitive Property: true</strong><br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>Query</strong></td><td>query-es-query</td><td></td><td id="allowable-values"></td><td id="description">The Lucene-style query to run against ElasticSearch (e.g., genre:blues AND -artist:muddy)<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>Page Size</strong></td><td>query-es-size</td><td id="default-value">20</td><td id="allowable-values"></td><td id="description">Determines how many documents to return per page during scrolling.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>Index</strong></td><td>query-es-index</td><td></td><td id="allowable-values"></td><td id="description">The name of the index to read from. If the property is unset or set to _all, the query will match across all indexes.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Type</td><td>query-es-type</td><td></td><td id="allowable-values"></td><td id="description">The type of document (if unset, the query will be against all types in the _index). This should be unset or '_doc' for Elasticsearch 7.0+.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Fields</td><td>query-es-fields</td><td></td><td id="allowable-values"></td><td id="description">A comma-separated list of fields to retrieve from the document. If the Fields property is left blank, then the entire document's source will be retrieved.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Sort</td><td>query-es-sort</td><td></td><td id="allowable-values"></td><td id="description">A sort parameter (e.g., timestamp:asc). If the Sort property is left blank, then the results will be retrieved in document order.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Limit</td><td>query-es-limit</td><td></td><td id="allowable-values"></td><td id="description">If set, limits the number of results that will be returned.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>Target</strong></td><td>query-es-target</td><td id="default-value">Flow file content</td><td id="allowable-values"><ul><li>Flow file content</li><li>Flow file attributes</li></ul></td><td id="description">Indicates where the results should be placed. In the case of 'Flow file content', the JSON response will be written as the content of the flow file. In the case of 'Flow file attributes', the original flow file (if applicable) will be cloned for each result, and all return fields will be placed in a flow file attribute of the same name, but prefixed by 'es.result.'</td></tr><tr><td id="name">Routing Strategy for Query Info</td><td>routing-query-info-strategy</td><td id="default-value">Never</td><td id="allowable-values"><ul><li>Always <img src="../../../../../html/images/iconInfo.png" alt="Always route Query Info" title="Always route Query Info"></img></li><li>Never <img src="../../../../../html/images/iconInfo.png" alt="Never route Query Info" title="Never route Query Info"></img></li><li>No Hits <img src="../../../../../html/images/iconInfo.png" alt="Route Query Info if the Query returns no hits" title="Route Query Info if the Query returns no hits"></img></li><li>Append as Attributes <img src="../../../../../html/images/iconInfo.png" alt="Always append Query Info as attributes, using the existing relationships (does not add the Query Info relationship)." title="Always append Query Info as attributes, using the existing relationships (does not add the Query Info relationship)."></img></li></ul></td><td id="description">Specifies when to generate and route Query Info after a successful query</td></tr></table><h3>Dynamic Properties: </h3><p>Supports Sensitive Dynamic Properties: <strong>No</strong></p><p>Dynamic Properties allow the user to specify both the name and value of a property.<table id="dynamic-properties"><tr><th>Name</th><th>Value</th><th>Description</th></tr><tr><td id="name">A URL query parameter</td><td id="value">The value to set it to</td><td>Adds the specified property name/value as a query parameter in the Elasticsearch URL used for processing<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr></table></p><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>retry</td><td>A FlowFile is routed to this relationship if the document cannot be fetched but attempting the operation again may succeed. Note that if the processor has no incoming connections, flow files may still be sent to this relationship based on the processor properties and the results of the fetch operation.</td></tr><tr><td>success</td><td>All FlowFiles that are read from Elasticsearch are routed to this relationship.</td></tr><tr><td>failure</td><td>All FlowFiles that cannot be read from Elasticsearch are routed to this relationship. Note that only incoming flow files will be routed to failure.</td></tr></table><h3>Reads Attributes: </h3>None specified.<h3>Writes Attributes: </h3><table id="writes-attributes"><tr><th>Name</th><th>Description</th></tr><tr><td>filename</td><td>The filename attribute is set to the document identifier</td></tr><tr><td>es.query.hitcount</td><td>The number of hits for a query</td></tr><tr><td>es.id</td><td>The Elasticsearch document identifier</td></tr><tr><td>es.index</td><td>The Elasticsearch index containing the document</td></tr><tr><td>es.query.url</td><td>The Elasticsearch query that was built</td></tr><tr><td>es.type</td><td>The Elasticsearch document type</td></tr><tr><td>es.result.*</td><td>If Target is 'Flow file attributes', the JSON attributes of each result will be placed into corresponding attributes with this prefix.</td></tr></table><h3>State management: </h3>This component does not store state.<h3>Restricted: </h3>This component is not restricted.<h3>Input requirement: </h3>This component allows an incoming relationship.<h3>System Resource Considerations:</h3>None specified.</body></html>