Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables)
This Property is only considered if the [Query Definition Style] Property has a value of "FULL_QUERY".Query Clause | 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. Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables)
This Property is only considered if the [Query Definition Style] Property has a value of "BUILD_QUERY". |
Size | es-rest-size | | | The maximum number of documents to retrieve in the query. If the query is paginated, this "size" applies to each page of the query, not the "size" of the entire result set. Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables)
This Property is only considered if the [Query Definition Style] Property has a value of "BUILD_QUERY". |
Sort | es-rest-query-sort | | | Sort results by one or more fields, in JSON syntax. Ex: [{"price" : {"order" : "asc", "mode" : "avg"}}, {"post_date" : {"format": "strict_date_optional_time_nanos"}}] Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables)
This Property is only considered if the [Query Definition Style] Property has a value of "BUILD_QUERY". |
Aggregations | es-rest-query-aggs | | | One or more query aggregations (or "aggs"), in JSON syntax. Ex: {"items": {"terms": {"field": "product", "size": 10}}} Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables)
This Property is only considered if the [Query Definition Style] Property has a value of "BUILD_QUERY". |
Fields | es-rest-query-fields | | | Fields of indexed documents to be retrieved, in JSON syntax. Ex: ["user.id", "http.response.*", {"field": "@timestamp", "format": "epoch_millis"}] Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables)
This Property is only considered if the [Query Definition Style] Property has a value of "BUILD_QUERY". |
Script Fields | es-rest-query-script-fields | | | Fields to created using script evaluation at query runtime, in JSON syntax. Ex: {"test1": {"script": {"lang": "painless", "source": "doc['price'].value * 2"}}, "test2": {"script": {"lang": "painless", "source": "doc['price'].value * params.factor", "params": {"factor": 2.0}}}} Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables)
This Property is only considered if the [Query Definition Style] Property has a value of "BUILD_QUERY". |
Query Attribute | el-query-attribute | | | If 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 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) |
Client Service | el-rest-client-service | | Controller Service API: ElasticSearchClientService Implementation: ElasticSearchClientServiceImpl | An Elasticsearch client service to use for running queries. |
Search Results Split | el-rest-split-up-hits | PER_RESPONSE | - PER_HIT
![Flowfile per hit. Flowfile per hit.](../../../../../html/images/iconInfo.png) - PER_RESPONSE
![Flowfile per response. Flowfile per response.](../../../../../html/images/iconInfo.png)
| Output a flowfile containing all hits or one flowfile for each individual hit. |
Search Results Format | el-rest-format-hits | FULL | - FULL
![Contains full Elasticsearch Hit, including Document Source and Metadata. Contains full Elasticsearch Hit, including Document Source and Metadata.](../../../../../html/images/iconInfo.png) - SOURCE_ONLY
![Document Source only (where present). Document Source only (where present).](../../../../../html/images/iconInfo.png) - METADATA_ONLY
![Hit Metadata only. Hit Metadata only.](../../../../../html/images/iconInfo.png)
| Format of Hits output. |
Aggregation Results Split | el-rest-split-up-aggregations | PER_RESPONSE | - PER_HIT
![Flowfile per hit. Flowfile per hit.](../../../../../html/images/iconInfo.png) - PER_RESPONSE
![Flowfile per response. Flowfile per response.](../../../../../html/images/iconInfo.png)
| Output a flowfile containing all aggregations or one flowfile for each individual aggregation. |
Aggregation Results Format | el-rest-format-aggregations | FULL | - FULL
![Contains full Elasticsearch Aggregation, including Buckets and Metadata. Contains full Elasticsearch Aggregation, including Buckets and Metadata.](../../../../../html/images/iconInfo.png) - BUCKETS_ONLY
![Bucket Content only. Bucket Content only.](../../../../../html/images/iconInfo.png) - METADATA_ONLY
![Aggregation Metadata only. Aggregation Metadata only.](../../../../../html/images/iconInfo.png)
| Format of Aggregation output. |
Output No Hits | el-rest-output-no-hits | false | | Output a "hits" flowfile even if no hits found for query. If true, an empty "hits" flowfile will be output even if "aggregations" are output. |
Dynamic Properties:
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. These parameters will override any matching parameters in the query request body Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) |
Relationships:
Name | Description |
---|
failure | All flowfiles that fail for reasons unrelated to server availability go to this relationship. |
aggregations | Aggregations are routed to this relationship. |
hits | Search hits are routed to this relationship. |
original | All original flowfiles that don't cause an error to occur go to this relationship. |
Reads Attributes:
None specified.Writes Attributes:
Name | Description |
---|
mime.type | application/json |
aggregation.name | The name of the aggregation whose results are in the output flowfile |
aggregation.number | The number of the aggregation whose results are in the output flowfile |
hit.count | The number of hits that are in the output flowfile |
elasticsearch.query.error | The error message provided by Elasticsearch if there is an error querying the index. |
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.See Also:
PaginatedJsonQueryElasticsearch