This is how I parse json in filter
json {
source => "json_content"
target => "content"
remove_field=>["json_content"]
}
But I got the following error
"type"=>"mapper_parsing_exception", "reason"=>"failed to parse field [content] of type [text] in document with id '6vnV8XIBuDHdfTNTFMF-'", "caused_by"=>{"type"=>"illegal_state_exception", "reason"=>"Can't get text on a START_OBJECT at 1:81"}
That is not an error that occurred while parsing the JSON string. The problem is that you have mapped your field in Elasticsearch as text (probably not intentionally, but by indexing a document that had a string there and letting the automatic mapping detect the type), but are now trying to save the parsed json, which is an object. You'll need to reindex your data in a new index with the correct mapping.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.