GetElasticsearch
Description
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.
Tags
elasticsearch, elasticsearch5, elasticsearch6, elasticsearch7, elasticsearch8, index, json, put, record
Properties
In the list below required Properties are shown with an asterisk (*). Other properties 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, using FlowFile attributes and Environment variables. | ||
Index * | el-rest-fetch-index | The name of the index to use. Supports Expression Language, using FlowFile attributes and Environment variables. | ||
Type | el-rest-type | The type of this document (used by Elasticsearch for indexing and searching). Supports Expression Language, using FlowFile 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, using FlowFile attributes and Environment variables. This property is only considered if:
| |
Client Service * | el-rest-client-service | Controller Service: ElasticSearchClientService Implementations: ElasticSearchClientServiceImpl | An Elasticsearch client service to use for running queries. |
Dynamic Properties
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: Yes, evaluated using FlowFile Attributes and Environment variables. |
Relationships
Name | Description |
---|---|
document | Fetched documents are routed to this relationship. |
failure | All flowfiles that fail for reasons unrelated to server availability go to this relationship. |
not_found | A FlowFile is routed to this relationship if the specified document does not exist in the Elasticsearch cluster. |
retry | All flowfiles that fail due to server/cluster availability go to this relationship. |
Reads Attributes
This processor does not read attributes.
Writes Attributes
Name | Description |
---|---|
elasticsearch.get.error | The error message provided by Elasticsearch if there is an error fetching the document. |
elasticsearch.index | The Elasticsearch index containing the document |
elasticsearch.type | The Elasticsearch document type |
filename | The filename attribute is set to the document identifier |
State Management
This component does not store state.
Restricted
This component is not restricted.
Input Requirement
This component allows an incoming relationship.
System Resource Considerations
This component does not specify system resource considerations.