Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.18.0
-
None
-
None
Description
PutElasticsearchRecord and PutElasticsearchJson will try to pass an empty/blank String as the _id of the document to be created in Elasticsearch if the processor is, for example, configured to use an attribute from the FlowFile or a field from the Record that doesn't exist.
To re-create:
- set the ID field to point at a non-existent Field using Expression Language, e.g. ${notExist}
- input a FlowFile where the attribute/Record Path equates to a non-existent Field (i.e. returns an empty String, but not null)
- observe that the attempt to send a document to Elasticsearch uses the empty String rather than null
Setting the _id in NiFi to null in such circumstances would be preferable/expected as this would cause Elasticsearch to auto-generate an _id when indexing.
Other NiFi processor fields may also be affected, e.g. for @timestamp (others should be considered, but some fields should legitimately equate to an empty/blank String and cause an error - index, for example)
Attachments
Issue Links
- relates to
-
NIFI-10303 GetElasticsearch processor invokes elasticsearch GET api without an identifier when flow file is null
- Resolved
- links to