How to insert data in index-pattern for field with 'Keyword' type using Index API

Hello,

Index-pattern contains two fields like below.
{"name":"aws_region","type":"string","count":11,"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":false},{"name":"aws_region.keyword","type":"string","count":0,"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true}

When I insert data in the below way. It is throwing the following error.

{...
"aws_region": "demo data",
...
}

When I insert data in a nested dictionary then it won't throw an error but I am not able to see data in visualization with the query "aws_region: EVENT1" even though I have added data with that.

{...
"aws_region": {
"keyword": "demo data"
},
...}

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