[ https://issues.apache.org/jira/browse/NIFI-10687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17623975#comment-17623975 ]
ASF subversion and git services commented on NIFI-10687: -------------------------------------------------------- Commit db49a861b3ab2e555ae0bf94e8237dd1d5fb462a in nifi's branch refs/heads/main from Chris Sampson [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=db49a861b3 ] NIFI-10687 set Elasticsearch document _id to null if ID attribute evaluated to blank String for PutElasticsearchRecord or PutElasticsearchJson; use @timestamp default value if @timestamp record path evaluates to blank String in PutElasticsearchRecord This closes #6575 Signed-off-by: Mike Thomsen <mthom...@apache.org> > PutElasticsearchRecord/Json incorrectly try to use empty String as document > _id > ------------------------------------------------------------------------------- > > Key: NIFI-10687 > URL: https://issues.apache.org/jira/browse/NIFI-10687 > Project: Apache NiFi > Issue Type: Bug > Affects Versions: 1.18.0 > Reporter: Chris Sampson > Assignee: Chris Sampson > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > {{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) -- This message was sent by Atlassian Jira (v8.20.10#820010)