blob: 4b57dd0a2f575536c9e0ebe8aaed8b9db351ef3f [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>GetElasticsearch</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;">GetElasticsearch</h1><h2>Description: </h2><p>Elasticsearch get processor that uses the official Elastic REST client libraries to fetch a single document from Elasticsearch by _id. Note that the full body of the document will be read into memory before being written to a FlowFile for transfer.</p><h3>Tags: </h3><p>json, elasticsearch, elasticsearch5, elasticsearch6, elasticsearch7, elasticsearch8, put, index, record</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>Document Id</strong></td><td>get-es-id</td><td></td><td id="allowable-values"></td><td id="description">The _id of the document to retrieve.<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>el-rest-fetch-index</td><td></td><td id="allowable-values"></td><td id="description">The name of the index to use.<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>el-rest-type</td><td></td><td id="allowable-values"></td><td id="description">The type of this document (used by Elasticsearch for indexing and searching).<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>Destination</strong></td><td>get-es-destination</td><td id="default-value">FlowFile Content</td><td id="allowable-values"><ul><li>FlowFile Content <img src="../../../../../html/images/iconInfo.png" alt="Output the retrieved document as the FlowFile content." title="Output the retrieved document as the FlowFile content."></img></li><li>FlowFile Attribute <img src="../../../../../html/images/iconInfo.png" alt="Output the retrieved document as a FlowFile attribute specified by the Attribute Name." title="Output the retrieved document as a FlowFile attribute specified by the Attribute Name."></img></li></ul></td><td id="description">Indicates whether the retrieved document is written to the FlowFile content or a FlowFile attribute.</td></tr><tr><td id="name"><strong>Attribute Name</strong></td><td>get-es-attribute-name</td><td id="default-value">elasticsearch.doc</td><td id="allowable-values"></td><td id="description">The name of the FlowFile attribute to use for the retrieved document output.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong><br/><br/><strong>This Property is only considered if </strong><strong>the [Destination] Property has a value of "FlowFile Attribute".</strong></td></tr><tr><td id="name"><strong>Client Service</strong></td><td>el-rest-client-service</td><td></td><td id="allowable-values"><strong>Controller Service API: </strong><br/>ElasticSearchClientService<br/><strong>Implementation: </strong><a href="../../../nifi-elasticsearch-client-service-nar/1.19.1/org.apache.nifi.elasticsearch.ElasticSearchClientServiceImpl/index.html">ElasticSearchClientServiceImpl</a></td><td id="description">An Elasticsearch client service to use for running queries.</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">The name of a URL query parameter to add</td><td id="value">The value of the URL query parameter</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 flow file attributes and variable registry)</strong></td></tr></table></p><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>retry</td><td>All flowfiles that fail due to server/cluster availability go to this relationship.</td></tr><tr><td>document</td><td>Fetched documents are routed to this relationship.</td></tr><tr><td>not_found</td><td>A FlowFile is routed to this relationship if the specified document does not exist in the Elasticsearch cluster.</td></tr><tr><td>failure</td><td>All flowfiles that fail for reasons unrelated to server availability go to this relationship.</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>elasticsearch.index</td><td>The Elasticsearch index containing the document</td></tr><tr><td>elasticsearch.type</td><td>The Elasticsearch document type</td></tr><tr><td>elasticsearch.get.error</td><td>The error message provided by Elasticsearch if there is an error fetching the document.</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>