Hello,
i have the following mapping:
{
"indexname": {
"mappings": {
"object": {
"properties": {
"languagedata": {
"type": "nested",
"properties": {
"language": {
"type": "keyword"
},
"title": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
},
"analyzer": "standard_lowercase_asciifolding_sort"
}
}
},
"id": {
"type": "integer"
}
}
}
}
}
}
Is it possible to sort the parent documents based on the score, when doing a match query on the nested object 'languagedata'?
{
"sort": [
{
"_score": {
"mode": "max",
"order": "desc",
"nested_path": "languagedata",
"nested_filter": {
"bool": {
"must": [
{
"match": {
"languagedata.title": "search_phrase"
}
}
],
"filter": [
{
"term": {
"languagedata.language": "de"
}
}
]
}
}
}
}
]
}
I know that my sort-example will not work, but it is only an example that shows what I want to do.
Thanks for your help
Uli