Painless sort not working in call cases on 8.12.0?

The following is working as expected up to 8.11.4:

    "sort": [
          {
            "_script": {
                "order": "asc",
                "script": {
                    "lang": "painless",
                    "source": "doc['fullPath'].value.chars().filter(ch -> ch == '/').count()"
                },
                "type": "number"
            }
        }
    ]

where fullPath is a field containing UNIX-path like values.

After upgrading to 8.12.0, results are not sorted anymore.

FTR a simple

    "sort": [
       { "fullPath" : "asc" }
    ]

or

    "sort": [
          {
            "_script": {
                "order": "asc",
                "script": {
                    "lang": "painless",
                    "source": "doc['fullPath'].value.length()"
                },
                "type": "number"
            }
        }
    ]

still work as expected.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.