ChrisSamo632 commented on code in PR #11355:
URL: https://github.com/apache/nifi/pull/11355#discussion_r3463131717
##########
nifi-extension-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchJson.java:
##########
@@ -241,6 +241,11 @@ public class PutElasticsearchJson extends
AbstractPutElasticsearch {
.name("Identifier Field")
.description("""
The name of the field within each document to use as the
Elasticsearch document ID. \
+ A nested field can be referenced with a "/"-delimited
path: for a document \
Review Comment:
I'm not aware of any restrictions around the use of `/` characters in field
names in Elasticsearch or json in general, although I'd imagine the occurrence
is relatively infrequent
Trying to think of examples, something like `house_name/number` could be the
sort of thing someone might use, but I'd typically opt for an alternative in
such a case as I'd see the `/` as unusual (and potentially problematic in some
systems/parsers)
For this instance, would a workable option be to add a processor parameter
that let's the user configure how a `/` should be treated in field names for
this processor? The default could be to have the character treated as a
literal, with a new mode that enables the nested object parsing?
Alternatively, would `.` be a better option as it matches the Elasticsearch
nested query parsing, but then is further from the nifi record path parsing,
which `/` emulates? The same concern would exist, although use of `.` in
elasticsearch field names has been discouraged for a long time as it can
confuse the Elasticsearch query parser - therefore, the chances of people using
`.` litterals on field names seems lower
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]