Skip to content

unsigned_long field type fails to index specific malformed data even with ignore_malformed enabled #109705

Open
@lkts

Description

@lkts

Elasticsearch Version

8.15

Installed Plugins

No response

Java Version

bundled

OS Version

Problem Description

Trying to index an object into a unsigned_long field fails even with ignore_malformed enabled. See also #109539.

Steps to Reproduce

PUT /my_index
{
  "mappings": {
      "properties": {
          "ul": {
              "type": "unsigned_long",
              "ignore_malformed": true
          }
        }
    }
  }
}

// OK
PUT my_index/_doc/1
{
  "ul": "hello"
}

// fails
PUT my_index/_doc/2
{
  "ul": {"string": "hello"}
}

Logs (if relevant)

This happens because arser.text() throws IllegalStateException but only IllegalArgumentException is caught to handle malformed values.

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