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

date field types fail to index specific malformed data even with ignore_malformed enabled #109539

Open
lkts opened this issue Jun 10, 2024 · 3 comments · May be fixed by #110049
Open

date field types fail to index specific malformed data even with ignore_malformed enabled #109539

lkts opened this issue Jun 10, 2024 · 3 comments · May be fixed by #110049
Assignees
Labels
>bug :StorageEngine/Mapping The storage related side of mappings Team:StorageEngine

Comments

@lkts
Copy link
Contributor

lkts commented Jun 10, 2024

Elasticsearch Version

8.14

Installed Plugins

No response

Java Version

bundled

OS Version

Problem Description

As noticed in #109410 if a value of date or date_nanos field is an object, indexing such value will fail even with ignore_malformed enabled. This behavior differs from other field types like numbers.

Steps to Reproduce

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

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

// Fails
PUT my_index/_doc/2
{
  "date": {"string": "hello"}
}

Logs (if relevant)

No response

@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Jun 10, 2024
@martijnvg
Copy link
Member

@lkts This is fixed for that #109410 is merged, right?

@lkts
Copy link
Contributor Author

lkts commented Jun 11, 2024

No, that PR does not fix it. The actual logic of ignore_malformed is not changed.

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.

4 participants