Hey guys,
we upgraded our system running ES5.4 to ES6.0. We used some nested querys for months that are no longer working after the upgrade...they fail with
"...[nested] nested object under path [dates] is not of nested type"
But the mentioned field has the nested type...
Here is a simplified mapping and query...the real one is way bigger but this one is also not working...
PUT products
{
"settings" : {
"index" : {
"number_of_shards" : 3,
"number_of_replicas" : 2
}
},
"mappings": {
"basics": {
"properties": {
"sku": {
"type": "text",
"index": "false"
},
"title": {
"type": "text",
"index": "true"
},
"image": {
"type": "text",
"index": "false"
},
"productmanager": {
"type": "text",
"index": "true"
},
"dates": {
"type": "nested",
"properties": {
"date-origin": {
"type": "date",
"format": "dd.mm.YYYY"
},
"date-destination": {
"type": "date",
"format": "dd.mm.YYYY"
},
"instock": {
"type": "byte"
}
}
}
}
}
}
}
And the query...
GET _search
{
"query": {
"bool": {
"must": [
{
"query_string": {
"query": "(sku:*)"
}
},
{
"nested": {
"path": "dates",
"query": {
"bool": {
"must": [
{
"term": {
"dates.instock": 0
}
}
]
}
},
"inner_hits": {}
}
}
]
}
}
}
So i have no idea whats wrong with it...
Are there any changes to nested types in ES6..i couldnt find anything in the docs...
Thx!!!