Can't merge a non object mapping with an object mapping

Hello,

When I'm trying to import this json:

{
	"data": {
		"args": ["v7.0/4529900134935424/feed", {
			"limit": 100
		}]
	},
	"@timestamp": "2021-02-11T11:07:02.189Z",
	"@version": "1"
}

I'm getting this error:

can't merge a non object mapping [data.args] with an object mapping"

This JSON comes from an upstream service and looks valid but doesn't import. Actually this is a failing snippet from a larger JSON file which imports fine if this block is removed.
What can I do to get this to import?

You can't import that. args can't be both a text and an object.

You must change the source document.
Or if you don't want to index the content of args, you can disable it.

Thank you, that worked. Disabled it with this command:

curl -XPUT http://localhost:9200/myindex -H "Content-Type: application/json" -d '
{
  "properties": {
     "data.args": {
        "enabled": "false"
     }
  }
}
'

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