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:
Robert Muir 2010-04-19 10:19:45 +00:00
parent 12a7360fef
commit 514161467f
1 changed files with 2 additions and 3 deletions

View File

@ -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 {