Open ppf2 opened 5 years ago
Pinging @elastic/es-search
@ppf2 having looked into your issue. It had been noticed that getUserDictionary is calls UserDictionary class. And the issue is within lucene.analysis.ja.JapaneseAnalyzer.java and not Elasticsearch: the Analyzer expects the UserDictionary class not the interface, and UserDictionary class calls methods that implements Outputs.merge default error message.
@mickyharvey2 the issue is indeed in Lucene, I opened https://issues.apache.org/jira/browse/LUCENE-8584 and will update this issue when it is resolved in Lucene.
Pinging @elastic/es-search-relevance (Team:Search Relevance)
6.5
To reproduce:
Create an index with a custom user dictionary for kuromoji_tokenizer:
The above with the attached dictionary file test.txt results in an
unsupported_operation_exception
with no useful error messaging:Underlying Lucene/ES exception simply shows a null as well:
The issue here appears to be the duplicate entry in the user dictionary. Note that while I have already isolated this down to the duplication being an issue, for large user dictionaries it can be cumbersome to debug. It will be nice if we can handle duplicate entries automatically or provide a more useful message.