nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Burgess <mattyb...@apache.org>
Subject Re: PutElasticsearchHttp array
Date Fri, 20 Oct 2017 14:59:24 GMT
Pat,

Are you trying to put the whole array in as a single document, or are
you trying to put each element of the array in as a separate document?
 If the former, you could use ReplaceText to put the array into a JSON
object. If the latter, you can use SplitJSON to split the array into
individual elements, each of which can go to PutElasticsearchHttp.

Regards,
Matt


On Fri, Oct 20, 2017 at 9:32 AM, pat <plj@mitre.org> wrote:
> Howdy,
>
>   I have flow files that are json arrays:
>
> [ {"a":"thing1","b":"thing2"},{"a":"thing3","b":"thing4"}]
>
>
> PutElasticsearchHttp transfers this flow to failure.  Elasticsearch throw an
> error to its log file:
>
>  failed to execute bulk item (update) BulkShardRequest
> [[datahubcontactinfo][3]] containing
> [org.elasticsearch.action.update.UpdateRequest@4fb45a1b]
> org.elasticsearch.index.mapper.MapperParsingException: failed to parse
>         at
> org.elasticsearch.index.mapper.DocumentParser.wrapInMapperParsingException(DocumentParser.java:176)
> ~[elasticsearch-5.4.1.jar:5.4.1]
>         at
> org.elasticsearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:69)
> ~[elasticsearch-5.4.1.jar:5.4.1]
>         at
> org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:277)
> ~[elasticsearch-5.4.1.jar:5.4.1]
>         at
> org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:536)
> ~[elasticsearch-5.4.1.jar:5.4.1]
>         at
> org.elasticsearch.index.shard.IndexShard.prepareIndexOnPrimary(IndexShard.java:513)
> ~[elasticsearch-5.4.1.jar:5.4.1]
> ...
>
> Any thoughts on how to get around this problem?
>
>
> Thank you
>
> Pat
>
>
>
>
> --
> Sent from: http://apache-nifi-users-list.2361937.n4.nabble.com/

Mime
View raw message