I have some indexed data in elastic search, I am trying to use postman to get the data using the below request.
{
"_source": ["_id"],
"query": {
"nested" : {
"path" : "data",
"query" : {
"bool" : {
"must" : [
{ "match" : {"data.id": "3456"} }
]
}
},
"score_mode" : "avg"
}
}
}
But I am getting the exception
[nested] nested object under path [data] is not of nested type
My mapping definition is like
{
"property": {
"mappings": {
"property": {
"properties": {
"data": {
"properties": {
"id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"point": {
"properties": {
"lat": {
"type": "float"
},
"lon": {
"type": "float"
}
}
},
"popId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
}
Any idea why it is happening ?