LUCENE-10312: MIGRATE entry and small follow-ups (#908)

This commit is contained in:
Tomoko Uchida 2022-05-21 12:43:02 +09:00 committed by GitHub
parent 63b66e06cd
commit 71a9acb2e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 3 deletions

View File

@ -19,6 +19,11 @@
## Migration from Lucene 9.x to Lucene 10.0
### PersianStemFilter is added to PersianAnalyzer (LUCENE-10312)
PersianAnalyzer now includes PersianStemFilter, that would change analysis results. If you need the exactly same analysis
behaviour as 9.x, clone `PersianAnalyzer` in 9.x or create custom analyzer by using `CustomAnalyzer` on your own.
### AutomatonQuery/CompiledAutomaton/RunAutomaton/RegExp no longer determinize (LUCENE-10010)
These classes no longer take a `determinizeWorkLimit` and no longer determinize

View File

@ -121,8 +121,8 @@ public final class PersianAnalyzer extends StopwordAnalyzerBase {
*
* @return {@link org.apache.lucene.analysis.Analyzer.TokenStreamComponents} built from a {@link
* StandardTokenizer} filtered with {@link LowerCaseFilter}, {@link DecimalDigitFilter},
* {@link ArabicNormalizationFilter}, {@link PersianNormalizationFilter} and Persian Stop
* words
* {@link ArabicNormalizationFilter}, {@link PersianNormalizationFilter}, Persian Stop words,
* and {@link PersianStemFilter}.
*/
@Override
protected TokenStreamComponents createComponents(String fieldName) {

View File

@ -32,7 +32,14 @@ public class TestPersianStemFilter extends BaseTokenStreamTestCase {
@Override
public void setUp() throws Exception {
super.setUp();
a = new PersianAnalyzer();
a =
new Analyzer() {
@Override
protected TokenStreamComponents createComponents(String fieldName) {
final Tokenizer source = new MockTokenizer();
return new TokenStreamComponents(source, new PersianStemFilter(source));
}
};
}
@Override