File tree 3 files changed +16
-2
lines changed
java/org/apache/lucene/analysis/te
test/org/apache/lucene/analysis/te
3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,8 @@ Bug Fixes
250
250
251
251
* GITHUB#13031: ScorerSupplier created by QueryProfilerWeight will propagate topLevelScoringClause to the sub ScorerSupplier. (Shintaro Murakami)
252
252
253
+ * GITHUB#13059: Fixed missing IndicNormalization and DecimalDigit filters in TeluguAnalyzer normalization (Dmitry Cherniachenko)
254
+
253
255
Build
254
256
---------------------
255
257
Original file line number Diff line number Diff line change @@ -127,8 +127,8 @@ protected TokenStreamComponents createComponents(String fieldName) {
127
127
@ Override
128
128
protected TokenStream normalize (String fieldName , TokenStream in ) {
129
129
TokenStream result = new DecimalDigitFilter (in );
130
- result = new IndicNormalizationFilter (in );
131
- result = new TeluguNormalizationFilter (in );
130
+ result = new IndicNormalizationFilter (result );
131
+ result = new TeluguNormalizationFilter (result );
132
132
return result ;
133
133
}
134
134
}
Original file line number Diff line number Diff line change 19
19
import org .apache .lucene .analysis .Analyzer ;
20
20
import org .apache .lucene .analysis .CharArraySet ;
21
21
import org .apache .lucene .tests .analysis .BaseTokenStreamTestCase ;
22
+ import org .apache .lucene .util .BytesRef ;
22
23
23
24
public class TestTeluguAnalyzer extends BaseTokenStreamTestCase {
24
25
@@ -48,6 +49,17 @@ public void testDigits() throws Exception {
48
49
a .close ();
49
50
}
50
51
52
+ public void testNormalization () {
53
+ TeluguAnalyzer a = new TeluguAnalyzer ();
54
+ // DecimalDigitsFilter
55
+ assertEquals (new BytesRef ("1234" ), a .normalize ("dummy" , "౧౨౩౪" ));
56
+ // IndicNormalizationFilter
57
+ assertEquals (new BytesRef ("ऑऑ" ), a .normalize ("dummy" , "अाॅअाॅ" ));
58
+ // TeluguNormalizationFilter
59
+ assertEquals (new BytesRef ("ఓనమాల" ), a .normalize ("dummy" , "ఒౕనమాల" ));
60
+ a .close ();
61
+ }
62
+
51
63
/** Send some random strings to the analyzer */
52
64
public void testRandomStrings () throws Exception {
53
65
TeluguAnalyzer analyzer = new TeluguAnalyzer ();
You can’t perform that action at this time.
0 commit comments