I'm trying out a new feature for sorting an object based on its nested
objects using the new 'nested_filter' field.
I'm on elasticsearch version 20.6
I cannot get it to work so far, it doesn't sort at all when using the
nested object as the field and including a filter for another nested object
field.
Does this work in version 20.6?
This is the query and sort:
{
"query": {
"match_all": {}
},
"sort": [
{
"nested.field": {
"mode": "avg",
"order": "asc",
"nested_filter": {
"term": {
"nested.otherfield.id": 14
}
}
}
}
]
}
It doesn't seem to be sorting at all and I tried including the
"nested_path": "nested" field but it doesn't like it.
I'm trying out a new feature for sorting an object based on its nested
objects using the new 'nested_filter' field.
I'm on elasticsearch version 20.6
I cannot get it to work so far, it doesn't sort at all when using the
nested object as the field and including a filter for another nested object
field.
Does this work in version 20.6?
This is the query and sort:
{
"query": {
"match_all": {}
},
"sort": [
{
"nested.field": {
"mode": "avg",
"order": "asc",
"nested_filter": {
"term": {
"nested.otherfield.id": 14
}
}
}
}
]
}
It doesn't seem to be sorting at all and I tried including the
"nested_path": "nested" field but it doesn't like it.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.