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

[BUG] Deserializing a custom normalizer without type specified fails #1110

Closed
Blomex opened this issue Jul 25, 2024 · 1 comment · Fixed by #1111
Closed

[BUG] Deserializing a custom normalizer without type specified fails #1110

Blomex opened this issue Jul 25, 2024 · 1 comment · Fixed by #1111
Labels
bug Something isn't working untriaged

Comments

@Blomex
Copy link
Contributor

Blomex commented Jul 25, 2024

What is the bug?

It is possible to manually create a custom normalizer without the type property explicitly specified. Attempting to deserialize this with the client such as when retrieving the index with client.indices.get() it will fail due to no type property. The server's logic is that type must be specified unless tokenizer is specified in which case type: "custom" is assumed.

How can one reproduce the bug?

PUT /custom-normalizer-index
{
  "mappings": {
    "properties": {
      "text_chunk": {
        "type": "keyword",
        "normalizer": "case_insensitive"
      }
    }
  },
  "settings": {
    "analysis": {
      "normalizer": {
        "case_insensitive": {
          "filter": "lowercase"
        }
      }
    }
  }
}

client.indices().get(b -> b.index("custom-normalizer-index"))

What is the expected behavior?

Analyzer to successfully deserialize as a CustomNormalizer

What is your host/environment?

MacOS Sonoma 14.5

Do you have any screenshots?

image

Do you have any additional context?

Issue is very similiar to #1032, but for normalizer instead of analyzer.

@Blomex Blomex added bug Something isn't working untriaged labels Jul 25, 2024
@Blomex Blomex changed the title [BUG] [BUG] Deserializing a custom normalizer without type specified fails Jul 25, 2024
@Xtansia
Copy link
Collaborator

Xtansia commented Aug 1, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants