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.
json, elasticsearch, elasticsearch5, elasticsearch6, elasticsearch7, elasticsearch8, put, index, record
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, and whether a property supports the NiFi Expression Language.
Display Name | API Name | Default Value | Allowable Values | Description |
---|---|---|---|---|
Document Id | get-es-id | The _id of the document to retrieve. Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) | ||
Index | el-rest-fetch-index | The name of the index to use. Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) | ||
Type | el-rest-type | The type of this document (used by Elasticsearch for indexing and searching). Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) | ||
Destination | get-es-destination | FlowFile Content |
| Indicates whether the retrieved document is written to the FlowFile content or a FlowFile attribute. |
Attribute Name | get-es-attribute-name | elasticsearch.doc | The name of the FlowFile attribute to use for the retrieved document output. Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) This Property is only considered if the [Destination] Property has a value of "FlowFile Attribute". | |
Client Service | el-rest-client-service | Controller Service API: ElasticSearchClientService Implementation: ElasticSearchClientServiceImpl | An Elasticsearch client service to use for running queries. |
Supports Sensitive Dynamic Properties: No
Dynamic Properties allow the user to specify both the name and value of a property.
Name | Value | Description |
---|---|---|
The name of a URL query parameter to add | The value of the URL query parameter | Adds the specified property name/value as a query parameter in the Elasticsearch URL used for processing. Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) |
Name | Description |
---|---|
retry | All flowfiles that fail due to server/cluster availability go to this relationship. |
document | Fetched documents are routed to this relationship. |
not_found | A FlowFile is routed to this relationship if the specified document does not exist in the Elasticsearch cluster. |
failure | All flowfiles that fail for reasons unrelated to server availability go to this relationship. |
Name | Description |
---|---|
filename | The filename attribute is set to the document identifier |
elasticsearch.index | The Elasticsearch index containing the document |
elasticsearch.type | The Elasticsearch document type |
elasticsearch.get.error | The error message provided by Elasticsearch if there is an error fetching the document. |