Chris Sampson created NIFI-11274:
------------------------------------
Summary: PutElasticsearchRecord should only add @timestamp field
if not null
Key: NIFI-11274
URL: https://issues.apache.org/jira/browse/NIFI-11274
Project: Apache NiFi
Issue Type: Bug
Affects Versions: 1.20.0
Reporter: Chris Sampson
Fix For: 1.latest, 2.latest
The {{PutElasticsearchRecord}} processor optionally allows users to configure
an {{@timestamp}} field using a RecordPath or specified value. When these are
not set or the configuration results in a {{null}} value, the processor
currently adds a {{"@timestamp": null}} field to the document being sent to
Elasticsearch.
While {{null}}/empty fields can be suppressed by the
{{ElasticSearchClientServiceImpl}}, this is not always the wanted
configuration. NiFi shouldn't always add the {{@timestamp}} field to the
document before sending because with "null suppression" disabled in the
controller service, the unwanted/unexpected field will be created and sent to
Elasticsearch.
The {{@timestamp}} field was added to support Data Streams within
Elasticsearch. For such data storage, the field will be necessary but for other
"normal" indices, the field is likely not wanted (even set to {{null}}).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)