DeleteByQueryElasticsearch

Description:

Delete from an Elasticsearch index using a query. The query can be loaded from a flowfile body or from the Query parameter.

Additional Details...

Tags:

elastic, elasticsearch, elasticsearch5, elasticsearch6, elasticsearch7, elasticsearch8, delete, query

Properties:

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 NameAPI NameDefault ValueAllowable ValuesDescription
Queryel-rest-queryA 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.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Query Attributeel-query-attributeIf set, the executed query will be set on each result flowfile in the specified attribute.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Indexel-rest-fetch-indexThe name of the index to use.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Typeel-rest-typeThe type of this document (used by Elasticsearch for indexing and searching).
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Client Serviceel-rest-client-serviceController Service API:
ElasticSearchClientService
Implementation: ElasticSearchClientServiceImpl
An Elasticsearch client service to use for running queries.

Dynamic Properties:

Supports Sensitive Dynamic Properties: No

Dynamic Properties allow the user to specify both the name and value of a property.

NameValueDescription
The name of a URL query parameter to addThe value of the URL query parameterAdds 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 query request body
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

Relationships:

NameDescription
retryAll flowfiles that fail due to server/cluster availability go to this relationship.
successIf the "by query" operation succeeds, and a flowfile was read, it will be sent to this relationship.
failureIf the "by query" operation fails, and a flowfile was read, it will be sent to this relationship.

Reads Attributes:

None specified.

Writes Attributes:

NameDescription
elasticsearch.delete.tookThe amount of time that it took to complete the delete operation in ms.
elasticsearch.delete.errorThe error message provided by Elasticsearch if there is an error running the delete.

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:

None specified.