Map nested fields of object from Logstash to Elasticsearch (Kibana Forum)

(kejsi) #1

Guys hello :slight_smile:
I posted this on ES forum and they told me to get in here for best results!!

I have an object which looks like this:


I supply this object from Log4j2 using JsonLayout. Moreover, I have created an index in Elasticsearch like this:

"mappings": {
        "dummy": {
                "properties": { 
                        "parsedDummyObj": {
                            "type": "nested",
                            "properties": {
                                "id": { "type": "text" },
                                "numbers": { "type": "text" }

Now, in Logstash I do this:

filter {

  json {
        source => "dummyObj"
        target => "parsedDummyObj"

However, I get the error: object mapping [parsedDummyObj] can't be changed from nested to non-nested"

My question is: what type of filter/mapping should I use, for the json (dummyObj), to be added successfully in Elasticsearch?

PS: I have researched, and I know the answer may implicitly exist out there, but I am extremely too knew to Elastic and hope for your understanding.

(system) closed #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.