Writes the contents of a FlowFile to Elasticsearch, using the specified parameters such as the index to insert into and the type of the document. If the cluster has been configured for authorization and/or secure transport (SSL/TLS) and the Shield plugin is available, secure connections can be made. This processor supports Elasticsearch 2.x clusters.


elasticsearch, insert, update, write, put


In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, whether a property supports the Expression Language Guide, and whether a property is considered “sensitive”, meaning that its value will be encrypted. Before entering a value in a sensitive property, ensure that the file has an entry for the property nifi.sensitive.props.key.

</table> **Relationships:**
Name Default Value Allowable Values Description
Cluster Name elasticsearch Name of the ES cluster (for example, elasticsearch_brew). Defaults to 'elasticsearch'
ElasticSearch Hosts ElasticSearch Hosts, which should be comma separated and colon for hostname/port host1:port,host2:port,.... For example testcluster:9300.
SSL Context Service Controller Service API:SSLContextService
The SSL Context Service used to provide client certificate information for TLS/SSL connections. This service only applies if the Shield plugin is available.
Shield Plugin Filename Specifies the path to the JAR for the Elasticsearch Shield plugin. If the Elasticsearch cluster has been secured with the Shield plugin, then the Shield plugin JAR must also be available to this processor. Note: Do NOT place the Shield JAR into NiFi's lib/ directory, doing so will prevent the Shield plugin from being loaded.
Username Username to access the Elasticsearch cluster
Password Password to access the Elasticsearch cluster
Sensitive Property: true</br></td> </tr>
ElasticSearch Ping Timeout 5s The ping timeout used to determine when a node is unreachable. For example, 5s (5 seconds). If non-local recommended is 30s
Sampler Interval 5s How often to sample / ping the nodes listed and connected. For example, 5s (5 seconds). If non-local recommended is 30s.
Identifier Attribute The name of the attribute containing the identifier for each FlowFile
Index The name of the index to insert into
Supports Expression Language: true
Type The type of this document (used by Elasticsearch for indexing and searching)
Supports Expression Language: true
Character Set UTF-8 Specifies the character set of the document data.
Batch Size 100 The preferred number of FlowFiles to put to the database in a single transaction
Name Description
retry A FlowFile is routed to this relationship if the database cannot be updated but attempting the operation again may succeed
failure All FlowFiles that cannot be written to Elasticsearch are routed to this relationship
success All FlowFiles that are written to Elasticsearch are routed to this relationship
**Reads Attributes:** None specified. **Writes Attributes:** None specified.