blob: bea53a6b7245dd6ec9a29b6eb717af6152bb3782 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>PutElasticsearchJson</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;">PutElasticsearchJson</h1><h2>Description: </h2><p>An Elasticsearch put processor that uses the official Elastic REST client libraries.</p><p><a href="additionalDetails.html">Additional Details...</a></p><h3>Tags: </h3><p>json, elasticsearch, elasticsearch5, elasticsearch6, elasticsearch7, elasticsearch8, put, index</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">Identifier Attribute</td><td>put-es-json-id-attr</td><td></td><td id="allowable-values"></td><td id="description">The name of the FlowFile attribute containing the identifier for the document. If the Index Operation is "index", this property may be left empty or evaluate to an empty value, in which case the document's identifier will be auto-generated by Elasticsearch. For all other Index Operations, the attribute must evaluate to a non-empty value.</td></tr><tr><td id="name"><strong>Index Operation</strong></td><td>put-es-record-index-op</td><td id="default-value">index</td><td id="allowable-values"></td><td id="description">The type of the operation used to index (create, delete, index, update, upsert)<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>Batch Size</strong></td><td>put-es-record-batch-size</td><td id="default-value">100</td><td id="allowable-values"></td><td id="description">The preferred number of FlowFiles to send over in a single batch.<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>Character Set</strong></td><td>put-es-json-charset</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"><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><tr><td id="name">Log Error Responses</td><td>put-es-record-log-error-responses</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">If this is enabled, errors will be logged to the NiFi logs at the error log level. Otherwise, they will only be logged if debug logging is enabled on NiFi as a whole. The purpose of this option is to give the user the ability to debug failed operations without having to turn on debug logging.</td></tr><tr><td id="name"><strong>Output Error Documents</strong></td><td>put-es-json-error-documents</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">If this configuration property is true, the response from Elasticsearch will be examined for failed documents and the FlowFile(s) associated with the failed document(s) will be sent to the "errors" relationship.</td></tr><tr><td id="name">Treat "Not Found" as Error</td><td>put-es-json-not_found-is-error</td><td id="default-value">true</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">If true, "not_found" Elasticsearch Document associated FlowFiles will be routed to the "success" relationship, otherwise to the "errors" relationship.<br/><br/><strong>This Property is only considered if </strong><strong>the [Output Error Documents] Property has a value of "true".</strong></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. These parameters will override any matching parameters in the _bulk request body. If FlowFiles are batched, only the first FlowFile in the batch is used to evaluate property values.<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>success</td><td>All flowfiles that succeed in being transferred into Elasticsearch go here. Documents received by the Elasticsearch _bulk API may still result in errors on the Elasticsearch side. The Elasticsearch response will need to be examined to determine whether any Document(s)/Record(s) resulted in errors.</td></tr><tr><td>failure</td><td>All flowfiles that fail for reasons unrelated to server availability go to this relationship.</td></tr><tr><td>errors</td><td>If a "Output Error Documents" is set, any FlowFile(s) corresponding to Elasticsearch document(s) that resulted in an "error" (within Elasticsearch) will be routed here.</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>elasticsearch.put.error</td><td>The error message provided by Elasticsearch if there is an error indexing 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 requires an incoming relationship.<h3>System Resource Considerations:</h3><table id="system-resource-considerations"><tr><th>Resource</th><th>Description</th></tr><tr><td>MEMORY</td><td>The Batch of FlowFiles will be stored in memory until the bulk operation is performed.</td></tr></table></body></html>