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

_ignored is not populated for a "scaled_float" field defined as "ignore_malformed" #92594

Closed
cnliao opened this issue Dec 29, 2022 · 5 comments
Closed
Labels
>bug feedback_needed help wanted adoptme :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch

Comments

@cnliao
Copy link

cnliao commented Dec 29, 2022

Elasticsearch Version

8.5.3

Installed Plugins

No response

Java Version

bundled

OS Version

5.4.0-124-generic

Problem Description

The _ignored field is not populated correctly under the following condition:

  • A scaled_float field is defined as "ignore_malformed": true;
  • A document with a malformed value for that field is indexed.

Steps to Reproduce

PUT my-index-000001
{
  "settings": {
    "index.mapping.ignore_malformed": true 
  },
  "mappings": {
    "properties": {
      "a_float": {
        "type": "scaled_float",
        "scaling_factor": 100, 
        "ignore_malformed": true
      },
      "a_long": {
        "type": "long",
        "ignore_malformed": true
      }
    }
  }
}

POST my-index-000001/_doc/1?refresh
{
  "a_float": "hello",
  "a_long": "hello"
}

GET my-index-000001/_search
{}

// Response
{
  "took": 0,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "my-index-000001",
        "_id": "1",
        "_score": 1,
        "_ignored": [
          "a_long"
          // should include "a_float" here
        ],
        "_source": {
          "a_float": "hello",
          "a_long": "hello"
        }
      }
    ]
  }
}

Logs (if relevant)

No response

@cnliao cnliao added >bug needs:triage Requires assignment of a team area label labels Dec 29, 2022
@cnliao cnliao changed the title "_ignore" is not populated for a "scaled_float" field defined as "ignore_malformed" _ignored is not populated for a "scaled_float" field defined as "ignore_malformed" Dec 29, 2022
@original-brownbear original-brownbear added the :Search Foundations/Mapping Index mappings, including merging and defining field types label Dec 29, 2022
@elasticsearchmachine elasticsearchmachine added Team:Search Meta label for search team and removed needs:triage Requires assignment of a team area label labels Dec 29, 2022
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@javanna javanna added the help wanted adoptme label Jan 31, 2023
@devnamrits
Copy link
Contributor

Hi @javanna Can I pick this up?

Also, please usher a little bit regarding this issue.

@cbuescher
Copy link
Member

@cnliao I just tried your reproduction on 8.6.2 and got the expected result in the _ignore field::

"_ignored": [
          "a_float",
          "a_long"
        ],

Can you check again with 8.6, might be already fixed.

@cbuescher
Copy link
Member

This was fixed with #90565 in 8.6, therefore I'm closing this issue.

@cnliao
Copy link
Author

cnliao commented Mar 1, 2023

GET my-index-000001/_search
{}

Fix confirmed at 8.6.2. Thank you all!

@javanna javanna added Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch and removed Team:Search Meta label for search team labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug feedback_needed help wanted adoptme :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch
Projects
None yet
Development

No branches or pull requests

6 participants