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

Fixes mapper parsing exception: normalizer 'lowercase' not found #5910

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matthias-ronge
Copy link
Collaborator

Fixes #5909

@henning-gerhardt
Copy link
Collaborator

I'm unsure if your suggested change create an issue for other (newer) ElasticSearch versions and how did this effect running Kitodo.Production instances which did not got the changes of the changed json files in their running ElasticSearch servers?

@matthias-ronge
Copy link
Collaborator Author

I tested it on my system where the problem did not exist and here the change does not result in an error. You can also test the change, but I don't expect any problems.

@solth solth requested a review from thomaslow July 10, 2024 07:31
@thomaslow
Copy link
Collaborator

thomaslow commented Jul 10, 2024

Hi Matthias, I quickly checked this as per request of @solth.

As you stated in #5909, the affected ElasticSearch was version 7.3.1, released in August 2019. ElasticSearch added a "pre-configured lowercase normalizer" in April 2020, see elastic/elasticsearch@d83798f. So, the error message is definitely caused by the old ElasticSearch version and the addition of the lowercase normalizer by me in September 2022 (see c6958bd).

Anyway, there is an old (not yet completed) ElasticSearch issue elastic/elasticsearch#22263 that aims to disallow defining custom normalizer with the same name as built-in normalizer (meaning the name lowercase). Because of that, we should consider to use a different name than lowercase for the custom normalizer.

I do not have access to any old ElasticSearch indexes. Testing this (including @henning-gerhardt worries of potential migration issues) would take quite some time.

Personally, I would prefer to announce a required minimum ElasticSearch version for Kitodo-Production and not merge this workaround. For this particular problem, the minimum version would be at least >= 7.8.0 (released in June 2020).

@matthias-ronge
Copy link
Collaborator Author

I developed this change for a customer for a "it doesn't work" situation. For the background, because they have to use SLES distribution, and I never encountered this error anywhere else. I saw that the patch doesn't break anything, but if it's doubtful then we can leave it unmerged. But maybe it should go into the documentation that this can be a problem, and then you can at least merge it locally and suddenly it works. By replacin ElasticSearch in favor of Hibernate Search, it might be that it is no longer a problem anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mapper parsing exception: normalizer 'lowercase' not found
3 participants