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

Add support for hiragana_uppercase & katakana_uppercase token filters in kuromoji analysis plugin #106553

Merged

Conversation

benwtrent
Copy link
Member

@benwtrent benwtrent commented Mar 20, 2024

This adds support for hiragana_uppercase and katakana_uppercase provided in the new lucene release.

Sutegana (捨て仮名) is small letter of hiragana and katakana in Japanese. In the old Japanese text, sutegana (捨て仮名) is not used unlikely to modern one. For example:

  • "ストップウォッチ" is written as "ストツプウオツチ"
  • "ちょっとまって" is written as "ちよつとまつて"

So it's meaningful to normalize sutegana to normal (uppercase) characters if we search against the corpus which includes old Japanese text such as patents, legal documents, contract policies, etc.

Related to: apache/lucene#12915

@benwtrent benwtrent added >enhancement :Search/Analysis How text is split into tokens v8.14.0 labels Mar 20, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Search Meta label for search team label Mar 20, 2024
@elasticsearchmachine
Copy link
Collaborator

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

@benwtrent benwtrent requested a review from daixque March 20, 2024 14:21
@benwtrent
Copy link
Member Author

Builds are failing due to the two new token filters created via: apache/lucene#12915

Since the original idea was to expose those in ES, I decided to do that and fix the failing test.

@benwtrent
Copy link
Member Author

The test failure is fixed by: apache/lucene#13195

Will rerun CI once new snapshot is pulled in.

Copy link
Contributor

@tteofili tteofili left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daixque
Copy link
Contributor

daixque commented Mar 21, 2024

Thanks Ben! LGTM.

@benwtrent benwtrent merged commit cadd5ab into elastic:lucene_snapshot Mar 21, 2024
14 checks passed
@benwtrent benwtrent deleted the testfixes/lucene_snapshot branch March 21, 2024 14:26
@benwtrent benwtrent removed the v8.14.0 label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Analysis How text is split into tokens Team:Search Meta label for search team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants