Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/analyzers/AcronymFilter.java |
— | — | @@ -16,21 +16,21 @@ |
17 | 17 | super(input); |
18 | 18 | } |
19 | 19 | |
20 | | - @Override |
21 | | - public Token next() throws IOException { |
| 20 | + @Override |
| 21 | + public Token next(Token nextToken) throws IOException { |
22 | 22 | if(buffered != null){ |
23 | | - Token t = buffered; |
| 23 | + nextToken = buffered; |
24 | 24 | buffered = null; |
25 | | - return t; |
| 25 | + return nextToken; |
26 | 26 | } |
27 | | - Token t = input.next(); |
28 | | - if(t == null) |
| 27 | + nextToken = input.next(); |
| 28 | + if(nextToken == null) |
29 | 29 | return null; |
30 | | - if(t.termText().contains(".") && !isNumber(t.termText())){ |
31 | | - buffered = new Token(t.termText().replace(".",""),t.startOffset(),t.endOffset(),t.type()); |
| 30 | + if(nextToken.termText().contains(".") && !isNumber(nextToken.termText())){ |
| 31 | + buffered = new Token(nextToken.termText().replace(".",""),nextToken.startOffset(),nextToken.endOffset(),nextToken.type()); |
32 | 32 | buffered.setPositionIncrement(0); |
33 | 33 | } |
34 | | - return t; |
| 34 | + return nextToken; |
35 | 35 | } |
36 | 36 | |
37 | 37 | protected boolean isNumber(String str){ |