I'm able to sort on a nested field using the following params:
"sort": [
{
"scores.value": {
"mode": "sum",
"order": "desc",
"nested": {
"path": "scores",
"filter": {
"term": {
"scores.name": "size"
}
}
}
}
}
]
But when a newline character is present in the string, matching fails. How can I escape or otherwise use this character to search in a keyword field? I have verified that the value is present in the documents.
"sort": [
{
"scores.value": {
"mode": "sum",
"order": "desc",
"nested": {
"path": "scores",
"filter": {
"term": {
"scores.name": "any string with \n character"
}
}
}
}
}
]
Edit: Have also tried to match with regex, but can't seem to get a match to happen. Example: (beginning of string)(.|\n)*(end of string)
. If it matters, I have other characters (e.g. [
, (
) that have to be escaped in these strings as well.