-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Fix exception message when validating the name of tokenizer(edgeNGram) #112705
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
Fix exception message when validating the name of tokenizer(edgeNGram) #112705
Conversation
@mark-vieira Hi,
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
As mentioned in the licensing FAQ the AGPL change will apply starting with version 8.16. |
@elasticsearchmachine run elasticsearch-ci |
@elasticsearchmachine update branch |
@elasticmachine test this please |
@YeonghyeonKO I tried to update the branch and resolve conflicts, but some compilation errors resulted from it. Can you please update from the branch and correct them? Thanks! |
@carlosdelest @YeonghyeonKO take a look here: #113009 |
@carlosdelest Thanks for pulling codes from main branch to this branch. I fixed compilation error by importing classes and defining static variable(deprecationLogger). However as @benwtrent commented above that after @javanna's PR( #113009 ) had been merged already, this PR can be CLOSED. |
@@ -296,6 +303,22 @@ public Map<String, AnalysisProvider<TokenizerFactory>> getTokenizers() { | |||
tokenizers.put("thai", ThaiTokenizerFactory::new); | |||
tokenizers.put("ngram", NGramTokenizerFactory::new); | |||
tokenizers.put("edge_ngram", EdgeNGramTokenizerFactory::new); | |||
tokenizers.put("edgeNGram", (IndexSettings indexSettings, Environment environment, String name, Settings settings) -> { |
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.
yeah, this should just be removed :). I think this pr can be closed.
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.
Ok, thanks for reviewing my PR :)
This fix was still valid for 8.x I believe, my commit with the removal went only to main. |
Thanks for clarifying @javanna ! @YeonghyeonKO , can you open another PR with this code, but to 8.x branch, and assign it to me? Thanks! |
@carlosdelest @javanna |
The method
getTokenizers
inCommonAnalysisPlugin
returns IllegalArgumentException with the message:After IndexVersion v.8.0.0,
edge_ngram
(notedge_nGram
) is the exact name of edgeNGram tokenizer so I ask to change the word in this Pull Request. The PR could reduce confusion in defining edgeNGram tokenizers when statically mapping indices in Elasticsearch.