Skip to content

lowercase normalizer doubles backslashes in 8.19.x and 9.1.x #134023

@MikePieperSer

Description

@MikePieperSer

Elasticsearch Version

8.19.2

Installed Plugins

analysis-icu,analysis-smartcn

Java Version

bundled

OS Version

Linux edbae108e7d8 6.8.0-79-generic #79-Ubuntu SMP PREEMPT_DYNAMIC Tue Aug 12 14:42:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Problem Description

I have a field defined as such:

"myfield": {
          "type": "keyword",
          "store": true,
         "fields": {
           "lowercase": {
              "type": "keyword",
              "normalizer": "lowercase"
            }
          }
        },

this stores the value in the original case and additionally a lower case variant. The lower case variant is created by Elasticsearch while storing/changing the document.

A value “AbC\\dEf” is stored as “abc\\def” in the lowercase sub-field (note: Strings are in JSON notation).

This worked till 8.18.5 and works in 9.0.5.

In 8.19.0 - 8.19.2 and 9.1.2 it stores the value as “abc\\\\def” and the value can’t be found anymore when I search with “abc\\def”.

Steps to Reproduce

scratch_49.sh

Logs (if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions