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] Unsupported ICU collation keyword field type #721

Closed
paverman opened this issue Nov 9, 2023 · 5 comments
Closed

[BUG] Unsupported ICU collation keyword field type #721

paverman opened this issue Nov 9, 2023 · 5 comments
Labels
bug Something isn't working untriaged

Comments

@paverman
Copy link

paverman commented Nov 9, 2023

What is the bug?

Using of custom plugin-defined keyword field type icu_collation_keyword in the index mapping will lead to an error during response deserialization:

Missing Required Property Builder.<variant kind>

Can be reproduced by the following code:

index = "index_with_icu_collation_keyword"
GetMappingRequest getMappingsRequest = new GetMappingRequest.Builder().index(index).build();
response = client.indices().getMapping(getMappingsRequest);

Index mapping example:

{
    "mappings": {
        "_doc": {
            "dynamic": "strict",
            "properties": {
                "FIELD_NAME": {
                    "copy_to": [
                        "all"
                    ],
                    "store": true,
                    "type": "text",
                    "fields": {
                        "sort": {
                            "type": "icu_collation_keyword"
                        },
                        "keyword": {
                            "type": "keyword"
                        }
                    }
                }
            }
        }
    }
}

Seems like this is known issue and was fixed in elasticsearch-java sources as a part of this

Perhaps, this is a duplicate of #611 but with more specific details.

There is a possible workaround but it does not work with Apache HttpClient 5 Transport due to a different threads issue.

How can one reproduce the bug?

Use icu_collation_keyword in your index mapping.

What is the expected behavior?

The icu_collation field type should be deserialized without errors.

What is your host/environment?

Windows
OpenSearch Java Client 2.6.0
Java 11

@paverman paverman added bug Something isn't working untriaged labels Nov 9, 2023
@Bfindlay
Copy link
Contributor

You can assgn this to me. I have a fix thats working locally, just need to spend some time writing more tests.

@paverman
Copy link
Author

@Bfindlay Great, thank you.
Will this fix be included in next release 2.9.0? What is the approximate date for the next release? Can I find somewhere a build package from the main branch to test this fix without waiting for the release?

@Bfindlay
Copy link
Contributor

@paverman not sure on releases, might have to check with one of the maintainers if there is a release scheduled soon.

@dblock
Copy link
Member

dblock commented Nov 18, 2023

Open a new issue that says "release v. next" and we'll take care of it.

@dblock
Copy link
Member

dblock commented Nov 18, 2023

Closed via #725

@dblock dblock closed this as completed Nov 18, 2023
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

No branches or pull requests

3 participants