Index: trunk/lucene-search-2/test/org/wikimedia/lsearch/analyzers/AnalysisTest.java |
— | — | @@ -1,48 +1,29 @@ |
2 | 2 | package org.wikimedia.lsearch.analyzers; |
3 | 3 | |
4 | 4 | import java.io.IOException; |
5 | | -import java.io.StringReader; |
6 | 5 | import java.util.ArrayList; |
7 | 6 | import java.util.Arrays; |
8 | 7 | import java.util.HashSet; |
9 | 8 | |
10 | | -import junit.framework.TestCase; |
11 | | - |
12 | 9 | import org.apache.lucene.analysis.Analyzer; |
13 | 10 | import org.apache.lucene.analysis.Token; |
14 | 11 | import org.apache.lucene.analysis.TokenStream; |
15 | 12 | import org.apache.lucene.analysis.cjk.CJKAnalyzer; |
16 | | -import org.apache.lucene.analysis.standard.StandardAnalyzer; |
17 | 13 | import org.apache.lucene.queryParser.ParseException; |
18 | 14 | import org.apache.lucene.queryParser.QueryParser; |
19 | 15 | import org.apache.lucene.search.Query; |
20 | | -import org.wikimedia.lsearch.analyzers.Aggregate; |
21 | | -import org.wikimedia.lsearch.analyzers.AggregateAnalyzer; |
22 | | -import org.wikimedia.lsearch.analyzers.Analyzers; |
23 | | -import org.wikimedia.lsearch.analyzers.ExtToken; |
24 | | -import org.wikimedia.lsearch.analyzers.FieldBuilder; |
25 | | -import org.wikimedia.lsearch.analyzers.FilterFactory; |
26 | | -import org.wikimedia.lsearch.analyzers.KeywordsAnalyzer; |
27 | | -import org.wikimedia.lsearch.analyzers.LanguageAnalyzer; |
28 | | -import org.wikimedia.lsearch.analyzers.ReusableLanguageAnalyzer; |
29 | | -import org.wikimedia.lsearch.analyzers.RelatedAnalyzer; |
30 | | -import org.wikimedia.lsearch.analyzers.SplitAnalyzer; |
31 | 16 | import org.wikimedia.lsearch.analyzers.Aggregate.Flags; |
32 | | -import org.wikimedia.lsearch.beans.Title; |
33 | 17 | import org.wikimedia.lsearch.config.Configuration; |
34 | 18 | import org.wikimedia.lsearch.config.GlobalConfiguration; |
35 | 19 | import org.wikimedia.lsearch.config.IndexId; |
36 | | -import org.wikimedia.lsearch.index.WikiIndexModifier; |
37 | 20 | import org.wikimedia.lsearch.ranks.StringList; |
38 | | -import org.wikimedia.lsearch.related.RelatedTitle; |
39 | 21 | import org.wikimedia.lsearch.test.WikiTestCase; |
40 | | -import org.wikimedia.lsearch.util.MathFunc; |
41 | 22 | |
42 | 23 | public class AnalysisTest extends WikiTestCase { |
43 | 24 | Analyzer a = null; |
44 | 25 | Configuration config = null; |
45 | 26 | |
46 | | - protected void setUp() throws Exception { |
| 27 | + protected void setUp() { |
47 | 28 | super.setUp(); |
48 | 29 | if(config == null){ |
49 | 30 | config = Configuration.open(); |
— | — | @@ -109,7 +90,7 @@ |
110 | 91 | |
111 | 92 | public static Token[] tokensFromAnalysis(Analyzer analyzer, String text, String field) throws IOException { |
112 | 93 | TokenStream stream = analyzer.tokenStream(field, text); |
113 | | - ArrayList tokenList = new ArrayList(); |
| 94 | + ArrayList<Token> tokenList = new ArrayList<Token>(); |
114 | 95 | while (true) { |
115 | 96 | Token token = stream.next(); |
116 | 97 | if (token == null) break; |