Github user otherview commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2287#discussion_r160799388
--- Diff:
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-5-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearch5.java
---
@@ -129,6 +130,12 @@
.defaultValue("100")
.expressionLanguageSupported(true)
.build();
+
+ public static final PropertyDescriptor VERSION_ATTRIBUTE = new
PropertyDescriptor.Builder()
+ .name("Version").displayName("Version Attribute")
+ .description("The name of the attribute containing the
version for each FlowFile. Only used for index operation. Forces External
Versioning")
+
.required(false).expressionLanguageSupported(false).addValidator(StandardValidators.ATTRIBUTE_KEY_VALIDATOR)
--- End diff --
I think that's the way to go !
It would offer the EL capabilities support, will be handy.
(Let me just recap) We'd enable Expression Languange support, validated by
an NON_EMPTY_VALIDATOR. Effectivly allowing for:
- No Versioning (if Version is not specified)
- Versioning (if specified)
- New IDs (if ID is not specified)
- Using IDs (if specified)
(Assuming we apply across both ID and Version)
What do you think ?
I'll have a go at this and push some code once I have a bit of free time :)
---