UpdateByQueryElasticsearch 2.3.0¶
BUNDLE¶
org.apache.nifi | nifi-elasticsearch-restapi-nar
DESCRIPTION¶
Update documents in an Elasticsearch index using a query. The query can be loaded from a flowfile body or from the Query parameter. The loaded Query can contain any JSON accepted by Elasticsearch’s _update_by_query API, for example a “query” object to identify what documents are to be updated, plus a “script” to define the updates to perform.
INPUT REQUIREMENT¶
ALLOWED
Supports Sensitive Dynamic Properties¶
false
PROPERTIES¶
Property |
Description |
---|---|
Max JSON Field String Length |
The maximum allowed length of a string value when parsing a JSON document or attribute. |
el-query-attribute |
If set, the executed query will be set on each result flowfile in the specified attribute. |
el-rest-client-service |
An Elasticsearch client service to use for running queries. |
el-rest-fetch-index |
The name of the index to use. |
el-rest-query |
A query in JSON syntax, not Lucene syntax. Ex: {“query”:{“match”:{“somefield”:”somevalue”}}}. If this parameter is not set, the query will be read from the flowfile content. If the query (property and flowfile content) is empty, a default empty JSON Object will be used, which will result in a “match_all” query in Elasticsearch. |
el-rest-query-clause |
A “query” clause in JSON syntax, not Lucene syntax. Ex: {“match”:{“somefield”:”somevalue”}}. If the query is empty, a default JSON Object will be used, which will result in a “match_all” query in Elasticsearch. |
el-rest-query-definition-style |
How the JSON Query will be defined for use by the processor. |
el-rest-script |
A “script” to execute during the operation, in JSON syntax. Ex: {“source”: “ctx._source.count++”, “lang”: “painless”} |
el-rest-type |
The type of this document (used by Elasticsearch for indexing and searching). |
RELATIONSHIPS¶
NAME |
DESCRIPTION |
---|---|
failure |
If the “by query” operation fails, and a flowfile was read, it will be sent to this relationship. |
retry |
All flowfiles that fail due to server/cluster availability go to this relationship. |
success |
If the “by query” operation succeeds, and a flowfile was read, it will be sent to this relationship. |
WRITES ATTRIBUTES¶
NAME |
DESCRIPTION |
---|---|
elasticsearch.update.took |
The amount of time that it took to complete the update operation in ms. |
elasticsearch.update.error |
The error message provided by Elasticsearch if there is an error running the update. |