You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by jzonthemtn <gi...@git.apache.org> on 2018/08/17 12:46:33 UTC

[GitHub] nifi pull request #2942: NIFI-5500: Array support in QueryElasticseachHttp

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?


---