mirror of https://github.com/apache/lucene.git
LUCENE-2399: speed this filter up 20% (icu optimizes for dest = stringbuilder)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@935513 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
12a7360fef
commit
514161467f
|
@ -80,9 +80,8 @@ public class ICUNormalizer2Filter extends TokenFilter {
|
|||
if (input.incrementToken()) {
|
||||
if (normalizer.quickCheck(termAtt) != Normalizer.YES) {
|
||||
buffer.setLength(0);
|
||||
buffer.append(termAtt.buffer(), 0, termAtt.length());
|
||||
termAtt.setEmpty();
|
||||
normalizer.normalize(buffer, termAtt);
|
||||
normalizer.normalize(termAtt, buffer);
|
||||
termAtt.setEmpty().append(buffer);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue