This is a follow-up question of exact string search in an array of strings.
There is another thing if the document has a publishing date.
{
"datePublished":"2020-05-22T15:06:00.000Z",
"locations":[
"Landkreis Cloppenburg",
"Berlin"
]
}
and sort them with the latest publication date. Then the result is coming back with the Landkreis Cloppenburg if I have this in the query:
"sort": [
{
"doc.datePublished":{
"order":"desc"
}
}
]