Skip to content

Commit

Permalink
LUCENE-10312: MIGRATE entry and small follow-ups (#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
mocobeta authored May 21, 2022
1 parent 63b66e0 commit 71a9acb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
5 changes: 5 additions & 0 deletions lucene/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ public PersianAnalyzer(CharArraySet stopwords, CharArraySet stemExclusionSet) {
*
* @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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 71a9acb

Please sign in to comment.