[
https://issues.apache.org/jira/browse/NIFI-5500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16583861#comment-16583861
]
ASF GitHub Bot commented on NIFI-5500:
--------------------------------------
Github user jzonthemtn commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2942#discussion_r210897472
--- Diff:
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/main/java/org/apache/nifi/processors/elasticsearch/QueryElasticsearchHttp.java
---
@@ -432,7 +432,17 @@ private int getPage(final Response getResponse, final
URL url, final ProcessCont
Map<String, String> attributes = new HashMap<>();
for(Iterator<Entry<String, JsonNode>> it =
source.fields(); it.hasNext(); ) {
Entry<String, JsonNode> entry = it.next();
- attributes.put(ATTRIBUTE_PREFIX + entry.getKey(),
entry.getValue().asText());
+ String text_value = "";
+ String separator = "";
--- End diff --
I think it might be better if the value of `separator` didn't change. What
do you think about adding each item's text to an array and then doing something
like a `StringUtils.join()` on it?
> Add array support to QueryElasticsearchHttp
> -------------------------------------------
>
> Key: NIFI-5500
> URL: https://issues.apache.org/jira/browse/NIFI-5500
> Project: Apache NiFi
> Issue Type: Improvement
> Affects Versions: 1.7.1
> Reporter: Wietze B
> Priority: Minor
>
> When using the QueryElasticsearchHttp processor (with output=Attributes) to
> query a document that contains a field with an Array rather than a String or
> Integer, the resulting attribute for that field will be an empty string.
> This is due to the fact that the QueryElasticsearchHttp component doesn't
> handle array fields correctly.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)