Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lkts opened this issue Jun 13, 2024 · 1 comment · May be fixed by #110045
Open
Assignees
Labels
>bug :StorageEngine/Mapping The storage related side of mappings Team:StorageEngine

Comments

@lkts
Copy link
Contributor

lkts commented Jun 13, 2024

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.

@lkts lkts added >bug needs:triage Requires assignment of a team area label :StorageEngine/Mapping The storage related side of mappings labels Jun 13, 2024
@elasticsearchmachine elasticsearchmachine added Team:StorageEngine and removed needs:triage Requires assignment of a team area label labels Jun 13, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

elasticsearchmachine pushed a commit that referenced this issue Jun 13, 2024
`unsigned_long` can't actually handle objects as malformed values. I
have created #109705.

Closes #109680.
@salvatore-campagna salvatore-campagna self-assigned this Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :StorageEngine/Mapping The storage related side of mappings Team:StorageEngine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants