mirror of https://github.com/apache/lucene.git
LUCENE-5468: don't create unnecessary objects
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene5468@1572643 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d7cc408585
commit
9896e610d3
|
@ -120,7 +120,6 @@ final class Stemmer {
|
|||
private List<CharsRef> stem(char word[], int length, char[] flags, int recursionDepth) {
|
||||
// TODO: allow this stuff to be reused by tokenfilter
|
||||
List<CharsRef> stems = new ArrayList<CharsRef>();
|
||||
BytesRef scratch = new BytesRef();
|
||||
|
||||
for (int i = 0; i < length; i++) {
|
||||
List<Affix> suffixes = dictionary.lookupSuffix(word, i, length - i);
|
||||
|
@ -194,7 +193,6 @@ final class Stemmer {
|
|||
}
|
||||
|
||||
if (affix.isCrossProduct() && recursionDepth < recursionCap) {
|
||||
BytesRef scratch = new BytesRef();
|
||||
dictionary.flagLookup.get(affix.getAppendFlags(), scratch);
|
||||
char appendFlags[] = Dictionary.decodeFlags(scratch);
|
||||
stems.addAll(stem(strippedWord, length, appendFlags, ++recursionDepth));
|
||||
|
|
Loading…
Reference in New Issue