-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Remove IcuCollationTokenFilterFactory #15827 #35900
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
Conversation
cbuescher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ricardojaferreira, first of all thanks for picking up the issue and opening this PR. Unfortunately I think the changes you made will not be sufficient to solve the issue at hand. First of all I think the usage of ICUCollationDocValuesField doesn't work this way, in fact there are test failures e.g. in SimpleIcuCollationTokenFilterTests which you can see when you e.g. run just the unit test for the analysis-icu plugin (./gradlew -p plugins/analysis-icu check).
Furhtermore I'm not sure the goal of the issue was to swap out the internal implementation of IcuCollationTokenFilterFactory but to first deprecate it in Elasticsearch (so that users using in in newly created indices get a warning) and then later remove it completely. I might be wrong on this point though, maybe others can correct me in this case.
If you want to work on the above points please let us know if you have questions.
| @Override | ||
| public TokenStream create(TokenStream tokenStream) { | ||
| return new ICUCollationKeyFilter(tokenStream, collator); | ||
| return new ICUCollationDocValuesField(tokenStream.toString(), collator).tokenStreamValue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt this is going to be sufficient. ICUCollationDocValuesField's first argument is a the field name (per Javadoc) and I'm not sure the tokenStreamValue will work either, but maybe it does.
|
Pinging @elastic/es-search |
|
Hi @cbuescher thanks for the comments. Maybe I haven't understand the purpose of the fix, can you please point me on the right direction? Thanks. |
|
Hi @ricardojaferreira. To answer your question, we cannot immediately remove the filter in version 7.0 since it might be used in indices create in 6.x which we still need to support. We should first add deprecation warnings when this filter is used in on of the current 6.x versions. |
|
@ricardojaferreira are you still working on this? Otherwise I'd like to close this PR to open the issue up for other people who might be interested. |
|
@ricardojaferreira I'm closing this for now, assuming you are not working on it actively at the moment so that others can pick up the issue. If you like to resume work please reopen and we'll see if anybody else is on it then already. |
|
@nik9000 @cbuescher Hey guys, I'm new to the game and looking for a first issue to pick up. I read the PR form a previous attempt to address this, and it seems like there would be some deprecation process to be followed here. I looked at |
Removes the use of ICUCollationKeyFilter at IcuCollationTokenFilterFactory and removes the class ICUCollationKeyFilter.java which no longer has usages.
Relates to #15827