diff --git a/lucene/build.xml b/lucene/build.xml index 53777242732..a9d301c4f96 100644 --- a/lucene/build.xml +++ b/lucene/build.xml @@ -23,21 +23,11 @@ - - - - - - - - - - @@ -57,10 +47,10 @@ excludes="contrib/db/*/lib/,contrib/*/ext-libs/,src/site/build/,contrib/benchmark/temp/,contrib/benchmark/work/" /> @@ -177,70 +167,7 @@ The source distribution does not contain sources of the previous Lucene Java ver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -252,7 +179,7 @@ The source distribution does not contain sources of the previous Lucene Java ver + depends="javadocs-all, javadocs-core, javadocs-contrib"> ${Name} ${version} Javadoc Index @@ -266,7 +193,6 @@ The source distribution does not contain sources of the previous Lucene Java ver -
  • Demo
  • ]]>
    @@ -285,27 +211,12 @@ The source distribution does not contain sources of the previous Lucene Java ver - - - - - - - - - - - - - - + - - @@ -348,11 +257,10 @@ The source distribution does not contain sources of the previous Lucene Java ver - - - + + @@ -379,7 +287,7 @@ The source distribution does not contain sources of the previous Lucene Java ver - + @@ -518,7 +426,7 @@ The source distribution does not contain sources of the previous Lucene Java ver - + @@ -529,16 +437,7 @@ The source distribution does not contain sources of the previous Lucene Java ver classifier="javadoc"/> - - - - - - - - + @@ -604,13 +503,10 @@ The source distribution does not contain sources of the previous Lucene Java ver - - - - + @@ -629,12 +525,6 @@ The source distribution does not contain sources of the previous Lucene Java ver - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lucene/contrib/CHANGES.txt b/lucene/contrib/CHANGES.txt index 88c68dff77b..0d8cd002637 100644 --- a/lucene/contrib/CHANGES.txt +++ b/lucene/contrib/CHANGES.txt @@ -2,6 +2,11 @@ Lucene contrib change Log ======================= Trunk (not yet released) ======================= +Build + + * LUCENE-2413: Moved the demo out of lucene core and into contrib/demo. + (Robert Muir) + ======================= Lucene 3.x (not yet released) ======================= Changes in backwards compatibility policy diff --git a/lucene/contrib/ant/build.xml b/lucene/contrib/ant/build.xml index cda5e5698b8..529fb016ad1 100644 --- a/lucene/contrib/ant/build.xml +++ b/lucene/contrib/ant/build.xml @@ -34,4 +34,21 @@ /> + + + + + + + + + + + + + + + + diff --git a/lucene/contrib/ant/src/java/org/apache/lucene/ant/IndexTask.java b/lucene/contrib/ant/src/java/org/apache/lucene/ant/IndexTask.java index 2b0240bc832..aa0356bb94e 100644 --- a/lucene/contrib/ant/src/java/org/apache/lucene/ant/IndexTask.java +++ b/lucene/contrib/ant/src/java/org/apache/lucene/ant/IndexTask.java @@ -30,9 +30,9 @@ import java.util.Vector; import java.lang.reflect.Constructor; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.SimpleAnalyzer; -import org.apache.lucene.analysis.StopAnalyzer; -import org.apache.lucene.analysis.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.SimpleAnalyzer; +import org.apache.lucene.analysis.core.StopAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.document.DateTools; import org.apache.lucene.document.Document; diff --git a/lucene/contrib/ant/src/test/org/apache/lucene/ant/IndexTaskTest.java b/lucene/contrib/ant/src/test/org/apache/lucene/ant/IndexTaskTest.java index b58ed309bbb..e22177c9eb0 100644 --- a/lucene/contrib/ant/src/test/org/apache/lucene/ant/IndexTaskTest.java +++ b/lucene/contrib/ant/src/test/org/apache/lucene/ant/IndexTaskTest.java @@ -21,7 +21,7 @@ import java.io.File; import java.io.IOException; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.StopAnalyzer; +import org.apache.lucene.analysis.core.StopAnalyzer; import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Query; diff --git a/lucene/contrib/benchmark/build.xml b/lucene/contrib/benchmark/build.xml index 171412eeb55..ae5b00aef7a 100644 --- a/lucene/contrib/benchmark/build.xml +++ b/lucene/contrib/benchmark/build.xml @@ -18,6 +18,7 @@ + @@ -139,8 +140,8 @@ + - @@ -228,9 +229,9 @@ Benchmark output in JIRA table format is in file: ${shingle.jira.output.file} - - - + + + diff --git a/lucene/contrib/demo/build.xml b/lucene/contrib/demo/build.xml new file mode 100644 index 00000000000..1b1fb7b8871 --- /dev/null +++ b/lucene/contrib/demo/build.xml @@ -0,0 +1,78 @@ + + + + + + + + Lucene Demo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lucene/lib/servlet-api-2.4.jar b/lucene/contrib/demo/lib/servlet-api-2.4.jar similarity index 100% rename from lucene/lib/servlet-api-2.4.jar rename to lucene/contrib/demo/lib/servlet-api-2.4.jar diff --git a/lucene/src/demo/demo-build.template b/lucene/contrib/demo/src/java/demo-build.template similarity index 100% rename from lucene/src/demo/demo-build.template rename to lucene/contrib/demo/src/java/demo-build.template diff --git a/lucene/src/demo/org/apache/lucene/demo/DeleteFiles.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/DeleteFiles.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/DeleteFiles.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/DeleteFiles.java diff --git a/lucene/src/demo/org/apache/lucene/demo/FileDocument.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/FileDocument.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/FileDocument.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/FileDocument.java diff --git a/lucene/src/demo/org/apache/lucene/demo/HTMLDocument.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/HTMLDocument.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/HTMLDocument.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/HTMLDocument.java diff --git a/lucene/src/demo/org/apache/lucene/demo/IndexFiles.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/IndexFiles.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/IndexFiles.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/IndexFiles.java diff --git a/lucene/src/demo/org/apache/lucene/demo/IndexHTML.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/IndexHTML.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/IndexHTML.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/IndexHTML.java diff --git a/lucene/src/demo/org/apache/lucene/demo/SearchFiles.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/SearchFiles.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.java diff --git a/lucene/src/demo/org/apache/lucene/demo/html/Entities.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/html/Entities.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/html/Entities.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/html/Entities.java diff --git a/lucene/src/demo/org/apache/lucene/demo/html/HTMLParser.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/html/HTMLParser.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/html/HTMLParser.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/html/HTMLParser.java diff --git a/lucene/src/demo/org/apache/lucene/demo/html/HTMLParser.jj b/lucene/contrib/demo/src/java/org/apache/lucene/demo/html/HTMLParser.jj similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/html/HTMLParser.jj rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/html/HTMLParser.jj diff --git a/lucene/src/demo/org/apache/lucene/demo/html/HTMLParserConstants.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/html/HTMLParserConstants.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/html/HTMLParserConstants.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/html/HTMLParserConstants.java diff --git a/lucene/src/demo/org/apache/lucene/demo/html/HTMLParserTokenManager.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/html/HTMLParserTokenManager.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/html/HTMLParserTokenManager.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/html/HTMLParserTokenManager.java diff --git a/lucene/src/demo/org/apache/lucene/demo/html/ParseException.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/html/ParseException.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/html/ParseException.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/html/ParseException.java diff --git a/lucene/src/demo/org/apache/lucene/demo/html/ParserThread.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/html/ParserThread.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/html/ParserThread.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/html/ParserThread.java diff --git a/lucene/src/demo/org/apache/lucene/demo/html/SimpleCharStream.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/html/SimpleCharStream.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/html/SimpleCharStream.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/html/SimpleCharStream.java diff --git a/lucene/src/demo/org/apache/lucene/demo/html/Tags.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/html/Tags.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/html/Tags.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/html/Tags.java diff --git a/lucene/src/demo/org/apache/lucene/demo/html/Test.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/html/Test.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/html/Test.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/html/Test.java diff --git a/lucene/src/demo/org/apache/lucene/demo/html/Token.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/html/Token.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/html/Token.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/html/Token.java diff --git a/lucene/src/demo/org/apache/lucene/demo/html/TokenMgrError.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/html/TokenMgrError.java similarity index 100% rename from lucene/src/demo/org/apache/lucene/demo/html/TokenMgrError.java rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/html/TokenMgrError.java diff --git a/lucene/src/jsp/README.txt b/lucene/contrib/demo/src/jsp/README.txt similarity index 100% rename from lucene/src/jsp/README.txt rename to lucene/contrib/demo/src/jsp/README.txt diff --git a/lucene/src/jsp/WEB-INF/web.xml b/lucene/contrib/demo/src/jsp/WEB-INF/web.xml similarity index 100% rename from lucene/src/jsp/WEB-INF/web.xml rename to lucene/contrib/demo/src/jsp/WEB-INF/web.xml diff --git a/lucene/src/jsp/configuration.jsp b/lucene/contrib/demo/src/jsp/configuration.jsp similarity index 100% rename from lucene/src/jsp/configuration.jsp rename to lucene/contrib/demo/src/jsp/configuration.jsp diff --git a/lucene/src/jsp/footer.jsp b/lucene/contrib/demo/src/jsp/footer.jsp similarity index 100% rename from lucene/src/jsp/footer.jsp rename to lucene/contrib/demo/src/jsp/footer.jsp diff --git a/lucene/src/jsp/header.jsp b/lucene/contrib/demo/src/jsp/header.jsp similarity index 100% rename from lucene/src/jsp/header.jsp rename to lucene/contrib/demo/src/jsp/header.jsp diff --git a/lucene/src/jsp/index.jsp b/lucene/contrib/demo/src/jsp/index.jsp similarity index 100% rename from lucene/src/jsp/index.jsp rename to lucene/contrib/demo/src/jsp/index.jsp diff --git a/lucene/src/jsp/results.jsp b/lucene/contrib/demo/src/jsp/results.jsp similarity index 100% rename from lucene/src/jsp/results.jsp rename to lucene/contrib/demo/src/jsp/results.jsp diff --git a/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java b/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java index 86ca670e183..1282d669e1e 100644 --- a/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java +++ b/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java @@ -21,24 +21,10 @@ import java.util.Collections; import java.util.LinkedList; import java.util.Set; -import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.WhitespaceAnalyzer; -import org.apache.lucene.document.Document; -import org.apache.lucene.document.Field; -import org.apache.lucene.document.Field.Index; -import org.apache.lucene.document.Field.Store; -import org.apache.lucene.document.Field.TermVector; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.IndexWriter; -import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.index.TermFreqVector; import org.apache.lucene.index.TermPositionVector; import org.apache.lucene.index.TermVectorOffsetInfo; -import org.apache.lucene.queryParser.QueryParser; -import org.apache.lucene.search.Query; -import org.apache.lucene.store.Directory; -import org.apache.lucene.store.RAMDirectory; -import org.apache.lucene.util.Version; /** * FieldTermStack is a stack that keeps query terms in the specified field @@ -49,24 +35,24 @@ public class FieldTermStack { private final String fieldName; LinkedList termList = new LinkedList(); - public static void main( String[] args ) throws Exception { - Analyzer analyzer = new WhitespaceAnalyzer(Version.LUCENE_CURRENT); - QueryParser parser = new QueryParser(Version.LUCENE_CURRENT, "f", analyzer ); - Query query = parser.parse( "a x:b" ); - FieldQuery fieldQuery = new FieldQuery( query, true, false ); + //public static void main( String[] args ) throws Exception { + // Analyzer analyzer = new WhitespaceAnalyzer(Version.LUCENE_CURRENT); + // QueryParser parser = new QueryParser(Version.LUCENE_CURRENT, "f", analyzer ); + // Query query = parser.parse( "a x:b" ); + // FieldQuery fieldQuery = new FieldQuery( query, true, false ); - Directory dir = new RAMDirectory(); - IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig(Version.LUCENE_CURRENT, analyzer)); - Document doc = new Document(); - doc.add( new Field( "f", "a a a b b c a b b c d e f", Store.YES, Index.ANALYZED, TermVector.WITH_POSITIONS_OFFSETS ) ); - doc.add( new Field( "f", "b a b a f", Store.YES, Index.ANALYZED, TermVector.WITH_POSITIONS_OFFSETS ) ); - writer.addDocument( doc ); - writer.close(); + // Directory dir = new RAMDirectory(); + // IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig(Version.LUCENE_CURRENT, analyzer)); + // Document doc = new Document(); + // doc.add( new Field( "f", "a a a b b c a b b c d e f", Store.YES, Index.ANALYZED, TermVector.WITH_POSITIONS_OFFSETS ) ); + // doc.add( new Field( "f", "b a b a f", Store.YES, Index.ANALYZED, TermVector.WITH_POSITIONS_OFFSETS ) ); + // writer.addDocument( doc ); + // writer.close(); - IndexReader reader = IndexReader.open( dir, true ); - new FieldTermStack( reader, 0, "f", fieldQuery ); - reader.close(); - } + // IndexReader reader = IndexReader.open( dir, true ); + // new FieldTermStack( reader, 0, "f", fieldQuery ); + // reader.close(); + //} /** * a constructor. diff --git a/lucene/contrib/lucli/build.xml b/lucene/contrib/lucli/build.xml index 61837dee15f..167a8d1af93 100644 --- a/lucene/contrib/lucli/build.xml +++ b/lucene/contrib/lucli/build.xml @@ -38,6 +38,22 @@ + + + + + + + + + + + + + + + diff --git a/lucene/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java b/lucene/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java index cd8137c5924..82fa02060c5 100644 --- a/lucene/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java +++ b/lucene/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java @@ -27,13 +27,9 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.KeywordAnalyzer; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenFilter; import org.apache.lucene.analysis.MockTokenizer; -import org.apache.lucene.analysis.SimpleAnalyzer; -import org.apache.lucene.analysis.StopAnalyzer; -import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexWriter; diff --git a/lucene/contrib/misc/build.xml b/lucene/contrib/misc/build.xml index ad8749c3615..732c6ec1290 100644 --- a/lucene/contrib/misc/build.xml +++ b/lucene/contrib/misc/build.xml @@ -27,4 +27,19 @@ + + + + + + + + + + + + + + diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java b/lucene/contrib/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java index 3092d4287b7..bd2b130849e 100644 --- a/lucene/contrib/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java +++ b/lucene/contrib/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java @@ -21,7 +21,7 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; -import org.apache.lucene.analysis.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.lucene.index.IndexWriterConfig.OpenMode; import org.apache.lucene.store.Directory; import org.apache.lucene.store.FSDirectory; diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/misc/IndexMergeTool.java b/lucene/contrib/misc/src/java/org/apache/lucene/misc/IndexMergeTool.java index 1ed7c93c874..bbda292c0c1 100644 --- a/lucene/contrib/misc/src/java/org/apache/lucene/misc/IndexMergeTool.java +++ b/lucene/contrib/misc/src/java/org/apache/lucene/misc/IndexMergeTool.java @@ -16,7 +16,7 @@ package org.apache.lucene.misc; * limitations under the License. */ -import org.apache.lucene.analysis.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.index.IndexWriterConfig.OpenMode; diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java b/lucene/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java index 2560cd2cc55..f7970f8d8ff 100644 --- a/lucene/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java +++ b/lucene/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java @@ -32,7 +32,6 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.analysis.tokenattributes.TermAttribute; import org.apache.lucene.document.Document; import org.apache.lucene.index.IndexReader; @@ -49,7 +48,6 @@ import org.apache.lucene.search.TermQuery; import org.apache.lucene.search.TopDocs; import org.apache.lucene.store.FSDirectory; import org.apache.lucene.util.PriorityQueue; -import org.apache.lucene.util.Version; /** @@ -158,13 +156,6 @@ public final class MoreLikeThis { */ public static final int DEFAULT_MAX_NUM_TOKENS_PARSED=5000; - - /** - * Default analyzer to parse source doc with. - * @see #getAnalyzer - */ - public static final Analyzer DEFAULT_ANALYZER = new StandardAnalyzer(Version.LUCENE_CURRENT); - /** * Ignore terms with less than this frequency in the source doc. * @see #getMinTermFreq @@ -240,7 +231,7 @@ public final class MoreLikeThis { /** * Analyzer that will be used to parse the doc. */ - private Analyzer analyzer = DEFAULT_ANALYZER; + private Analyzer analyzer = null; /** * Ignore words less frequent that this. @@ -343,10 +334,9 @@ public final class MoreLikeThis { /** * Returns an analyzer that will be used to parse source doc with. The default analyzer - * is the {@link #DEFAULT_ANALYZER}. + * is not set. * * @return the analyzer that will be used to parse source doc with. - * @see #DEFAULT_ANALYZER */ public Analyzer getAnalyzer() { return analyzer; @@ -887,6 +877,10 @@ public final class MoreLikeThis { private void addTermFrequencies(Reader r, Map termFreqMap, String fieldName) throws IOException { + if (analyzer == null) { + throw new UnsupportedOperationException("To use MoreLikeThis without " + + "term vectors, you must provide an Analyzer"); + } TokenStream ts = analyzer.tokenStream(fieldName, r); int tokenCount=0; // for every token diff --git a/lucene/contrib/queries/src/test/org/apache/lucene/search/BooleanFilterTest.java b/lucene/contrib/queries/src/test/org/apache/lucene/search/BooleanFilterTest.java index e40a7aaef14..2e768c1c87a 100644 --- a/lucene/contrib/queries/src/test/org/apache/lucene/search/BooleanFilterTest.java +++ b/lucene/contrib/queries/src/test/org/apache/lucene/search/BooleanFilterTest.java @@ -21,7 +21,6 @@ import java.io.IOException; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenizer; -import org.apache.lucene.analysis.WhitespaceAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; diff --git a/lucene/contrib/queries/src/test/org/apache/lucene/search/similar/TestMoreLikeThis.java b/lucene/contrib/queries/src/test/org/apache/lucene/search/similar/TestMoreLikeThis.java index 9140aaab0ae..25e6c32f570 100644 --- a/lucene/contrib/queries/src/test/org/apache/lucene/search/similar/TestMoreLikeThis.java +++ b/lucene/contrib/queries/src/test/org/apache/lucene/search/similar/TestMoreLikeThis.java @@ -24,6 +24,7 @@ import java.util.List; import java.util.Map; import org.apache.lucene.analysis.MockAnalyzer; +import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; @@ -76,6 +77,7 @@ public class TestMoreLikeThis extends LuceneTestCase { MoreLikeThis mlt = new MoreLikeThis( reader); + mlt.setAnalyzer(new MockAnalyzer(MockTokenizer.WHITESPACE, false)); mlt.setMinDocFreq(1); mlt.setMinTermFreq(1); mlt.setMinWordLen(1); @@ -110,6 +112,7 @@ public class TestMoreLikeThis extends LuceneTestCase { private Map getOriginalValues() throws IOException { Map originalValues = new HashMap(); MoreLikeThis mlt = new MoreLikeThis(reader); + mlt.setAnalyzer(new MockAnalyzer(MockTokenizer.WHITESPACE, false)); mlt.setMinDocFreq(1); mlt.setMinTermFreq(1); mlt.setMinWordLen(1); diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.java index f8043bc9a57..b76ddf0d3c5 100644 --- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.java +++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.java @@ -577,22 +577,6 @@ public class PrecedenceQueryParser implements PrecedenceQueryParserConstants { return sb.toString(); } - /** - * Command line tool to test QueryParser, using {@link org.apache.lucene.analysis.SimpleAnalyzer}. - * Usage:
    - * java org.apache.lucene.queryParser.QueryParser <input> - */ - public static void main(String[] args) throws Exception { - if (args.length == 0) { - System.out.println("Usage: java org.apache.lucene.queryParser.QueryParser "); - System.exit(0); - } - PrecedenceQueryParser qp = new PrecedenceQueryParser("field", - new org.apache.lucene.analysis.SimpleAnalyzer()); - Query q = qp.parse(args[0]); - System.out.println(q.toString("field")); - } - // * Query ::= ( Clause )* // * Clause ::= ["+", "-"] [ ":"] ( | "(" Query ")" ) final public int Conjunction() throws ParseException { @@ -1290,4 +1274,19 @@ public class PrecedenceQueryParser implements PrecedenceQueryParserConstants { JJCalls next; } + /** + * Command line tool to test QueryParser, using {@link org.apache.lucene.analysis.SimpleAnalyzer}. + * Usage:
    + * java org.apache.lucene.queryParser.QueryParser <input> + */ +// public static void main(String[] args) throws Exception { +// if (args.length == 0) { +// System.out.println("Usage: java org.apache.lucene.queryParser.QueryParser "); +// System.exit(0); +// } +// PrecedenceQueryParser qp = new PrecedenceQueryParser("field", +// new org.apache.lucene.analysis.SimpleAnalyzer()); +// Query q = qp.parse(args[0]); +// System.out.println(q.toString("field")); +// } } diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.jj b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.jj index 9794e13eb30..9cd21242042 100644 --- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.jj +++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.jj @@ -606,16 +606,16 @@ public class PrecedenceQueryParser { * Usage:
    * java org.apache.lucene.queryParser.QueryParser <input> */ - public static void main(String[] args) throws Exception { - if (args.length == 0) { - System.out.println("Usage: java org.apache.lucene.queryParser.QueryParser "); - System.exit(0); - } - PrecedenceQueryParser qp = new PrecedenceQueryParser("field", - new org.apache.lucene.analysis.SimpleAnalyzer()); - Query q = qp.parse(args[0]); - System.out.println(q.toString("field")); - } +// public static void main(String[] args) throws Exception { +// if (args.length == 0) { +// System.out.println("Usage: java org.apache.lucene.queryParser.QueryParser "); +// System.exit(0); +// } +// PrecedenceQueryParser qp = new PrecedenceQueryParser("field", +// new org.apache.lucene.analysis.SimpleAnalyzer()); +// Query q = qp.parse(args[0]); +// System.out.println(q.toString("field")); +// } } PARSER_END(PrecedenceQueryParser) diff --git a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestMultiAnalyzerQPHelper.java b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestMultiAnalyzerQPHelper.java index e53e3c12f2d..e98cc6f80a3 100644 --- a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestMultiAnalyzerQPHelper.java +++ b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestMultiAnalyzerQPHelper.java @@ -20,11 +20,9 @@ package org.apache.lucene.queryParser.standard; import java.io.Reader; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.LowerCaseFilter; import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.standard.StandardTokenizer; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; import org.apache.lucene.analysis.tokenattributes.TermAttribute; diff --git a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestQPHelper.java b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestQPHelper.java index 27b3dfa4294..addbca26476 100644 --- a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestQPHelper.java +++ b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestQPHelper.java @@ -32,7 +32,6 @@ import java.util.Locale; import java.util.Map; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.KeywordAnalyzer; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenFilter; import org.apache.lucene.analysis.MockTokenizer; @@ -341,8 +340,9 @@ public class TestQPHelper extends LocalizedTestCase { "t�rm term term"); assertQueryEquals("�mlaut", new MockAnalyzer(MockTokenizer.WHITESPACE, false), "�mlaut"); - assertQueryEquals("\"\"", new KeywordAnalyzer(), ""); - assertQueryEquals("foo:\"\"", new KeywordAnalyzer(), "foo:"); + // FIXME: change MockAnalyzer to not extend CharTokenizer for this test + //assertQueryEquals("\"\"", new KeywordAnalyzer(), ""); + //assertQueryEquals("foo:\"\"", new KeywordAnalyzer(), "foo:"); assertQueryEquals("a AND b", null, "+a +b"); assertQueryEquals("(a AND b)", null, "+a +b"); diff --git a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestQueryParserWrapper.java b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestQueryParserWrapper.java index b08c306bf14..b3a28dbe1b0 100644 --- a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestQueryParserWrapper.java +++ b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestQueryParserWrapper.java @@ -30,7 +30,6 @@ import java.util.List; import java.util.Locale; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.KeywordAnalyzer; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenFilter; import org.apache.lucene.analysis.MockTokenizer; @@ -333,8 +332,9 @@ public class TestQueryParserWrapper extends LocalizedTestCase { "t�rm term term"); assertQueryEquals("�mlaut", new MockAnalyzer(MockTokenizer.WHITESPACE, false), "�mlaut"); - assertQueryEquals("\"\"", new KeywordAnalyzer(), ""); - assertQueryEquals("foo:\"\"", new KeywordAnalyzer(), "foo:"); + //FIXME: Change MockAnalyzer to not extend CharTokenizer for this test + //assertQueryEquals("\"\"", new KeywordAnalyzer(), ""); + //assertQueryEquals("foo:\"\"", new KeywordAnalyzer(), "foo:"); assertQueryEquals("a AND b", null, "+a +b"); assertQueryEquals("(a AND b)", null, "+a +b"); diff --git a/lucene/contrib/spellchecker/build.xml b/lucene/contrib/spellchecker/build.xml index d89be94a268..3d92680dd33 100755 --- a/lucene/contrib/spellchecker/build.xml +++ b/lucene/contrib/spellchecker/build.xml @@ -24,4 +24,20 @@ + + + + + + + + + + + + + + + diff --git a/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java b/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java index 36836d4b7d6..c35acd073dc 100755 --- a/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java +++ b/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java @@ -20,7 +20,7 @@ package org.apache.lucene.search.spell; import java.io.IOException; import java.util.Iterator; -import org.apache.lucene.analysis.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; diff --git a/lucene/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestLuceneDictionary.java b/lucene/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestLuceneDictionary.java index 340cfcb5143..7c68947e964 100644 --- a/lucene/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestLuceneDictionary.java +++ b/lucene/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestLuceneDictionary.java @@ -22,7 +22,7 @@ import java.util.Iterator; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenizer; -import org.apache.lucene.analysis.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; diff --git a/lucene/contrib/swing/build.xml b/lucene/contrib/swing/build.xml index 170978ab774..3dcecc898d4 100644 --- a/lucene/contrib/swing/build.xml +++ b/lucene/contrib/swing/build.xml @@ -25,6 +25,22 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index already exists - must remove first. diff --git a/lucene/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java b/lucene/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java index d723a3174b6..847c952d2a3 100644 --- a/lucene/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java +++ b/lucene/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java @@ -23,12 +23,12 @@ import java.io.IOException; import java.io.Reader; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.LowerCaseFilter; import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; public class TestSynonymTokenFilter extends BaseTokenStreamTestCase { final String testFile = "testSynonyms.txt"; diff --git a/lucene/src/java/org/apache/lucene/analysis/TokenStream.java b/lucene/src/java/org/apache/lucene/analysis/TokenStream.java index e4321321918..6fb7e8cc4bb 100644 --- a/lucene/src/java/org/apache/lucene/analysis/TokenStream.java +++ b/lucene/src/java/org/apache/lucene/analysis/TokenStream.java @@ -156,7 +156,7 @@ public abstract class TokenStream extends AttributeSource implements Closeable { * This method can be used to perform any end-of-stream operations, such as * setting the final offset of a stream. The final offset of a stream might * differ from the offset of the last token eg in case one or more whitespaces - * followed after the last token, but a {@link WhitespaceTokenizer} was used. + * followed after the last token, but a WhitespaceTokenizer was used. * * @throws IOException */ diff --git a/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java b/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java index 238833ce2bd..9fed418e9a7 100644 --- a/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java +++ b/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java @@ -1082,22 +1082,6 @@ public class QueryParser implements QueryParserConstants { return sb.toString(); } - /** - * Command line tool to test QueryParser, using {@link org.apache.lucene.analysis.SimpleAnalyzer}. - * Usage:
    - * java org.apache.lucene.queryParser.QueryParser <input> - */ - public static void main(String[] args) throws Exception { - if (args.length == 0) { - System.out.println("Usage: java org.apache.lucene.queryParser.QueryParser "); - System.exit(0); - } - QueryParser qp = new QueryParser(Version.LUCENE_CURRENT, "field", - new org.apache.lucene.analysis.SimpleAnalyzer()); - Query q = qp.parse(args[0]); - System.out.println(q.toString("field")); - } - // * Query ::= ( Clause )* // * Clause ::= ["+", "-"] [ ":"] ( | "(" Query ")" ) final public int Conjunction() throws ParseException { @@ -1802,4 +1786,19 @@ public class QueryParser implements QueryParserConstants { JJCalls next; } + /** + * Command line tool to test QueryParser, using {@link org.apache.lucene.analysis.SimpleAnalyzer}. + * Usage:
    + * java org.apache.lucene.queryParser.QueryParser <input> + */ +// public static void main(String[] args) throws Exception { +// if (args.length == 0) { +// System.out.println("Usage: java org.apache.lucene.queryParser.QueryParser "); +// System.exit(0); +// } +// QueryParser qp = new QueryParser(Version.LUCENE_CURRENT, "field", +// new org.apache.lucene.analysis.SimpleAnalyzer()); +// Query q = qp.parse(args[0]); +// System.out.println(q.toString("field")); +// } } diff --git a/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj b/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj index 1784114a4b8..fa4eed3cbc0 100644 --- a/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj +++ b/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj @@ -1111,16 +1111,16 @@ public class QueryParser { * Usage:
    * java org.apache.lucene.queryParser.QueryParser <input> */ - public static void main(String[] args) throws Exception { - if (args.length == 0) { - System.out.println("Usage: java org.apache.lucene.queryParser.QueryParser "); - System.exit(0); - } - QueryParser qp = new QueryParser(Version.LUCENE_CURRENT, "field", - new org.apache.lucene.analysis.SimpleAnalyzer()); - Query q = qp.parse(args[0]); - System.out.println(q.toString("field")); - } +// public static void main(String[] args) throws Exception { +// if (args.length == 0) { +// System.out.println("Usage: java org.apache.lucene.queryParser.QueryParser "); +// System.exit(0); +// } +// QueryParser qp = new QueryParser(Version.LUCENE_CURRENT, "field", +// new org.apache.lucene.analysis.SimpleAnalyzer()); +// Query q = qp.parse(args[0]); +// System.out.println(q.toString("field")); +// } } PARSER_END(QueryParser) diff --git a/lucene/src/test/org/apache/lucene/analysis/MockTokenizer.java b/lucene/src/test/org/apache/lucene/analysis/MockTokenizer.java index 0472b0038f4..539692021b8 100644 --- a/lucene/src/test/org/apache/lucene/analysis/MockTokenizer.java +++ b/lucene/src/test/org/apache/lucene/analysis/MockTokenizer.java @@ -21,6 +21,7 @@ import java.io.IOException; import java.io.Reader; import org.apache.lucene.util.Version; +import org.apache.lucene.util.AttributeSource.AttributeFactory; import org.apache.lucene.util.automaton.CharacterRunAutomaton; import org.apache.lucene.util.automaton.RegExp; @@ -45,6 +46,13 @@ public class MockTokenizer extends CharTokenizer { private final boolean lowerCase; private int state; + public MockTokenizer(AttributeFactory factory, Reader input, CharacterRunAutomaton runAutomaton, boolean lowerCase) { + super(Version.LUCENE_CURRENT, factory, input); + this.runAutomaton = runAutomaton; + this.lowerCase = lowerCase; + this.state = runAutomaton.getInitialState(); + } + public MockTokenizer(Reader input, CharacterRunAutomaton runAutomaton, boolean lowerCase) { super(Version.LUCENE_CURRENT, input); this.runAutomaton = runAutomaton; diff --git a/lucene/src/test/org/apache/lucene/analysis/TestCharTokenizers.java b/lucene/src/test/org/apache/lucene/analysis/TestCharTokenizers.java index 26f1737dbeb..77c2883305a 100644 --- a/lucene/src/test/org/apache/lucene/analysis/TestCharTokenizers.java +++ b/lucene/src/test/org/apache/lucene/analysis/TestCharTokenizers.java @@ -46,8 +46,7 @@ public class TestCharTokenizers extends BaseTokenStreamTestCase { } // internal buffer size is 1024 make sure we have a surrogate pair right at the border builder.insert(1023, "\ud801\udc1c"); - LowerCaseTokenizer tokenizer = new LowerCaseTokenizer( - TEST_VERSION_CURRENT, new StringReader(builder.toString())); + MockTokenizer tokenizer = new MockTokenizer(new StringReader(builder.toString()), MockTokenizer.SIMPLE, true); assertTokenStreamContents(tokenizer, builder.toString().toLowerCase().split(" ")); } @@ -64,8 +63,7 @@ public class TestCharTokenizers extends BaseTokenStreamTestCase { builder.append("a"); } builder.append("\ud801\udc1cabc"); - LowerCaseTokenizer tokenizer = new LowerCaseTokenizer( - TEST_VERSION_CURRENT, new StringReader(builder.toString())); + MockTokenizer tokenizer = new MockTokenizer(new StringReader(builder.toString()), MockTokenizer.SIMPLE, true); assertTokenStreamContents(tokenizer, new String[] {builder.toString().toLowerCase()}); } } @@ -79,8 +77,7 @@ public class TestCharTokenizers extends BaseTokenStreamTestCase { for (int i = 0; i < 255; i++) { builder.append("A"); } - LowerCaseTokenizer tokenizer = new LowerCaseTokenizer( - TEST_VERSION_CURRENT, new StringReader(builder.toString() + builder.toString())); + MockTokenizer tokenizer = new MockTokenizer(new StringReader(builder.toString() + builder.toString()), MockTokenizer.SIMPLE, true); assertTokenStreamContents(tokenizer, new String[] {builder.toString().toLowerCase(), builder.toString().toLowerCase()}); } @@ -94,42 +91,10 @@ public class TestCharTokenizers extends BaseTokenStreamTestCase { builder.append("A"); } builder.append("\ud801\udc1c"); - LowerCaseTokenizer tokenizer = new LowerCaseTokenizer( - TEST_VERSION_CURRENT, new StringReader(builder.toString() + builder.toString())); + MockTokenizer tokenizer = new MockTokenizer(new StringReader(builder.toString() + builder.toString()), MockTokenizer.SIMPLE, true); assertTokenStreamContents(tokenizer, new String[] {builder.toString().toLowerCase(), builder.toString().toLowerCase()}); } - public void testLowerCaseTokenizer() throws IOException { - StringReader reader = new StringReader("Tokenizer \ud801\udc1ctest"); - LowerCaseTokenizer tokenizer = new LowerCaseTokenizer(TEST_VERSION_CURRENT, - reader); - assertTokenStreamContents(tokenizer, new String[] { "tokenizer", - "\ud801\udc44test" }); - } - - public void testLowerCaseTokenizerBWCompat() throws IOException { - StringReader reader = new StringReader("Tokenizer \ud801\udc1ctest"); - LowerCaseTokenizer tokenizer = new LowerCaseTokenizer(Version.LUCENE_30, - reader); - assertTokenStreamContents(tokenizer, new String[] { "tokenizer", "test" }); - } - - public void testWhitespaceTokenizer() throws IOException { - StringReader reader = new StringReader("Tokenizer \ud801\udc1ctest"); - WhitespaceTokenizer tokenizer = new WhitespaceTokenizer(TEST_VERSION_CURRENT, - reader); - assertTokenStreamContents(tokenizer, new String[] { "Tokenizer", - "\ud801\udc1ctest" }); - } - - public void testWhitespaceTokenizerBWCompat() throws IOException { - StringReader reader = new StringReader("Tokenizer \ud801\udc1ctest"); - WhitespaceTokenizer tokenizer = new WhitespaceTokenizer(Version.LUCENE_30, - reader); - assertTokenStreamContents(tokenizer, new String[] { "Tokenizer", - "\ud801\udc1ctest" }); - } - public void testIsTokenCharCharInSubclass() { new TestingCharTokenizer(Version.LUCENE_30, new StringReader("")); try { diff --git a/lucene/src/test/org/apache/lucene/analysis/TestToken.java b/lucene/src/test/org/apache/lucene/analysis/TestToken.java index be5f6116497..552259d876b 100644 --- a/lucene/src/test/org/apache/lucene/analysis/TestToken.java +++ b/lucene/src/test/org/apache/lucene/analysis/TestToken.java @@ -239,7 +239,7 @@ public class TestToken extends LuceneTestCase { } public void testTokenAttributeFactory() throws Exception { - TokenStream ts = new WhitespaceTokenizer(Token.TOKEN_ATTRIBUTE_FACTORY, new StringReader("foo bar")); + TokenStream ts = new MockTokenizer(Token.TOKEN_ATTRIBUTE_FACTORY, new StringReader("foo bar"), MockTokenizer.WHITESPACE, false); assertTrue("TypeAttribute is not implemented by SenselessAttributeImpl", ts.addAttribute(SenselessAttribute.class) instanceof SenselessAttributeImpl); diff --git a/lucene/src/test/org/apache/lucene/index/TestDocumentWriter.java b/lucene/src/test/org/apache/lucene/index/TestDocumentWriter.java index 01a1fa1f993..ad292b2ffdb 100644 --- a/lucene/src/test/org/apache/lucene/index/TestDocumentWriter.java +++ b/lucene/src/test/org/apache/lucene/index/TestDocumentWriter.java @@ -25,8 +25,6 @@ import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.MockAnalyzer; -import org.apache.lucene.analysis.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; diff --git a/lucene/src/test/org/apache/lucene/index/TestIndexWriter.java b/lucene/src/test/org/apache/lucene/index/TestIndexWriter.java index 7d1ddfb8f6b..b9dfcd38ad0 100644 --- a/lucene/src/test/org/apache/lucene/index/TestIndexWriter.java +++ b/lucene/src/test/org/apache/lucene/index/TestIndexWriter.java @@ -42,7 +42,6 @@ import org.apache.lucene.analysis.MockTokenFilter; import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; import org.apache.lucene.document.Document; @@ -538,67 +537,6 @@ public class TestIndexWriter extends LuceneTestCase { } } - /** - * Make sure we skip wicked long terms. - */ - public void testWickedLongTerm() throws IOException { - RAMDirectory dir = new RAMDirectory(); - IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig( - TEST_VERSION_CURRENT, new StandardAnalyzer(TEST_VERSION_CURRENT))); - - char[] chars = new char[DocumentsWriter.MAX_TERM_LENGTH_UTF8]; - Arrays.fill(chars, 'x'); - Document doc = new Document(); - final String bigTerm = new String(chars); - - // This produces a too-long term: - String contents = "abc xyz x" + bigTerm + " another term"; - doc.add(new Field("content", contents, Field.Store.NO, Field.Index.ANALYZED)); - writer.addDocument(doc); - - // Make sure we can add another normal document - doc = new Document(); - doc.add(new Field("content", "abc bbb ccc", Field.Store.NO, Field.Index.ANALYZED)); - writer.addDocument(doc); - writer.close(); - - IndexReader reader = IndexReader.open(dir, true); - - // Make sure all terms < max size were indexed - assertEquals(2, reader.docFreq(new Term("content", "abc"))); - assertEquals(1, reader.docFreq(new Term("content", "bbb"))); - assertEquals(1, reader.docFreq(new Term("content", "term"))); - assertEquals(1, reader.docFreq(new Term("content", "another"))); - - // Make sure position is still incremented when - // massive term is skipped: - TermPositions tps = reader.termPositions(new Term("content", "another")); - assertTrue(tps.next()); - assertEquals(1, tps.freq()); - assertEquals(3, tps.nextPosition()); - - // Make sure the doc that has the massive term is in - // the index: - assertEquals("document with wicked long term should is not in the index!", 2, reader.numDocs()); - - reader.close(); - - // Make sure we can add a document with exactly the - // maximum length term, and search on that term: - doc = new Document(); - doc.add(new Field("content", bigTerm, Field.Store.NO, Field.Index.ANALYZED)); - StandardAnalyzer sa = new StandardAnalyzer(TEST_VERSION_CURRENT); - sa.setMaxTokenLength(100000); - writer = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, sa)); - writer.addDocument(doc); - writer.close(); - reader = IndexReader.open(dir, true); - assertEquals(1, reader.docFreq(new Term("content", bigTerm))); - reader.close(); - - dir.close(); - } - public void testOptimizeMaxNumSegments() throws IOException { MockRAMDirectory dir = new MockRAMDirectory(); diff --git a/lucene/src/test/org/apache/lucene/index/TestPayloads.java b/lucene/src/test/org/apache/lucene/index/TestPayloads.java index ece9a76640f..3f972347c01 100644 --- a/lucene/src/test/org/apache/lucene/index/TestPayloads.java +++ b/lucene/src/test/org/apache/lucene/index/TestPayloads.java @@ -32,7 +32,6 @@ import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.MockAnalyzer; -import org.apache.lucene.analysis.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.document.Document; diff --git a/lucene/src/test/org/apache/lucene/queryParser/TestQueryParser.java b/lucene/src/test/org/apache/lucene/queryParser/TestQueryParser.java index 511645c9292..3691b8775a9 100644 --- a/lucene/src/test/org/apache/lucene/queryParser/TestQueryParser.java +++ b/lucene/src/test/org/apache/lucene/queryParser/TestQueryParser.java @@ -29,7 +29,6 @@ import java.util.HashSet; import java.util.Locale; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.KeywordAnalyzer; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenFilter; import org.apache.lucene.analysis.MockTokenizer; @@ -255,8 +254,10 @@ public class TestQueryParser extends LocalizedTestCase { assertQueryEquals("türm term term", new MockAnalyzer(), "türm term term"); assertQueryEquals("ümlaut", new MockAnalyzer(), "ümlaut"); - assertQueryEquals("\"\"", new KeywordAnalyzer(), ""); - assertQueryEquals("foo:\"\"", new KeywordAnalyzer(), "foo:"); + // FIXME: enhance MockAnalyzer to be able to support this + // it must no longer extend CharTokenizer + //assertQueryEquals("\"\"", new KeywordAnalyzer(), ""); + //assertQueryEquals("foo:\"\"", new KeywordAnalyzer(), "foo:"); assertQueryEquals("a AND b", null, "+a +b"); assertQueryEquals("(a AND b)", null, "+a +b"); diff --git a/lucene/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java b/lucene/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java index 474dd06c7ee..d76dc7133fd 100644 --- a/lucene/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java +++ b/lucene/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java @@ -19,8 +19,6 @@ package org.apache.lucene.search; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenizer; -import org.apache.lucene.analysis.SimpleAnalyzer; -import org.apache.lucene.analysis.WhitespaceAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; diff --git a/lucene/src/test/org/apache/lucene/search/TestPositionIncrement.java b/lucene/src/test/org/apache/lucene/search/TestPositionIncrement.java index 48a6dec5768..c3724875191 100644 --- a/lucene/src/test/org/apache/lucene/search/TestPositionIncrement.java +++ b/lucene/src/test/org/apache/lucene/search/TestPositionIncrement.java @@ -21,19 +21,15 @@ import java.io.Reader; import java.io.IOException; import java.io.StringReader; import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.MockTokenizer; -import org.apache.lucene.analysis.StopFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; -import org.apache.lucene.analysis.CharArraySet; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexWriter; @@ -44,7 +40,6 @@ import org.apache.lucene.index.TermPositions; import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.store.MockRAMDirectory; import org.apache.lucene.store.Directory; -import org.apache.lucene.analysis.LowerCaseTokenizer; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.index.Payload; import org.apache.lucene.search.payloads.PayloadSpanUtil; @@ -52,9 +47,7 @@ import org.apache.lucene.search.spans.SpanNearQuery; import org.apache.lucene.search.spans.SpanQuery; import org.apache.lucene.search.spans.SpanTermQuery; import org.apache.lucene.search.spans.Spans; -import org.apache.lucene.util.Version; import org.apache.lucene.util.LuceneTestCase; -import org.apache.lucene.util.automaton.BasicAutomata; import org.apache.lucene.util.automaton.CharacterRunAutomaton; import org.apache.lucene.util.automaton.RegExp; diff --git a/lucene/src/test/org/apache/lucene/search/TestRegexpRandom2.java b/lucene/src/test/org/apache/lucene/search/TestRegexpRandom2.java index fcb4d2a771b..e7a6064c2ed 100644 --- a/lucene/src/test/org/apache/lucene/search/TestRegexpRandom2.java +++ b/lucene/src/test/org/apache/lucene/search/TestRegexpRandom2.java @@ -20,7 +20,8 @@ package org.apache.lucene.search; import java.io.IOException; import java.util.Random; -import org.apache.lucene.analysis.KeywordAnalyzer; +import org.apache.lucene.analysis.MockAnalyzer; +import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; @@ -50,7 +51,7 @@ public class TestRegexpRandom2 extends LuceneTestCase { super.setUp(); random = newRandom(); RAMDirectory dir = new RAMDirectory(); - IndexWriter writer = new IndexWriter(dir, new KeywordAnalyzer(), + IndexWriter writer = new IndexWriter(dir, new MockAnalyzer(MockTokenizer.KEYWORD, false), IndexWriter.MaxFieldLength.UNLIMITED); Document doc = new Document(); diff --git a/lucene/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java b/lucene/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java index bd755d4d26d..f928eb82b31 100755 --- a/lucene/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java +++ b/lucene/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java @@ -20,7 +20,6 @@ package org.apache.lucene.search; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenizer; -import org.apache.lucene.analysis.WhitespaceAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexWriter; diff --git a/lucene/src/test/org/apache/lucene/search/TestTermVectors.java b/lucene/src/test/org/apache/lucene/search/TestTermVectors.java index e1feda7a155..39fd3de7e76 100644 --- a/lucene/src/test/org/apache/lucene/search/TestTermVectors.java +++ b/lucene/src/test/org/apache/lucene/search/TestTermVectors.java @@ -20,7 +20,6 @@ package org.apache.lucene.search; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenizer; -import org.apache.lucene.analysis.SimpleAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.*; diff --git a/modules/analysis/CHANGES.txt b/modules/analysis/CHANGES.txt index 8e1b0db29b6..ec107a230e9 100644 --- a/modules/analysis/CHANGES.txt +++ b/modules/analysis/CHANGES.txt @@ -34,6 +34,16 @@ New Features (... in progress) * LUCENE-2413: Consolidated all Lucene analyzers into common. + - o.a.l.analysis.KeywordAnalyzer -> o.a.l.analysis.core.KeywordAnalyzer + - o.a.l.analysis.KeywordTokenizer -> o.a.l.analysis.core.KeywordTokenizer + - o.a.l.analysis.LetterTokenizer -> o.a.l.analysis.core.LetterTokenizer + - o.a.l.analysis.LowerCaseFilter -> o.a.l.analysis.core.LowerCaseFilter + - o.a.l.analysis.LowerCaseTokenizer -> o.a.l.analysis.core.LowerCaseTokenizer + - o.a.l.analysis.SimpleAnalyzer -> o.a.l.analysis.core.SimpleAnalyzer + - o.a.l.analysis.StopAnalyzer -> o.a.l.analysis.core.StopAnalyzer + - o.a.l.analysis.StopFilter -> o.a.l.analysis.core.StopFilter + - o.a.l.analysis.WhitespaceAnalyzer -> o.a.l.analysis.core.WhitespaceAnalyzer + - o.a.l.analysis.WhitespaceTokenizer -> o.a.l.analysis.core.WhitespaceTokenizer - o.a.l.analysis.PorterStemFilter -> o.a.l.analysis.en.PorterStemFilter - o.a.l.analysis.ASCIIFoldingFilter -> o.a.l.analysis.miscellaneous.ASCIIFoldingFilter - o.a.l.analysis.ISOLatin1AccentFilter -> o.a.l.analysis.miscellaneous.ISOLatin1AccentFilter @@ -44,6 +54,9 @@ New Features - o.a.l.analysis.BaseCharFilter -> o.a.l.analysis.charfilter.BaseCharFilter - o.a.l.analysis.MappingCharFilter -> o.a.l.analysis.charfilter.MappingCharFilter - o.a.l.analysis.NormalizeCharMap -> o.a.l.analysis.charfilter.NormalizeCharMap + - o.a.l.analysis.ReusableAnalyzerBase -> o.a.l.analysis.util.ReusableAnalyzerBase + - o.a.l.analysis.StopwordAnalyzerBase -> o.a.l.analysis.util.StopwordAnalyzerBase + - o.a.l.analysis.WordListLoader -> o.a.l.analysis.util.WordListLoader ... (in progress) Build diff --git a/modules/analysis/common/build.xml b/modules/analysis/common/build.xml index 5344c71aef0..596c04c9f9d 100644 --- a/modules/analysis/common/build.xml +++ b/modules/analysis/common/build.xml @@ -38,7 +38,7 @@ - + @@ -49,11 +49,27 @@ nobak="on"/> + + + + + + + + + + + + diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java index ec89f64b31c..a0d1f59a6b8 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java @@ -24,14 +24,14 @@ import java.util.Hashtable; import java.util.Set; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.LowerCaseFilter; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.util.Version; /** @@ -163,10 +163,10 @@ public final class ArabicAnalyzer extends StopwordAnalyzerBase { /** * Creates - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * used to tokenize all the text in the provided {@link Reader}. * - * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * @return {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link ArabicLetterTokenizer} filtered with * {@link LowerCaseFilter}, {@link StopFilter}, * {@link ArabicNormalizationFilter}, {@link KeywordMarkerFilter} diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/ar/ArabicLetterTokenizer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/ar/ArabicLetterTokenizer.java index 5286eac8806..09ccecd8ff8 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/ar/ArabicLetterTokenizer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/ar/ArabicLetterTokenizer.java @@ -19,7 +19,7 @@ package org.apache.lucene.analysis.ar; import java.io.Reader; import org.apache.lucene.analysis.CharTokenizer; -import org.apache.lucene.analysis.LetterTokenizer; +import org.apache.lucene.analysis.core.LetterTokenizer; import org.apache.lucene.util.AttributeSource; import org.apache.lucene.util.Version; @@ -120,7 +120,7 @@ public class ArabicLetterTokenizer extends LetterTokenizer { /** * Allows for Letter category or NonspacingMark category - * @see org.apache.lucene.analysis.LetterTokenizer#isTokenChar(int) + * @see org.apache.lucene.analysis.core.LetterTokenizer#isTokenChar(int) */ @Override protected boolean isTokenChar(int c) { diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/bg/BulgarianAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/bg/BulgarianAnalyzer.java index 99aa34f8280..a1f8a47f3e1 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/bg/BulgarianAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/bg/BulgarianAnalyzer.java @@ -23,16 +23,16 @@ import java.io.Reader; import java.util.Set; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.LowerCaseFilter; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; /** @@ -119,11 +119,11 @@ public final class BulgarianAnalyzer extends StopwordAnalyzerBase { /** * Creates a - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * which tokenizes all the text in the provided {@link Reader}. * * @return A - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java index a24e4316d48..54d0c30e0ba 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java @@ -28,16 +28,16 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; -import org.apache.lucene.analysis.LowerCaseFilter; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; /** @@ -193,10 +193,10 @@ public final class BrazilianAnalyzer extends StopwordAnalyzerBase { /** * Creates - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * used to tokenize all the text in the provided {@link Reader}. * - * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * @return {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from a {@link StandardTokenizer} filtered with * {@link LowerCaseFilter}, {@link StandardFilter}, {@link StopFilter} * , and {@link BrazilianStemFilter}. diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/cjk/CJKAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/cjk/CJKAnalyzer.java index 54104c52ac6..1bb5885cdcd 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/cjk/CJKAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/cjk/CJKAnalyzer.java @@ -19,9 +19,9 @@ package org.apache.lucene.analysis.cjk; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.Tokenizer; +import org.apache.lucene.analysis.core.StopFilter; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; import org.apache.lucene.util.Version; import java.io.Reader; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/cn/ChineseAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/cn/ChineseAnalyzer.java index d1f9387b8d1..c04c3499ee4 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/cn/ChineseAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/cn/ChineseAnalyzer.java @@ -19,8 +19,8 @@ package org.apache.lucene.analysis.cn; import java.io.Reader; -import org.apache.lucene.analysis.ReusableAnalyzerBase; import org.apache.lucene.analysis.standard.StandardAnalyzer; // javadoc @link +import org.apache.lucene.analysis.util.ReusableAnalyzerBase; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Tokenizer; @@ -35,10 +35,10 @@ public final class ChineseAnalyzer extends ReusableAnalyzerBase { /** * Creates - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * used to tokenize all the text in the provided {@link Reader}. * - * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * @return {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from a {@link ChineseTokenizer} filtered with * {@link ChineseFilter} */ diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/cn/ChineseFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/cn/ChineseFilter.java index 5ed043b98cc..87a38b161e0 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/cn/ChineseFilter.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/cn/ChineseFilter.java @@ -23,7 +23,7 @@ import java.util.Arrays; import org.apache.lucene.analysis.CharArraySet; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.StopFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.tokenattributes.TermAttribute; import org.apache.lucene.util.Version; diff --git a/lucene/src/java/org/apache/lucene/analysis/KeywordAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/KeywordAnalyzer.java similarity index 92% rename from lucene/src/java/org/apache/lucene/analysis/KeywordAnalyzer.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/core/KeywordAnalyzer.java index 74d0f4c118a..a253cb9f220 100644 --- a/lucene/src/java/org/apache/lucene/analysis/KeywordAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/KeywordAnalyzer.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -19,6 +19,8 @@ package org.apache.lucene.analysis; import java.io.Reader; +import org.apache.lucene.analysis.util.ReusableAnalyzerBase; + /** * "Tokenizes" the entire stream as a single token. This is useful * for data like zip codes, ids, and some product names. diff --git a/lucene/src/java/org/apache/lucene/analysis/KeywordTokenizer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/KeywordTokenizer.java similarity index 97% rename from lucene/src/java/org/apache/lucene/analysis/KeywordTokenizer.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/core/KeywordTokenizer.java index 8b818be8ad0..a4ac6f06692 100644 --- a/lucene/src/java/org/apache/lucene/analysis/KeywordTokenizer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/KeywordTokenizer.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -20,6 +20,7 @@ package org.apache.lucene.analysis; import java.io.IOException; import java.io.Reader; +import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.util.AttributeSource; diff --git a/lucene/src/java/org/apache/lucene/analysis/LetterTokenizer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/LetterTokenizer.java similarity index 96% rename from lucene/src/java/org/apache/lucene/analysis/LetterTokenizer.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/core/LetterTokenizer.java index 8a794157ed5..471f47114c8 100644 --- a/lucene/src/java/org/apache/lucene/analysis/LetterTokenizer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/LetterTokenizer.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -19,6 +19,8 @@ package org.apache.lucene.analysis; import java.io.Reader; +import org.apache.lucene.analysis.CharTokenizer; +import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.util.AttributeSource; import org.apache.lucene.util.Version; diff --git a/lucene/src/java/org/apache/lucene/analysis/LowerCaseFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/LowerCaseFilter.java similarity index 94% rename from lucene/src/java/org/apache/lucene/analysis/LowerCaseFilter.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/core/LowerCaseFilter.java index 7a4d7693890..e44e388d34c 100644 --- a/lucene/src/java/org/apache/lucene/analysis/LowerCaseFilter.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/LowerCaseFilter.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -19,6 +19,8 @@ package org.apache.lucene.analysis; import java.io.IOException; +import org.apache.lucene.analysis.TokenFilter; +import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.util.CharacterUtils; import org.apache.lucene.util.Version; diff --git a/lucene/src/java/org/apache/lucene/analysis/LowerCaseTokenizer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/LowerCaseTokenizer.java similarity index 97% rename from lucene/src/java/org/apache/lucene/analysis/LowerCaseTokenizer.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/core/LowerCaseTokenizer.java index ee102f0a970..b3e1072c87d 100644 --- a/lucene/src/java/org/apache/lucene/analysis/LowerCaseTokenizer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/LowerCaseTokenizer.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -19,6 +19,8 @@ package org.apache.lucene.analysis; import java.io.Reader; +import org.apache.lucene.analysis.CharTokenizer; +import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.util.AttributeSource; import org.apache.lucene.util.Version; diff --git a/lucene/src/java/org/apache/lucene/analysis/SimpleAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/SimpleAnalyzer.java similarity index 88% rename from lucene/src/java/org/apache/lucene/analysis/SimpleAnalyzer.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/core/SimpleAnalyzer.java index 590c18ebb7f..64e2c6c1bc0 100644 --- a/lucene/src/java/org/apache/lucene/analysis/SimpleAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/SimpleAnalyzer.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -19,6 +19,10 @@ package org.apache.lucene.analysis; import java.io.Reader; +import org.apache.lucene.analysis.Analyzer; +import org.apache.lucene.analysis.CharTokenizer; +import org.apache.lucene.analysis.util.ReusableAnalyzerBase; +import org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents; import org.apache.lucene.util.Version; /** An {@link Analyzer} that filters {@link LetterTokenizer} diff --git a/lucene/src/java/org/apache/lucene/analysis/StopAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopAnalyzer.java similarity index 87% rename from lucene/src/java/org/apache/lucene/analysis/StopAnalyzer.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopAnalyzer.java index 387281a9104..224a1ab7405 100644 --- a/lucene/src/java/org/apache/lucene/analysis/StopAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopAnalyzer.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -24,6 +24,12 @@ import java.util.Arrays; import java.util.Set; import java.util.List; +import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.Tokenizer; +import org.apache.lucene.analysis.util.ReusableAnalyzerBase; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; +import org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents; import org.apache.lucene.util.Version; /** Filters {@link LetterTokenizer} with {@link LowerCaseFilter} and {@link StopFilter}. @@ -91,10 +97,10 @@ public final class StopAnalyzer extends StopwordAnalyzerBase { /** * Creates - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * used to tokenize all the text in the provided {@link Reader}. * - * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * @return {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from a {@link LowerCaseTokenizer} filtered with * {@link StopFilter} */ diff --git a/lucene/src/java/org/apache/lucene/analysis/StopFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopFilter.java similarity index 98% rename from lucene/src/java/org/apache/lucene/analysis/StopFilter.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopFilter.java index 18d1a8a2db9..6f2968a4367 100644 --- a/lucene/src/java/org/apache/lucene/analysis/StopFilter.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopFilter.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -22,6 +22,9 @@ import java.util.Arrays; import java.util.Set; import java.util.List; +import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.TokenFilter; +import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.queryParser.QueryParser; // for javadoc diff --git a/lucene/src/java/org/apache/lucene/analysis/WhitespaceAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/WhitespaceAnalyzer.java similarity index 89% rename from lucene/src/java/org/apache/lucene/analysis/WhitespaceAnalyzer.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/core/WhitespaceAnalyzer.java index 011749c6304..300a0216de0 100644 --- a/lucene/src/java/org/apache/lucene/analysis/WhitespaceAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/WhitespaceAnalyzer.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -19,6 +19,9 @@ package org.apache.lucene.analysis; import java.io.Reader; +import org.apache.lucene.analysis.CharTokenizer; +import org.apache.lucene.analysis.util.ReusableAnalyzerBase; +import org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents; import org.apache.lucene.util.Version; /** diff --git a/lucene/src/java/org/apache/lucene/analysis/WhitespaceTokenizer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/WhitespaceTokenizer.java similarity index 96% rename from lucene/src/java/org/apache/lucene/analysis/WhitespaceTokenizer.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/core/WhitespaceTokenizer.java index 819a5475d7d..d3d6b5e496b 100644 --- a/lucene/src/java/org/apache/lucene/analysis/WhitespaceTokenizer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/WhitespaceTokenizer.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -19,6 +19,8 @@ package org.apache.lucene.analysis; import java.io.Reader; +import org.apache.lucene.analysis.CharTokenizer; +import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.util.AttributeSource; import org.apache.lucene.util.Version; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java index 72044931ee3..3437ec75a93 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java @@ -17,17 +17,17 @@ package org.apache.lucene.analysis.cz; * limitations under the License. */ -import org.apache.lucene.analysis.ReusableAnalyzerBase; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.ReusableAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import java.io.*; @@ -218,10 +218,10 @@ public final class CzechAnalyzer extends ReusableAnalyzerBase { /** * Creates - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * used to tokenize all the text in the provided {@link Reader}. * - * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * @return {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from a {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , and {@link CzechStemFilter} (only if version is >= LUCENE_31). If diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/da/DanishAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/da/DanishAnalyzer.java index 70990ad9202..b0a7caba00a 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/da/DanishAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/da/DanishAnalyzer.java @@ -23,16 +23,16 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import org.tartarus.snowball.ext.DanishStemmer; @@ -106,11 +106,11 @@ public final class DanishAnalyzer extends StopwordAnalyzerBase { /** * Creates a - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * which tokenizes all the text in the provided {@link Reader}. * * @return A - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/de/GermanAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/de/GermanAnalyzer.java index 27696c8792c..3f23b29c241 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/de/GermanAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/de/GermanAnalyzer.java @@ -28,17 +28,17 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; -import org.apache.lucene.analysis.LowerCaseFilter; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import org.tartarus.snowball.ext.German2Stemmer; @@ -224,10 +224,10 @@ public final class GermanAnalyzer extends StopwordAnalyzerBase { /** * Creates - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * used to tokenize all the text in the provided {@link Reader}. * - * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * @return {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from a {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/el/GreekAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/el/GreekAnalyzer.java index 4dcf341e2f2..b2a4c0b27cc 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/el/GreekAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/el/GreekAnalyzer.java @@ -17,13 +17,13 @@ package org.apache.lucene.analysis.el; */ import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; import org.apache.lucene.analysis.standard.StandardAnalyzer; // for javadoc +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; import org.apache.lucene.util.Version; import java.io.IOException; @@ -121,10 +121,10 @@ public final class GreekAnalyzer extends StopwordAnalyzerBase { /** * Creates - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * used to tokenize all the text in the provided {@link Reader}. * - * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * @return {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from a {@link StandardTokenizer} filtered with * {@link GreekLowerCaseFilter}, {@link StandardFilter}, * {@link StopFilter}, and {@link GreekStemFilter} diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/en/EnglishAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/en/EnglishAnalyzer.java index b326816b418..75d19ed39ab 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/en/EnglishAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/en/EnglishAnalyzer.java @@ -22,15 +22,15 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; import org.apache.lucene.util.Version; /** @@ -89,11 +89,11 @@ public final class EnglishAnalyzer extends StopwordAnalyzerBase { /** * Creates a - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * which tokenizes all the text in the provided {@link Reader}. * * @return A - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/es/SpanishAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/es/SpanishAnalyzer.java index e4bbd453484..275ad43e1b9 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/es/SpanishAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/es/SpanishAnalyzer.java @@ -23,16 +23,16 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import org.tartarus.snowball.ext.SpanishStemmer; @@ -106,11 +106,11 @@ public final class SpanishAnalyzer extends StopwordAnalyzerBase { /** * Creates a - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * which tokenizes all the text in the provided {@link Reader}. * * @return A - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/fa/PersianAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/fa/PersianAnalyzer.java index 62f1795ceed..88eea5b9e55 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/fa/PersianAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/fa/PersianAnalyzer.java @@ -24,14 +24,14 @@ import java.util.Hashtable; import java.util.Set; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.ar.ArabicLetterTokenizer; import org.apache.lucene.analysis.ar.ArabicNormalizationFilter; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; /** @@ -136,10 +136,10 @@ public final class PersianAnalyzer extends StopwordAnalyzerBase { /** * Creates - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * used to tokenize all the text in the provided {@link Reader}. * - * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * @return {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from a {@link ArabicLetterTokenizer} filtered with * {@link LowerCaseFilter}, {@link ArabicNormalizationFilter}, * {@link PersianNormalizationFilter} and Persian Stop words diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/fi/FinnishAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/fi/FinnishAnalyzer.java index 95896776e90..49f7f071070 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/fi/FinnishAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/fi/FinnishAnalyzer.java @@ -23,16 +23,16 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import org.tartarus.snowball.ext.FinnishStemmer; @@ -106,11 +106,11 @@ public final class FinnishAnalyzer extends StopwordAnalyzerBase { /** * Creates a - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * which tokenizes all the text in the provided {@link Reader}. * * @return A - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java index f68c5c2cb10..96df139ff2e 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java @@ -19,17 +19,17 @@ package org.apache.lucene.analysis.fr; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; -import org.apache.lucene.analysis.LowerCaseFilter; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; import org.apache.lucene.analysis.standard.StandardAnalyzer; // for javadoc +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import java.io.File; @@ -225,10 +225,10 @@ public final class FrenchAnalyzer extends StopwordAnalyzerBase { /** * Creates - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * used to tokenize all the text in the provided {@link Reader}. * - * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * @return {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from a {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link ElisionFilter}, * {@link LowerCaseFilter}, {@link StopFilter}, diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/hi/HindiAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/hi/HindiAnalyzer.java index 2da7ed8a1cd..e2c320906a6 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/hi/HindiAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/hi/HindiAnalyzer.java @@ -21,13 +21,13 @@ import java.io.IOException; import java.io.Reader; import java.util.Set; -import org.apache.lucene.analysis.LowerCaseFilter; import org.apache.lucene.analysis.CharArraySet; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.in.IndicNormalizationFilter; import org.apache.lucene.analysis.in.IndicTokenizer; import org.apache.lucene.util.Version; @@ -106,10 +106,10 @@ public final class HindiAnalyzer extends StopwordAnalyzerBase { /** * Creates - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * used to tokenize all the text in the provided {@link Reader}. * - * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * @return {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from a {@link IndicTokenizer} filtered with * {@link LowerCaseFilter}, {@link IndicNormalizationFilter}, * {@link HindiNormalizationFilter}, {@link KeywordMarkerFilter} diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/hu/HungarianAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/hu/HungarianAnalyzer.java index 10c8f734027..a51d4336a7d 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/hu/HungarianAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/hu/HungarianAnalyzer.java @@ -23,16 +23,16 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import org.tartarus.snowball.ext.HungarianStemmer; @@ -106,11 +106,11 @@ public final class HungarianAnalyzer extends StopwordAnalyzerBase { /** * Creates a - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * which tokenizes all the text in the provided {@link Reader}. * * @return A - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/id/IndonesianAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/id/IndonesianAnalyzer.java index 6d0b783bcb3..f7ff58ef37e 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/id/IndonesianAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/id/IndonesianAnalyzer.java @@ -22,14 +22,14 @@ import java.io.Reader; import java.util.Set; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; import org.apache.lucene.util.Version; /** @@ -106,10 +106,10 @@ public final class IndonesianAnalyzer extends StopwordAnalyzerBase { /** * Creates - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * used to tokenize all the text in the provided {@link Reader}. * - * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * @return {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, * {@link StopFilter}, {@link KeywordMarkerFilter} diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/it/ItalianAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/it/ItalianAnalyzer.java index 2bb51f96fb0..cec09c26335 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/it/ItalianAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/it/ItalianAnalyzer.java @@ -23,16 +23,16 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import org.tartarus.snowball.ext.ItalianStemmer; @@ -106,11 +106,11 @@ public final class ItalianAnalyzer extends StopwordAnalyzerBase { /** * Creates a - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * which tokenizes all the text in the provided {@link Reader}. * * @return A - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/PatternAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/PatternAnalyzer.java index ad5fa2d5c49..0995396cc82 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/PatternAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/PatternAnalyzer.java @@ -28,9 +28,9 @@ import java.util.regex.Pattern; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; -import org.apache.lucene.analysis.StopAnalyzer; -import org.apache.lucene.analysis.StopFilter; import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.core.StopAnalyzer; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.analysis.tokenattributes.TermAttribute; import org.apache.lucene.util.Version; @@ -40,10 +40,10 @@ import org.apache.lucene.util.Version; * {@link java.io.Reader}, that can flexibly separate text into terms via a regular expression {@link Pattern} * (with behaviour identical to {@link String#split(String)}), * and that combines the functionality of - * {@link org.apache.lucene.analysis.LetterTokenizer}, - * {@link org.apache.lucene.analysis.LowerCaseTokenizer}, - * {@link org.apache.lucene.analysis.WhitespaceTokenizer}, - * {@link org.apache.lucene.analysis.StopFilter} into a single efficient + * {@link org.apache.lucene.analysis.core.LetterTokenizer}, + * {@link org.apache.lucene.analysis.core.LowerCaseTokenizer}, + * {@link org.apache.lucene.analysis.core.WhitespaceTokenizer}, + * {@link org.apache.lucene.analysis.core.StopFilter} into a single efficient * multi-purpose class. *

    * If you are unsure how exactly a regular expression should look like, consider @@ -157,7 +157,7 @@ public final class PatternAnalyzer extends Analyzer { * given stop set (after previously having applied toLowerCase() * if applicable). For example, created via * {@link StopFilter#makeStopSet(Version, String[])}and/or - * {@link org.apache.lucene.analysis.WordlistLoader}as in + * {@link org.apache.lucene.analysis.util.WordlistLoader}as in * WordlistLoader.getWordSet(new File("samples/fulltext/stopwords.txt") * or other stop words * lists . diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.java index 65db885116f..8224c6eca76 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.java @@ -19,18 +19,18 @@ package org.apache.lucene.analysis.nl; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.ReusableAnalyzerBase; -import org.apache.lucene.analysis.StopFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; import org.apache.lucene.analysis.standard.StandardAnalyzer; // for javadoc +import org.apache.lucene.analysis.util.ReusableAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import java.io.File; @@ -171,7 +171,7 @@ public final class DutchAnalyzer extends ReusableAnalyzerBase { public DutchAnalyzer(Version matchVersion, File stopwords) { // this is completely broken! try { - stoptable = org.apache.lucene.analysis.WordlistLoader.getWordSet(stopwords); + stoptable = org.apache.lucene.analysis.util.WordlistLoader.getWordSet(stopwords); } catch (IOException e) { // TODO: throw IOException throw new RuntimeException(e); @@ -208,7 +208,7 @@ public final class DutchAnalyzer extends ReusableAnalyzerBase { @Deprecated public void setStemExclusionTable(File exclusionlist) { try { - excltable = org.apache.lucene.analysis.WordlistLoader.getWordSet(exclusionlist); + excltable = org.apache.lucene.analysis.util.WordlistLoader.getWordSet(exclusionlist); setPreviousTokenStream(null); // force a new stemmer to be created } catch (IOException e) { // TODO: throw IOException diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/no/NorwegianAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/no/NorwegianAnalyzer.java index fcf3042eb8d..1ad31111f46 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/no/NorwegianAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/no/NorwegianAnalyzer.java @@ -23,16 +23,16 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import org.tartarus.snowball.ext.NorwegianStemmer; @@ -106,11 +106,11 @@ public final class NorwegianAnalyzer extends StopwordAnalyzerBase { /** * Creates a - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * which tokenizes all the text in the provided {@link Reader}. * * @return A - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/pt/PortugueseAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/pt/PortugueseAnalyzer.java index 4a521c8f1e3..7bd77612c44 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/pt/PortugueseAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/pt/PortugueseAnalyzer.java @@ -23,16 +23,16 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import org.tartarus.snowball.ext.PortugueseStemmer; @@ -106,11 +106,11 @@ public final class PortugueseAnalyzer extends StopwordAnalyzerBase { /** * Creates a - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * which tokenizes all the text in the provided {@link Reader}. * * @return A - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzer.java index 3e454634ce5..41720e6333e 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzer.java @@ -21,7 +21,7 @@ import org.apache.lucene.index.Term; import org.apache.lucene.index.TermEnum; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.StopFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.util.StringHelper; import org.apache.lucene.util.Version; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/ro/RomanianAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/ro/RomanianAnalyzer.java index e065525a433..a06d222090c 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/ro/RomanianAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/ro/RomanianAnalyzer.java @@ -23,15 +23,15 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; import org.apache.lucene.util.Version; import org.tartarus.snowball.ext.RomanianStemmer; @@ -110,11 +110,11 @@ public final class RomanianAnalyzer extends StopwordAnalyzerBase { /** * Creates a - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * which tokenizes all the text in the provided {@link Reader}. * * @return A - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianAnalyzer.java index 7d59b850559..1b94cdb0721 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianAnalyzer.java @@ -25,16 +25,16 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; -import org.apache.lucene.analysis.LowerCaseFilter; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.util.Version; /** @@ -161,10 +161,10 @@ public final class RussianAnalyzer extends StopwordAnalyzerBase /** * Creates - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * used to tokenize all the text in the provided {@link Reader}. * - * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * @return {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from a {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianLetterTokenizer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianLetterTokenizer.java index 967c8eba105..1a244e4afaa 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianLetterTokenizer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianLetterTokenizer.java @@ -20,7 +20,7 @@ package org.apache.lucene.analysis.ru; import java.io.Reader; import org.apache.lucene.analysis.CharTokenizer; import org.apache.lucene.analysis.Tokenizer; // for javadocs -import org.apache.lucene.analysis.LetterTokenizer; // for javadocs +import org.apache.lucene.analysis.core.LetterTokenizer; import org.apache.lucene.analysis.standard.StandardTokenizer; // for javadocs import org.apache.lucene.util.AttributeSource; import org.apache.lucene.util.Version; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianLowerCaseFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianLowerCaseFilter.java index 5beec03b830..6b96e16220d 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianLowerCaseFilter.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianLowerCaseFilter.java @@ -19,9 +19,9 @@ package org.apache.lucene.analysis.ru; import java.io.IOException; -import org.apache.lucene.analysis.LowerCaseFilter; // for javadoc import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.core.LowerCaseFilter; import org.apache.lucene.analysis.tokenattributes.TermAttribute; /** diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianStemFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianStemFilter.java index 3cdb5d208f3..11655a87a6b 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianStemFilter.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/ru/RussianStemFilter.java @@ -17,8 +17,8 @@ package org.apache.lucene.analysis.ru; * limitations under the License. */ +import org.apache.lucene.analysis.core.LowerCaseFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; // for javadoc -import org.apache.lucene.analysis.LowerCaseFilter; // for javadoc import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.KeywordAttribute; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/snowball/SnowballAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/snowball/SnowballAnalyzer.java index a718472604b..ed0306b595f 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/snowball/SnowballAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/snowball/SnowballAnalyzer.java @@ -18,6 +18,8 @@ package org.apache.lucene.analysis.snowball; */ import org.apache.lucene.analysis.*; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.standard.*; import org.apache.lucene.analysis.tr.TurkishLowerCaseFilter; import org.apache.lucene.util.Version; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/snowball/SnowballFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/snowball/SnowballFilter.java index 52a49b55bf6..f2e8894c397 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/snowball/SnowballFilter.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/snowball/SnowballFilter.java @@ -21,10 +21,10 @@ import java.io.IOException; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.core.LowerCaseFilter; import org.apache.lucene.analysis.tokenattributes.KeywordAttribute; import org.apache.lucene.analysis.tokenattributes.TermAttribute; import org.apache.lucene.analysis.tr.TurkishLowerCaseFilter; // javadoc @link -import org.apache.lucene.analysis.LowerCaseFilter; // javadoc @link import org.tartarus.snowball.SnowballProgram; /** diff --git a/lucene/src/java/org/apache/lucene/analysis/standard/READ_BEFORE_REGENERATING.txt b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/READ_BEFORE_REGENERATING.txt similarity index 100% rename from lucene/src/java/org/apache/lucene/analysis/standard/READ_BEFORE_REGENERATING.txt rename to modules/analysis/common/src/java/org/apache/lucene/analysis/standard/READ_BEFORE_REGENERATING.txt diff --git a/lucene/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java similarity index 94% rename from lucene/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java index a09ce1ff629..93e8ab85418 100644 --- a/lucene/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java @@ -18,6 +18,11 @@ package org.apache.lucene.analysis.standard; */ import org.apache.lucene.analysis.*; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopAnalyzer; +import org.apache.lucene.analysis.core.StopFilter; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import java.io.File; diff --git a/lucene/src/java/org/apache/lucene/analysis/standard/StandardFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardFilter.java similarity index 100% rename from lucene/src/java/org/apache/lucene/analysis/standard/StandardFilter.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardFilter.java diff --git a/lucene/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java similarity index 100% rename from lucene/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java diff --git a/lucene/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl31.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl31.java similarity index 100% rename from lucene/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl31.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl31.java diff --git a/lucene/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl31.jflex b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl31.jflex similarity index 100% rename from lucene/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl31.jflex rename to modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl31.jflex diff --git a/lucene/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImplOrig.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImplOrig.java similarity index 100% rename from lucene/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImplOrig.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImplOrig.java diff --git a/lucene/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImplOrig.jflex b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImplOrig.jflex similarity index 100% rename from lucene/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImplOrig.jflex rename to modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImplOrig.jflex diff --git a/lucene/src/java/org/apache/lucene/analysis/standard/StandardTokenizerInterface.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerInterface.java similarity index 100% rename from lucene/src/java/org/apache/lucene/analysis/standard/StandardTokenizerInterface.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerInterface.java diff --git a/lucene/src/java/org/apache/lucene/analysis/standard/package.html b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/package.html similarity index 100% rename from lucene/src/java/org/apache/lucene/analysis/standard/package.html rename to modules/analysis/common/src/java/org/apache/lucene/analysis/standard/package.html diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/sv/SwedishAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/sv/SwedishAnalyzer.java index 49653c77755..dc59097c764 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/sv/SwedishAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/sv/SwedishAnalyzer.java @@ -23,16 +23,16 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import org.tartarus.snowball.ext.SwedishStemmer; @@ -106,11 +106,11 @@ public final class SwedishAnalyzer extends StopwordAnalyzerBase { /** * Creates a - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * which tokenizes all the text in the provided {@link Reader}. * * @return A - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/th/ThaiAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/th/ThaiAnalyzer.java index d67ff98279c..f0eb1d6c7c6 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/th/ThaiAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/th/ThaiAnalyzer.java @@ -18,16 +18,16 @@ package org.apache.lucene.analysis.th; import java.io.Reader; -import org.apache.lucene.analysis.ReusableAnalyzerBase; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.StopAnalyzer; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.LowerCaseFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopAnalyzer; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.ReusableAnalyzerBase; import org.apache.lucene.util.Version; /** @@ -46,10 +46,10 @@ public final class ThaiAnalyzer extends ReusableAnalyzerBase { /** * Creates - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * used to tokenize all the text in the provided {@link Reader}. * - * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * @return {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from a {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link ThaiWordFilter}, and * {@link StopFilter} diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/th/ThaiWordFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/th/ThaiWordFilter.java index 831bba35c15..9751c1ac147 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/th/ThaiWordFilter.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/th/ThaiWordFilter.java @@ -24,7 +24,7 @@ import java.text.BreakIterator; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.LowerCaseFilter; +import org.apache.lucene.analysis.core.LowerCaseFilter; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/tr/TurkishAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/tr/TurkishAnalyzer.java index b0d9a4750d4..313c0171368 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/tr/TurkishAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/tr/TurkishAnalyzer.java @@ -23,14 +23,14 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; import org.apache.lucene.util.Version; import org.tartarus.snowball.ext.TurkishStemmer; @@ -109,11 +109,11 @@ public final class TurkishAnalyzer extends StopwordAnalyzerBase { /** * Creates a - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * which tokenizes all the text in the provided {@link Reader}. * * @return A - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link TurkishLowerCaseFilter}, * {@link StopFilter}, {@link KeywordMarkerFilter} if a stem diff --git a/lucene/src/java/org/apache/lucene/analysis/ReusableAnalyzerBase.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/util/ReusableAnalyzerBase.java similarity index 96% rename from lucene/src/java/org/apache/lucene/analysis/ReusableAnalyzerBase.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/util/ReusableAnalyzerBase.java index 2c3986a6281..ba0575d8a29 100644 --- a/lucene/src/java/org/apache/lucene/analysis/ReusableAnalyzerBase.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/util/ReusableAnalyzerBase.java @@ -15,11 +15,16 @@ * limitations under the License. */ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.util; import java.io.IOException; import java.io.Reader; +import org.apache.lucene.analysis.Analyzer; +import org.apache.lucene.analysis.TokenFilter; +import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.Tokenizer; + /** * An convenience subclass of Analyzer that makes it easy to implement * {@link TokenStream} reuse. diff --git a/lucene/src/java/org/apache/lucene/analysis/StopwordAnalyzerBase.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/util/StopwordAnalyzerBase.java similarity index 95% rename from lucene/src/java/org/apache/lucene/analysis/StopwordAnalyzerBase.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/util/StopwordAnalyzerBase.java index 4e6821205dd..8ff688600b9 100644 --- a/lucene/src/java/org/apache/lucene/analysis/StopwordAnalyzerBase.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/util/StopwordAnalyzerBase.java @@ -15,14 +15,14 @@ * limitations under the License. */ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.util; import java.io.IOException; import java.util.Set; import org.apache.lucene.analysis.CharArraySet; -import org.apache.lucene.analysis.ReusableAnalyzerBase; -import org.apache.lucene.analysis.WordlistLoader; +import org.apache.lucene.analysis.util.ReusableAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; /** diff --git a/lucene/src/java/org/apache/lucene/analysis/WordlistLoader.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/util/WordlistLoader.java similarity index 99% rename from lucene/src/java/org/apache/lucene/analysis/WordlistLoader.java rename to modules/analysis/common/src/java/org/apache/lucene/analysis/util/WordlistLoader.java index ac8a2248b39..78aa03d6c4f 100644 --- a/lucene/src/java/org/apache/lucene/analysis/WordlistLoader.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/util/WordlistLoader.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.util; /** * Licensed to the Apache Software Foundation (ASF) under one or more diff --git a/lucene/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java similarity index 98% rename from lucene/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java rename to modules/analysis/common/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java index 509b7486942..7c594228770 100644 --- a/lucene/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java @@ -20,8 +20,8 @@ package org.apache.lucene.collation; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.KeywordTokenizer; import org.apache.lucene.analysis.Tokenizer; +import org.apache.lucene.analysis.core.KeywordTokenizer; import java.text.Collator; import java.io.Reader; diff --git a/lucene/src/java/org/apache/lucene/collation/CollationKeyFilter.java b/modules/analysis/common/src/java/org/apache/lucene/collation/CollationKeyFilter.java similarity index 100% rename from lucene/src/java/org/apache/lucene/collation/CollationKeyFilter.java rename to modules/analysis/common/src/java/org/apache/lucene/collation/CollationKeyFilter.java diff --git a/lucene/src/java/org/apache/lucene/collation/package.html b/modules/analysis/common/src/java/org/apache/lucene/collation/package.html similarity index 100% rename from lucene/src/java/org/apache/lucene/collation/package.html rename to modules/analysis/common/src/java/org/apache/lucene/collation/package.html diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/bg/TestBulgarianStemmer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/bg/TestBulgarianStemmer.java index e01bcbde966..dda2f2d22fd 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/bg/TestBulgarianStemmer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/bg/TestBulgarianStemmer.java @@ -22,8 +22,8 @@ import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.WhitespaceTokenizer; import org.apache.lucene.util.Version; /** diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/br/TestBrazilianStemmer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/br/TestBrazilianStemmer.java index 6b4d31ca3ec..89cdc103b23 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/br/TestBrazilianStemmer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/br/TestBrazilianStemmer.java @@ -23,8 +23,8 @@ import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseTokenizer; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseTokenizer; /** * Test the Brazilian Stem Filter, which only modifies the term text. diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/charfilter/TestMappingCharFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/charfilter/TestMappingCharFilter.java index 08d567a3eab..448a5c70d70 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/charfilter/TestMappingCharFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/charfilter/TestMappingCharFilter.java @@ -23,7 +23,7 @@ import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.CharReader; import org.apache.lucene.analysis.CharStream; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; public class TestMappingCharFilter extends BaseTokenStreamTestCase { diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/cn/TestChineseTokenizer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/cn/TestChineseTokenizer.java index 7f125ad8a13..0f24353b0d4 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/cn/TestChineseTokenizer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/cn/TestChineseTokenizer.java @@ -24,7 +24,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.util.Version; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java index dc7d0b3ad6d..769db62b876 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java @@ -24,7 +24,7 @@ import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; /** diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java index 9fc9f9780fc..28bfbf69572 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java @@ -25,8 +25,8 @@ import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; import org.apache.lucene.analysis.compound.hyphenation.HyphenationTree; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.TermAttribute; public class TestCompoundWordTokenFilter extends BaseTokenStreamTestCase { diff --git a/lucene/src/test/org/apache/lucene/analysis/TestAnalyzers.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestAnalyzers.java similarity index 81% rename from lucene/src/test/org/apache/lucene/analysis/TestAnalyzers.java rename to modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestAnalyzers.java index e78832c7e13..febda6fe29b 100644 --- a/lucene/src/test/org/apache/lucene/analysis/TestAnalyzers.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestAnalyzers.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -21,11 +21,21 @@ import java.io.IOException; import java.io.StringReader; import java.io.Reader; +import org.apache.lucene.analysis.Analyzer; +import org.apache.lucene.analysis.BaseTokenStreamTestCase; +import org.apache.lucene.analysis.core.LowerCaseTokenizer; +import org.apache.lucene.analysis.TokenFilter; +import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.SimpleAnalyzer; +import org.apache.lucene.analysis.core.StopAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.standard.StandardTokenizer; -import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.index.Payload; +import org.apache.lucene.util.Version; public class TestAnalyzers extends BaseTokenStreamTestCase { @@ -214,6 +224,38 @@ public class TestAnalyzers extends BaseTokenStreamTestCase { new String [] { "abac\uDC16adaba" }); } + public void testLowerCaseTokenizer() throws IOException { + StringReader reader = new StringReader("Tokenizer \ud801\udc1ctest"); + LowerCaseTokenizer tokenizer = new LowerCaseTokenizer(TEST_VERSION_CURRENT, + reader); + assertTokenStreamContents(tokenizer, new String[] { "tokenizer", + "\ud801\udc44test" }); + } + + @Deprecated + public void testLowerCaseTokenizerBWCompat() throws IOException { + StringReader reader = new StringReader("Tokenizer \ud801\udc1ctest"); + LowerCaseTokenizer tokenizer = new LowerCaseTokenizer(Version.LUCENE_30, + reader); + assertTokenStreamContents(tokenizer, new String[] { "tokenizer", "test" }); + } + + public void testWhitespaceTokenizer() throws IOException { + StringReader reader = new StringReader("Tokenizer \ud801\udc1ctest"); + WhitespaceTokenizer tokenizer = new WhitespaceTokenizer(TEST_VERSION_CURRENT, + reader); + assertTokenStreamContents(tokenizer, new String[] { "Tokenizer", + "\ud801\udc1ctest" }); + } + + @Deprecated + public void testWhitespaceTokenizerBWCompat() throws IOException { + StringReader reader = new StringReader("Tokenizer \ud801\udc1ctest"); + WhitespaceTokenizer tokenizer = new WhitespaceTokenizer(Version.LUCENE_30, + reader); + assertTokenStreamContents(tokenizer, new String[] { "Tokenizer", + "\ud801\udc1ctest" }); + } } final class PayloadSetter extends TokenFilter { diff --git a/lucene/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestKeywordAnalyzer.java similarity index 93% rename from lucene/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java rename to modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestKeywordAnalyzer.java index 712e917ade9..3baa63157d2 100644 --- a/lucene/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestKeywordAnalyzer.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -19,6 +19,9 @@ package org.apache.lucene.analysis; import java.io.StringReader; +import org.apache.lucene.analysis.BaseTokenStreamTestCase; +import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.core.KeywordAnalyzer; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; @@ -27,10 +30,7 @@ import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.index.Term; import org.apache.lucene.index.TermDocs; -import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.search.IndexSearcher; -import org.apache.lucene.search.Query; -import org.apache.lucene.search.ScoreDoc; import org.apache.lucene.store.RAMDirectory; public class TestKeywordAnalyzer extends BaseTokenStreamTestCase { @@ -43,8 +43,7 @@ public class TestKeywordAnalyzer extends BaseTokenStreamTestCase { super.setUp(); directory = new RAMDirectory(); IndexWriter writer = new IndexWriter(directory, new IndexWriterConfig( - TEST_VERSION_CURRENT, new SimpleAnalyzer( - TEST_VERSION_CURRENT))); + TEST_VERSION_CURRENT, new SimpleAnalyzer(TEST_VERSION_CURRENT))); Document doc = new Document(); doc.add(new Field("partnum", "Q36", Field.Store.YES, Field.Index.NOT_ANALYZED)); diff --git a/lucene/src/test/org/apache/lucene/analysis/TestStandardAnalyzer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestStandardAnalyzer.java similarity index 77% rename from lucene/src/test/org/apache/lucene/analysis/TestStandardAnalyzer.java rename to modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestStandardAnalyzer.java index 40c82391c48..803606f0877 100644 --- a/lucene/src/test/org/apache/lucene/analysis/TestStandardAnalyzer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestStandardAnalyzer.java @@ -1,7 +1,20 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; +import java.io.IOException; +import java.util.Arrays; + +import org.apache.lucene.analysis.Analyzer; +import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.standard.StandardAnalyzer; +import org.apache.lucene.document.Document; +import org.apache.lucene.document.Field; +import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.IndexWriter; +import org.apache.lucene.index.IndexWriterConfig; +import org.apache.lucene.index.Term; +import org.apache.lucene.index.TermPositions; +import org.apache.lucene.store.RAMDirectory; import org.apache.lucene.util.Version; @@ -232,4 +245,64 @@ public class TestStandardAnalyzer extends BaseTokenStreamTestCase { assertAnalyzesTo(sa, "test\u02C6test", new String[] { "test\u02C6test" }); } + /** + * Make sure we skip wicked long terms. + */ + public void testWickedLongTerm() throws IOException { + RAMDirectory dir = new RAMDirectory(); + IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig( + TEST_VERSION_CURRENT, new StandardAnalyzer(TEST_VERSION_CURRENT))); + + char[] chars = new char[IndexWriter.MAX_TERM_LENGTH]; + Arrays.fill(chars, 'x'); + Document doc = new Document(); + final String bigTerm = new String(chars); + + // This produces a too-long term: + String contents = "abc xyz x" + bigTerm + " another term"; + doc.add(new Field("content", contents, Field.Store.NO, Field.Index.ANALYZED)); + writer.addDocument(doc); + + // Make sure we can add another normal document + doc = new Document(); + doc.add(new Field("content", "abc bbb ccc", Field.Store.NO, Field.Index.ANALYZED)); + writer.addDocument(doc); + writer.close(); + + IndexReader reader = IndexReader.open(dir, true); + + // Make sure all terms < max size were indexed + assertEquals(2, reader.docFreq(new Term("content", "abc"))); + assertEquals(1, reader.docFreq(new Term("content", "bbb"))); + assertEquals(1, reader.docFreq(new Term("content", "term"))); + assertEquals(1, reader.docFreq(new Term("content", "another"))); + + // Make sure position is still incremented when + // massive term is skipped: + TermPositions tps = reader.termPositions(new Term("content", "another")); + assertTrue(tps.next()); + assertEquals(1, tps.freq()); + assertEquals(3, tps.nextPosition()); + + // Make sure the doc that has the massive term is in + // the index: + assertEquals("document with wicked long term should is not in the index!", 2, reader.numDocs()); + + reader.close(); + + // Make sure we can add a document with exactly the + // maximum length term, and search on that term: + doc = new Document(); + doc.add(new Field("content", bigTerm, Field.Store.NO, Field.Index.ANALYZED)); + StandardAnalyzer sa = new StandardAnalyzer(TEST_VERSION_CURRENT); + sa.setMaxTokenLength(100000); + writer = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, sa)); + writer.addDocument(doc); + writer.close(); + reader = IndexReader.open(dir, true); + assertEquals(1, reader.docFreq(new Term("content", bigTerm))); + reader.close(); + + dir.close(); + } } diff --git a/lucene/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestStopAnalyzer.java similarity index 95% rename from lucene/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java rename to modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestStopAnalyzer.java index 4eb35df33f7..a453d62ec8d 100644 --- a/lucene/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestStopAnalyzer.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -17,6 +17,9 @@ package org.apache.lucene.analysis; * limitations under the License. */ +import org.apache.lucene.analysis.BaseTokenStreamTestCase; +import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.core.StopAnalyzer; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.util.Version; diff --git a/lucene/src/test/org/apache/lucene/analysis/TestStopFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestStopFilter.java similarity index 95% rename from lucene/src/test/org/apache/lucene/analysis/TestStopFilter.java rename to modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestStopFilter.java index ec989a51817..c17843f6903 100644 --- a/lucene/src/test/org/apache/lucene/analysis/TestStopFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestStopFilter.java @@ -1,4 +1,4 @@ -package org.apache.lucene.analysis; +package org.apache.lucene.analysis.core; /** * Copyright 2005 The Apache Software Foundation @@ -16,6 +16,10 @@ package org.apache.lucene.analysis; * limitations under the License. */ +import org.apache.lucene.analysis.BaseTokenStreamTestCase; +import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.core.StopFilter; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.util.English; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/cz/TestCzechStemmer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/cz/TestCzechStemmer.java index d2e9b522c73..75bb06057d4 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/cz/TestCzechStemmer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/cz/TestCzechStemmer.java @@ -22,8 +22,8 @@ import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.WhitespaceTokenizer; /** * Test the Czech Stemmer. diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanAnalyzer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanAnalyzer.java index 8b85b27ef85..94574ca4f2d 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanAnalyzer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanAnalyzer.java @@ -23,8 +23,8 @@ import java.io.StringReader; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseTokenizer; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseTokenizer; import org.apache.lucene.util.Version; public class TestGermanAnalyzer extends BaseTokenStreamTestCase { diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanStemFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanStemFilter.java index 213be5e6bb9..0376ff5bebe 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanStemFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanStemFilter.java @@ -24,10 +24,10 @@ import java.io.InputStreamReader; import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.KeywordTokenizer; -import org.apache.lucene.analysis.LowerCaseFilter; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.Tokenizer; +import org.apache.lucene.analysis.core.KeywordTokenizer; +import org.apache.lucene.analysis.core.LowerCaseFilter; /** * Test the German stemmer. The stemming algorithm is known to work less diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/en/TestPorterStemFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/en/TestPorterStemFilter.java index 613f540e778..96a61221c2c 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/en/TestPorterStemFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/en/TestPorterStemFilter.java @@ -26,11 +26,11 @@ import java.util.zip.ZipFile; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.KeywordTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.KeywordTokenizer; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; /** * Test the PorterStemFilter with Martin Porter's test data. diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/hi/TestHindiNormalizer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/hi/TestHindiNormalizer.java index 42c478163d8..8d5195dc897 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/hi/TestHindiNormalizer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/hi/TestHindiNormalizer.java @@ -23,7 +23,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Test HindiNormalizer diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/hi/TestHindiStemmer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/hi/TestHindiStemmer.java index cce0015cf67..06cda993915 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/hi/TestHindiStemmer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/hi/TestHindiStemmer.java @@ -23,7 +23,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Test HindiStemmer diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/id/TestIndonesianStemmer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/id/TestIndonesianStemmer.java index 09c3c94252b..3d8468db5f7 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/id/TestIndonesianStemmer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/id/TestIndonesianStemmer.java @@ -22,9 +22,9 @@ import java.io.Reader; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.KeywordTokenizer; -import org.apache.lucene.analysis.ReusableAnalyzerBase; import org.apache.lucene.analysis.Tokenizer; +import org.apache.lucene.analysis.core.KeywordTokenizer; +import org.apache.lucene.analysis.util.ReusableAnalyzerBase; /** * Tests {@link IndonesianStemmer} diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/in/TestIndicNormalizer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/in/TestIndicNormalizer.java index b1ffd9b4b50..1d586d18493 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/in/TestIndicNormalizer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/in/TestIndicNormalizer.java @@ -23,7 +23,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Test IndicNormalizer diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/PatternAnalyzerTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/PatternAnalyzerTest.java index a3464706916..a0a59f661ab 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/PatternAnalyzerTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/PatternAnalyzerTest.java @@ -22,8 +22,8 @@ import java.util.Arrays; import java.util.regex.Pattern; import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.StopAnalyzer; import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.core.StopAnalyzer; /** * Verifies the behavior of PatternAnalyzer. diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestASCIIFoldingFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestASCIIFoldingFilter.java index d76954f8bc5..824a8995a51 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestASCIIFoldingFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestASCIIFoldingFilter.java @@ -19,7 +19,7 @@ package org.apache.lucene.analysis.miscellaneous; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import java.io.StringReader; import java.util.List; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestHyphenatedWordsFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestHyphenatedWordsFilter.java index 5545fa8a24f..a51fa227435 100755 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestHyphenatedWordsFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestHyphenatedWordsFilter.java @@ -21,7 +21,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * HyphenatedWordsFilter test diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestISOLatin1AccentFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestISOLatin1AccentFilter.java index 4225ecf0a35..8092810b2f6 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestISOLatin1AccentFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestISOLatin1AccentFilter.java @@ -19,7 +19,7 @@ package org.apache.lucene.analysis.miscellaneous; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import java.io.StringReader; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestKeepWordFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestKeepWordFilter.java index bea2a485503..e1ebf7d2bfc 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestKeepWordFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestKeepWordFilter.java @@ -23,7 +23,7 @@ import java.util.Set; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** Test {@link KeepWordFilter} */ public class TestKeepWordFilter extends BaseTokenStreamTestCase { diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestKeywordMarkerFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestKeywordMarkerFilter.java index b24112b0b9c..9500c40356a 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestKeywordMarkerFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestKeywordMarkerFilter.java @@ -10,7 +10,7 @@ import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.CharArraySet; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.KeywordAttribute; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.junit.Test; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLengthFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLengthFilter.java index 010110c6178..de8b7311d19 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLengthFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLengthFilter.java @@ -18,6 +18,7 @@ package org.apache.lucene.analysis.miscellaneous; */ import org.apache.lucene.analysis.*; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import java.io.StringReader; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestPerFieldAnalzyerWrapper.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestPerFieldAnalzyerWrapper.java index a06bac83a9f..fa2c51d2d1a 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestPerFieldAnalzyerWrapper.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestPerFieldAnalzyerWrapper.java @@ -3,6 +3,8 @@ package org.apache.lucene.analysis.miscellaneous; import java.io.StringReader; import org.apache.lucene.analysis.*; +import org.apache.lucene.analysis.core.SimpleAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; /** diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestPrefixAndSuffixAwareTokenFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestPrefixAndSuffixAwareTokenFilter.java index 1fe55e37a0a..a266fff3395 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestPrefixAndSuffixAwareTokenFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestPrefixAndSuffixAwareTokenFilter.java @@ -19,7 +19,7 @@ package org.apache.lucene.analysis.miscellaneous; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.Token; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import java.io.IOException; import java.io.StringReader; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestPrefixAwareTokenFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestPrefixAwareTokenFilter.java index b10fc739b8e..c7c9ae5efba 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestPrefixAwareTokenFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestPrefixAwareTokenFilter.java @@ -19,7 +19,7 @@ package org.apache.lucene.analysis.miscellaneous; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.Token; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import java.io.IOException; import java.io.StringReader; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestStemmerOverrideFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestStemmerOverrideFilter.java index bf9e1290d7c..463faf403a1 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestStemmerOverrideFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestStemmerOverrideFilter.java @@ -6,7 +6,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.KeywordTokenizer; +import org.apache.lucene.analysis.core.KeywordTokenizer; import org.apache.lucene.analysis.en.PorterStemFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java index e04a4694e42..e17d6936269 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java @@ -20,12 +20,12 @@ package org.apache.lucene.analysis.miscellaneous; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.CharArraySet; -import org.apache.lucene.analysis.KeywordTokenizer; -import org.apache.lucene.analysis.StopFilter; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Token; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.KeywordTokenizer; +import org.apache.lucene.analysis.core.StopFilter; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilterTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilterTest.java index 346af2a353a..903e254408f 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilterTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilterTest.java @@ -18,8 +18,8 @@ package org.apache.lucene.analysis.ngram; */ import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import java.io.StringReader; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenFilterTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenFilterTest.java index ed7c1701e52..9443a25976f 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenFilterTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenFilterTest.java @@ -18,8 +18,8 @@ package org.apache.lucene.analysis.ngram; */ import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import java.io.StringReader; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternReplaceCharFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternReplaceCharFilter.java index 071d6019c06..56418b5aadb 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternReplaceCharFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternReplaceCharFilter.java @@ -25,7 +25,7 @@ import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.CharReader; import org.apache.lucene.analysis.CharStream; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Tests {@link PatternReplaceCharFilter} diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternReplaceFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternReplaceFilter.java index 41e664b6a31..56e7da392ea 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternReplaceFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternReplaceFilter.java @@ -19,7 +19,7 @@ package org.apache.lucene.analysis.pattern; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import java.io.StringReader; import java.util.regex.Pattern; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/DelimitedPayloadTokenFilterTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/DelimitedPayloadTokenFilterTest.java index 1e8970bbbfc..dc1e53fb5de 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/DelimitedPayloadTokenFilterTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/DelimitedPayloadTokenFilterTest.java @@ -17,7 +17,7 @@ package org.apache.lucene.analysis.payloads; */ import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; import org.apache.lucene.analysis.tokenattributes.TermAttribute; import org.apache.lucene.index.Payload; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/NumericPayloadTokenFilterTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/NumericPayloadTokenFilterTest.java index a0f479e6edc..7cc9a4a56d5 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/NumericPayloadTokenFilterTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/NumericPayloadTokenFilterTest.java @@ -19,7 +19,7 @@ package org.apache.lucene.analysis.payloads; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; import org.apache.lucene.analysis.tokenattributes.TermAttribute; import org.apache.lucene.analysis.tokenattributes.TypeAttribute; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/TokenOffsetPayloadTokenFilterTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/TokenOffsetPayloadTokenFilterTest.java index e503395e325..371e45c1b16 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/TokenOffsetPayloadTokenFilterTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/TokenOffsetPayloadTokenFilterTest.java @@ -17,7 +17,7 @@ package org.apache.lucene.analysis.payloads; */ import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; import org.apache.lucene.index.Payload; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/TypeAsPayloadTokenFilterTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/TypeAsPayloadTokenFilterTest.java index b07bd72d79c..aacebe85894 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/TypeAsPayloadTokenFilterTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/payloads/TypeAsPayloadTokenFilterTest.java @@ -19,7 +19,7 @@ package org.apache.lucene.analysis.payloads; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; import org.apache.lucene.analysis.tokenattributes.TermAttribute; import org.apache.lucene.analysis.tokenattributes.TypeAttribute; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzerTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzerTest.java index 2993dcf21e6..7ed432a9ddf 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzerTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzerTest.java @@ -22,10 +22,10 @@ import java.io.StringReader; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.LetterTokenizer; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceAnalyzer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.LetterTokenizer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.TermAttribute; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/reverse/TestReverseStringFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/reverse/TestReverseStringFilter.java index fe1a3197bcc..b55b7353a30 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/reverse/TestReverseStringFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/reverse/TestReverseStringFilter.java @@ -20,7 +20,7 @@ package org.apache.lucene.analysis.reverse; import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.TermAttribute; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.util.Version; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapperTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapperTest.java index 6cda8139b66..ba7346c5889 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapperTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapperTest.java @@ -22,10 +22,10 @@ import java.io.StringReader; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.LetterTokenizer; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceAnalyzer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.LetterTokenizer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; import org.apache.lucene.analysis.tokenattributes.TermAttribute; import org.apache.lucene.document.Document; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleFilterTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleFilterTest.java index d5c43f792bb..34ffcb8b457 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleFilterTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleFilterTest.java @@ -24,7 +24,7 @@ import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.Token; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.*; public class ShingleFilterTest extends BaseTokenStreamTestCase { diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java index c715df04554..363b97dfc0e 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java @@ -24,6 +24,7 @@ import java.util.Iterator; import java.util.LinkedList; import org.apache.lucene.analysis.*; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.miscellaneous.EmptyTokenStream; import org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter; import org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/DateRecognizerSinkTokenizerTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/DateRecognizerSinkTokenizerTest.java index 7479a6d680f..344fbded5ff 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/DateRecognizerSinkTokenizerTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/DateRecognizerSinkTokenizerTest.java @@ -22,7 +22,7 @@ import java.text.SimpleDateFormat; import java.util.Locale; import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; public class DateRecognizerSinkTokenizerTest extends BaseTokenStreamTestCase { diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TestTeeSinkTokenFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TestTeeSinkTokenFilter.java index 54adc3b7823..57e7831761a 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TestTeeSinkTokenFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TestTeeSinkTokenFilter.java @@ -19,11 +19,11 @@ package org.apache.lucene.analysis.sinks; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.CachingTokenFilter; -import org.apache.lucene.analysis.LowerCaseFilter; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceAnalyzer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TokenRangeSinkTokenizerTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TokenRangeSinkTokenizerTest.java index 8e993682c02..10d9cc4fe67 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TokenRangeSinkTokenizerTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TokenRangeSinkTokenizerTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; public class TokenRangeSinkTokenizerTest extends BaseTokenStreamTestCase { diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TokenTypeSinkTokenizerTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TokenTypeSinkTokenizerTest.java index 6455e73c06c..bb3fe3c546a 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TokenTypeSinkTokenizerTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TokenTypeSinkTokenizerTest.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.TermAttribute; import org.apache.lucene.analysis.tokenattributes.TypeAttribute; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/snowball/TestSnowballVocab.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/snowball/TestSnowballVocab.java index fd7a3a1611e..22790cc7dca 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/snowball/TestSnowballVocab.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/snowball/TestSnowballVocab.java @@ -25,9 +25,9 @@ import java.io.StringReader; import java.util.zip.ZipFile; import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.KeywordTokenizer; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; +import org.apache.lucene.analysis.core.KeywordTokenizer; /** * Test the snowball filters against the snowball data tests diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymFilter.java index 25e23cdb698..a8cbff57a7d 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymFilter.java @@ -21,7 +21,7 @@ import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.Token; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.FlagsAttribute; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/tr/TestTurkishLowerCaseFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/tr/TestTurkishLowerCaseFilter.java index c2d1b1ddd0f..3885c36f881 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/tr/TestTurkishLowerCaseFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/tr/TestTurkishLowerCaseFilter.java @@ -21,7 +21,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Test the Turkish lowercase filter. diff --git a/lucene/src/test/org/apache/lucene/index/TestWordlistLoader.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/util/TestWordlistLoader.java similarity index 96% rename from lucene/src/test/org/apache/lucene/index/TestWordlistLoader.java rename to modules/analysis/common/src/test/org/apache/lucene/analysis/util/TestWordlistLoader.java index 07305239e3f..74356c42828 100644 --- a/lucene/src/test/org/apache/lucene/index/TestWordlistLoader.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/util/TestWordlistLoader.java @@ -1,4 +1,4 @@ -package org.apache.lucene.index; +package org.apache.lucene.analysis.util; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -25,7 +25,7 @@ import java.util.Set; import org.apache.lucene.util.LuceneTestCase; -import org.apache.lucene.analysis.WordlistLoader; +import org.apache.lucene.analysis.util.WordlistLoader; public class TestWordlistLoader extends LuceneTestCase { diff --git a/lucene/src/test/org/apache/lucene/collation/CollationTestBase.java b/modules/analysis/common/src/test/org/apache/lucene/collation/CollationTestBase.java similarity index 100% rename from lucene/src/test/org/apache/lucene/collation/CollationTestBase.java rename to modules/analysis/common/src/test/org/apache/lucene/collation/CollationTestBase.java diff --git a/lucene/src/test/org/apache/lucene/collation/TestCollationKeyAnalyzer.java b/modules/analysis/common/src/test/org/apache/lucene/collation/TestCollationKeyAnalyzer.java similarity index 100% rename from lucene/src/test/org/apache/lucene/collation/TestCollationKeyAnalyzer.java rename to modules/analysis/common/src/test/org/apache/lucene/collation/TestCollationKeyAnalyzer.java diff --git a/lucene/src/test/org/apache/lucene/collation/TestCollationKeyFilter.java b/modules/analysis/common/src/test/org/apache/lucene/collation/TestCollationKeyFilter.java similarity index 98% rename from lucene/src/test/org/apache/lucene/collation/TestCollationKeyFilter.java rename to modules/analysis/common/src/test/org/apache/lucene/collation/TestCollationKeyFilter.java index 533242baac0..543c0efe9a6 100644 --- a/lucene/src/test/org/apache/lucene/collation/TestCollationKeyFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/collation/TestCollationKeyFilter.java @@ -20,7 +20,7 @@ package org.apache.lucene.collation; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.KeywordTokenizer; +import org.apache.lucene.analysis.core.KeywordTokenizer; import java.text.Collator; import java.util.Locale; diff --git a/modules/analysis/icu/build.xml b/modules/analysis/icu/build.xml index a415ab70be1..6e0e64df880 100644 --- a/modules/analysis/icu/build.xml +++ b/modules/analysis/icu/build.xml @@ -38,6 +38,30 @@ + + + + + + + + + + + + + + + + + + + + ICU building dependency ${analyzers-common.jar} + + + diff --git a/modules/analysis/icu/src/java/org/apache/lucene/collation/ICUCollationKeyAnalyzer.java b/modules/analysis/icu/src/java/org/apache/lucene/collation/ICUCollationKeyAnalyzer.java index 982428ac356..4ad530ac781 100644 --- a/modules/analysis/icu/src/java/org/apache/lucene/collation/ICUCollationKeyAnalyzer.java +++ b/modules/analysis/icu/src/java/org/apache/lucene/collation/ICUCollationKeyAnalyzer.java @@ -21,7 +21,7 @@ package org.apache.lucene.collation; import com.ibm.icu.text.Collator; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.KeywordTokenizer; +import org.apache.lucene.analysis.core.KeywordTokenizer; import org.apache.lucene.analysis.Tokenizer; import java.io.Reader; diff --git a/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/TestICUFoldingFilter.java b/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/TestICUFoldingFilter.java index 350f575e967..a5ae994d211 100644 --- a/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/TestICUFoldingFilter.java +++ b/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/TestICUFoldingFilter.java @@ -23,7 +23,7 @@ import java.io.Reader; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Tests ICUFoldingFilter diff --git a/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/TestICUNormalizer2Filter.java b/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/TestICUNormalizer2Filter.java index 8b13dacea66..796627013a0 100644 --- a/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/TestICUNormalizer2Filter.java +++ b/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/TestICUNormalizer2Filter.java @@ -23,7 +23,7 @@ import java.io.Reader; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import com.ibm.icu.text.Normalizer2; diff --git a/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/TestICUTransformFilter.java b/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/TestICUTransformFilter.java index 52f8be5225b..29733ce75e6 100644 --- a/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/TestICUTransformFilter.java +++ b/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/TestICUTransformFilter.java @@ -21,7 +21,7 @@ import java.io.IOException; import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.KeywordTokenizer; +import org.apache.lucene.analysis.core.KeywordTokenizer; import org.apache.lucene.analysis.TokenStream; import com.ibm.icu.text.Transliterator; diff --git a/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/segmentation/TestICUTokenizer.java b/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/segmentation/TestICUTokenizer.java index ca7b178984b..7a5ea2168d8 100644 --- a/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/segmentation/TestICUTokenizer.java +++ b/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/segmentation/TestICUTokenizer.java @@ -23,7 +23,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.ReusableAnalyzerBase; +import org.apache.lucene.analysis.util.ReusableAnalyzerBase; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.icu.ICUNormalizer2Filter; diff --git a/modules/analysis/icu/src/test/org/apache/lucene/collation/TestICUCollationKeyFilter.java b/modules/analysis/icu/src/test/org/apache/lucene/collation/TestICUCollationKeyFilter.java index b4536fcb2d7..30c2f59fc78 100644 --- a/modules/analysis/icu/src/test/org/apache/lucene/collation/TestICUCollationKeyFilter.java +++ b/modules/analysis/icu/src/test/org/apache/lucene/collation/TestICUCollationKeyFilter.java @@ -21,7 +21,7 @@ package org.apache.lucene.collation; import com.ibm.icu.text.Collator; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.KeywordTokenizer; +import org.apache.lucene.analysis.core.KeywordTokenizer; import java.io.Reader; import java.util.Locale; diff --git a/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/SmartChineseAnalyzer.java b/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/SmartChineseAnalyzer.java index 629e401baf0..e42287935d5 100644 --- a/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/SmartChineseAnalyzer.java +++ b/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/SmartChineseAnalyzer.java @@ -26,12 +26,12 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.en.PorterStemFilter; -import org.apache.lucene.analysis.StopFilter; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.cn.smart.SentenceTokenizer; import org.apache.lucene.analysis.cn.smart.WordTokenFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.util.Version; /** diff --git a/modules/analysis/stempel/src/java/org/apache/lucene/analysis/pl/PolishAnalyzer.java b/modules/analysis/stempel/src/java/org/apache/lucene/analysis/pl/PolishAnalyzer.java index 5617612766c..7565edbce17 100644 --- a/modules/analysis/stempel/src/java/org/apache/lucene/analysis/pl/PolishAnalyzer.java +++ b/modules/analysis/stempel/src/java/org/apache/lucene/analysis/pl/PolishAnalyzer.java @@ -26,17 +26,17 @@ import java.util.Set; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.LowerCaseFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; -import org.apache.lucene.analysis.LowerCaseFilter; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopwordAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WordlistLoader; import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; import org.apache.lucene.analysis.stempel.StempelStemmer; import org.apache.lucene.analysis.stempel.StempelFilter; +import org.apache.lucene.analysis.util.StopwordAnalyzerBase; +import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import org.egothor.stemmer.Trie; @@ -129,11 +129,11 @@ public final class PolishAnalyzer extends StopwordAnalyzerBase { /** * Creates a - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * which tokenizes all the text in the provided {@link Reader}. * * @return A - * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents} + * {@link org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents} * built from an {@link StandardTokenizer} filtered with * {@link StandardFilter}, {@link LowerCaseFilter}, {@link StopFilter} * , {@link KeywordMarkerFilter} if a stem exclusion set is diff --git a/solr/contrib/extraction/src/test/resources/solr/conf/schema.xml b/solr/contrib/extraction/src/test/resources/solr/conf/schema.xml index 68c0d4465f1..de8e7c76695 100644 --- a/solr/contrib/extraction/src/test/resources/solr/conf/schema.xml +++ b/solr/contrib/extraction/src/test/resources/solr/conf/schema.xml @@ -127,7 +127,7 @@ - + diff --git a/solr/src/java/org/apache/solr/analysis/BaseTokenStreamFactory.java b/solr/src/java/org/apache/solr/analysis/BaseTokenStreamFactory.java index af01e6bb6a0..dc3f31e44f0 100644 --- a/solr/src/java/org/apache/solr/analysis/BaseTokenStreamFactory.java +++ b/solr/src/java/org/apache/solr/analysis/BaseTokenStreamFactory.java @@ -27,7 +27,7 @@ import java.util.List; import java.util.Map; import org.apache.lucene.analysis.CharArraySet; -import org.apache.lucene.analysis.StopFilter; +import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.util.Version; diff --git a/solr/src/java/org/apache/solr/analysis/CommonGramsFilterFactory.java b/solr/src/java/org/apache/solr/analysis/CommonGramsFilterFactory.java index 2116cdd57be..2e2eeefc27b 100644 --- a/solr/src/java/org/apache/solr/analysis/CommonGramsFilterFactory.java +++ b/solr/src/java/org/apache/solr/analysis/CommonGramsFilterFactory.java @@ -20,9 +20,9 @@ import java.io.IOException; import java.util.Set; import org.apache.lucene.analysis.CharArraySet; -import org.apache.lucene.analysis.StopAnalyzer; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.commongrams.CommonGramsFilter; +import org.apache.lucene.analysis.core.StopAnalyzer; import org.apache.solr.common.ResourceLoader; import org.apache.solr.util.plugin.ResourceLoaderAware; diff --git a/solr/src/java/org/apache/solr/analysis/CommonGramsQueryFilterFactory.java b/solr/src/java/org/apache/solr/analysis/CommonGramsQueryFilterFactory.java index 7b0397f681e..d0e2b2b22c4 100644 --- a/solr/src/java/org/apache/solr/analysis/CommonGramsQueryFilterFactory.java +++ b/solr/src/java/org/apache/solr/analysis/CommonGramsQueryFilterFactory.java @@ -21,10 +21,10 @@ import java.util.Map; import java.util.Set; import org.apache.lucene.analysis.CharArraySet; -import org.apache.lucene.analysis.StopAnalyzer; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.commongrams.CommonGramsFilter; import org.apache.lucene.analysis.commongrams.CommonGramsQueryFilter; +import org.apache.lucene.analysis.core.StopAnalyzer; import org.apache.solr.common.ResourceLoader; import org.apache.solr.util.plugin.ResourceLoaderAware; diff --git a/solr/src/java/org/apache/solr/analysis/KeywordTokenizerFactory.java b/solr/src/java/org/apache/solr/analysis/KeywordTokenizerFactory.java index 1edaf2e51d3..e50aa72d88e 100644 --- a/solr/src/java/org/apache/solr/analysis/KeywordTokenizerFactory.java +++ b/solr/src/java/org/apache/solr/analysis/KeywordTokenizerFactory.java @@ -17,7 +17,7 @@ package org.apache.solr.analysis; -import org.apache.lucene.analysis.KeywordTokenizer; +import org.apache.lucene.analysis.core.KeywordTokenizer; import java.io.Reader; diff --git a/solr/src/java/org/apache/solr/analysis/LetterTokenizerFactory.java b/solr/src/java/org/apache/solr/analysis/LetterTokenizerFactory.java index 09f34dc046d..4362bbd751d 100644 --- a/solr/src/java/org/apache/solr/analysis/LetterTokenizerFactory.java +++ b/solr/src/java/org/apache/solr/analysis/LetterTokenizerFactory.java @@ -17,7 +17,7 @@ package org.apache.solr.analysis; -import org.apache.lucene.analysis.LetterTokenizer; +import org.apache.lucene.analysis.core.LetterTokenizer; import java.io.Reader; import java.util.Map; diff --git a/solr/src/java/org/apache/solr/analysis/LowerCaseFilterFactory.java b/solr/src/java/org/apache/solr/analysis/LowerCaseFilterFactory.java index 67af3ce0d7f..7aa82f01f3b 100644 --- a/solr/src/java/org/apache/solr/analysis/LowerCaseFilterFactory.java +++ b/solr/src/java/org/apache/solr/analysis/LowerCaseFilterFactory.java @@ -20,7 +20,7 @@ package org.apache.solr.analysis; import java.util.Map; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.LowerCaseFilter; +import org.apache.lucene.analysis.core.LowerCaseFilter; /** * @version $Id$ diff --git a/solr/src/java/org/apache/solr/analysis/LowerCaseTokenizerFactory.java b/solr/src/java/org/apache/solr/analysis/LowerCaseTokenizerFactory.java index 5c45c8a2580..7f4c2553813 100644 --- a/solr/src/java/org/apache/solr/analysis/LowerCaseTokenizerFactory.java +++ b/solr/src/java/org/apache/solr/analysis/LowerCaseTokenizerFactory.java @@ -17,7 +17,7 @@ package org.apache.solr.analysis; -import org.apache.lucene.analysis.LowerCaseTokenizer; +import org.apache.lucene.analysis.core.LowerCaseTokenizer; import java.io.Reader; import java.util.Map; diff --git a/solr/src/java/org/apache/solr/analysis/RussianLowerCaseFilterFactory.java b/solr/src/java/org/apache/solr/analysis/RussianLowerCaseFilterFactory.java index d240c366e41..de6cda728e0 100644 --- a/solr/src/java/org/apache/solr/analysis/RussianLowerCaseFilterFactory.java +++ b/solr/src/java/org/apache/solr/analysis/RussianLowerCaseFilterFactory.java @@ -19,9 +19,9 @@ package org.apache.solr.analysis; import java.util.Map; -import org.apache.lucene.analysis.LowerCaseFilter; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.core.LowerCaseFilter; import org.apache.lucene.util.Version; import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; diff --git a/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java b/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java index 563d5aa4de3..ca65b0cb852 100644 --- a/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java +++ b/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java @@ -19,10 +19,10 @@ package org.apache.solr.analysis; import org.apache.solr.common.ResourceLoader; import org.apache.solr.util.plugin.ResourceLoaderAware; -import org.apache.lucene.analysis.StopFilter; -import org.apache.lucene.analysis.StopAnalyzer; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.core.StopAnalyzer; +import org.apache.lucene.analysis.core.StopFilter; import java.util.Map; import java.util.Set; diff --git a/solr/src/java/org/apache/solr/analysis/WhitespaceTokenizerFactory.java b/solr/src/java/org/apache/solr/analysis/WhitespaceTokenizerFactory.java index c752188fadc..bb8e7cf1341 100644 --- a/solr/src/java/org/apache/solr/analysis/WhitespaceTokenizerFactory.java +++ b/solr/src/java/org/apache/solr/analysis/WhitespaceTokenizerFactory.java @@ -17,7 +17,7 @@ package org.apache.solr.analysis; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import java.io.Reader; import java.util.Map; diff --git a/solr/src/java/org/apache/solr/handler/component/SpellCheckComponent.java b/solr/src/java/org/apache/solr/handler/component/SpellCheckComponent.java index 07da525c584..8d373b221cc 100644 --- a/solr/src/java/org/apache/solr/handler/component/SpellCheckComponent.java +++ b/solr/src/java/org/apache/solr/handler/component/SpellCheckComponent.java @@ -32,7 +32,7 @@ import org.slf4j.LoggerFactory; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Token; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.lucene.analysis.tokenattributes.FlagsAttribute; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; diff --git a/solr/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java b/solr/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java index 1da398f6a24..52a4d08ca0a 100644 --- a/solr/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java +++ b/solr/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java @@ -27,7 +27,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.lucene.analysis.Token; -import org.apache.lucene.analysis.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; import org.apache.lucene.search.spell.Dictionary; diff --git a/solr/src/test/org/apache/solr/analysis/CommonGramsFilterFactoryTest.java b/solr/src/test/org/apache/solr/analysis/CommonGramsFilterFactoryTest.java index 6da1129b648..5d0123a1425 100644 --- a/solr/src/test/org/apache/solr/analysis/CommonGramsFilterFactoryTest.java +++ b/solr/src/test/org/apache/solr/analysis/CommonGramsFilterFactoryTest.java @@ -19,7 +19,7 @@ package org.apache.solr.analysis; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.solr.common.ResourceLoader; import org.apache.solr.core.SolrResourceLoader; diff --git a/solr/src/test/org/apache/solr/analysis/CommonGramsQueryFilterFactoryTest.java b/solr/src/test/org/apache/solr/analysis/CommonGramsQueryFilterFactoryTest.java index bf093005855..29a655d08dd 100644 --- a/solr/src/test/org/apache/solr/analysis/CommonGramsQueryFilterFactoryTest.java +++ b/solr/src/test/org/apache/solr/analysis/CommonGramsQueryFilterFactoryTest.java @@ -18,7 +18,7 @@ package org.apache.solr.analysis; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.solr.common.ResourceLoader; import org.apache.solr.core.SolrResourceLoader; diff --git a/solr/src/test/org/apache/solr/analysis/DoubleMetaphoneFilterFactoryTest.java b/solr/src/test/org/apache/solr/analysis/DoubleMetaphoneFilterFactoryTest.java index 45f8c1fd612..c61c827ca02 100644 --- a/solr/src/test/org/apache/solr/analysis/DoubleMetaphoneFilterFactoryTest.java +++ b/solr/src/test/org/apache/solr/analysis/DoubleMetaphoneFilterFactoryTest.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; public class DoubleMetaphoneFilterFactoryTest extends BaseTokenTestCase { diff --git a/solr/src/test/org/apache/solr/analysis/DoubleMetaphoneFilterTest.java b/solr/src/test/org/apache/solr/analysis/DoubleMetaphoneFilterTest.java index f05d24a37ac..35d03b1378c 100644 --- a/solr/src/test/org/apache/solr/analysis/DoubleMetaphoneFilterTest.java +++ b/solr/src/test/org/apache/solr/analysis/DoubleMetaphoneFilterTest.java @@ -19,7 +19,7 @@ package org.apache.solr.analysis; import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; public class DoubleMetaphoneFilterTest extends BaseTokenTestCase { diff --git a/solr/src/test/org/apache/solr/analysis/EnglishPorterFilterFactoryTest.java b/solr/src/test/org/apache/solr/analysis/EnglishPorterFilterFactoryTest.java index ac37331d3ba..a0357ac6d98 100644 --- a/solr/src/test/org/apache/solr/analysis/EnglishPorterFilterFactoryTest.java +++ b/solr/src/test/org/apache/solr/analysis/EnglishPorterFilterFactoryTest.java @@ -18,7 +18,7 @@ package org.apache.solr.analysis; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.solr.common.ResourceLoader; import org.apache.solr.common.util.StrUtils; import org.tartarus.snowball.ext.EnglishStemmer; diff --git a/solr/src/test/org/apache/solr/analysis/LengthFilterTest.java b/solr/src/test/org/apache/solr/analysis/LengthFilterTest.java index 300e4b43388..66ba3a89281 100644 --- a/solr/src/test/org/apache/solr/analysis/LengthFilterTest.java +++ b/solr/src/test/org/apache/solr/analysis/LengthFilterTest.java @@ -22,7 +22,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; public class LengthFilterTest extends BaseTokenTestCase { diff --git a/solr/src/test/org/apache/solr/analysis/SnowballPorterFilterFactoryTest.java b/solr/src/test/org/apache/solr/analysis/SnowballPorterFilterFactoryTest.java index e786c0017c2..5475d3ed857 100644 --- a/solr/src/test/org/apache/solr/analysis/SnowballPorterFilterFactoryTest.java +++ b/solr/src/test/org/apache/solr/analysis/SnowballPorterFilterFactoryTest.java @@ -18,7 +18,7 @@ package org.apache.solr.analysis; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.solr.common.ResourceLoader; import org.apache.solr.common.util.StrUtils; import org.apache.solr.core.SolrResourceLoader; diff --git a/solr/src/test/org/apache/solr/analysis/TestBrazilianStemFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestBrazilianStemFilterFactory.java index bba889336cb..e090aded3d6 100644 --- a/solr/src/test/org/apache/solr/analysis/TestBrazilianStemFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestBrazilianStemFilterFactory.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the Brazilian stem filter factory is working. diff --git a/solr/src/test/org/apache/solr/analysis/TestBufferedTokenStream.java b/solr/src/test/org/apache/solr/analysis/TestBufferedTokenStream.java index aa0012fa802..b1352041aed 100644 --- a/solr/src/test/org/apache/solr/analysis/TestBufferedTokenStream.java +++ b/solr/src/test/org/apache/solr/analysis/TestBufferedTokenStream.java @@ -20,7 +20,7 @@ package org.apache.solr.analysis; import org.apache.lucene.analysis.Token; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import java.io.IOException; diff --git a/solr/src/test/org/apache/solr/analysis/TestBulgarianStemFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestBulgarianStemFilterFactory.java index 1a9a5585614..e2107bf8648 100644 --- a/solr/src/test/org/apache/solr/analysis/TestBulgarianStemFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestBulgarianStemFilterFactory.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the Bulgarian stem filter factory is working. diff --git a/solr/src/test/org/apache/solr/analysis/TestCapitalizationFilter.java b/solr/src/test/org/apache/solr/analysis/TestCapitalizationFilter.java index 70f24f93b06..2b1bd10e035 100644 --- a/solr/src/test/org/apache/solr/analysis/TestCapitalizationFilter.java +++ b/solr/src/test/org/apache/solr/analysis/TestCapitalizationFilter.java @@ -21,10 +21,10 @@ import java.io.StringReader; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.analysis.KeywordTokenizer; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.KeywordTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** diff --git a/solr/src/test/org/apache/solr/analysis/TestChineseFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestChineseFilterFactory.java index 8c0d9e39526..ae41c173eb5 100644 --- a/solr/src/test/org/apache/solr/analysis/TestChineseFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestChineseFilterFactory.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the Chinese filter factory is working. diff --git a/solr/src/test/org/apache/solr/analysis/TestCollationKeyFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestCollationKeyFilterFactory.java index c508a65a0a8..34719d2f565 100644 --- a/solr/src/test/org/apache/solr/analysis/TestCollationKeyFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestCollationKeyFilterFactory.java @@ -28,8 +28,8 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import org.apache.lucene.analysis.KeywordTokenizer; import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.core.KeywordTokenizer; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.solr.common.ResourceLoader; diff --git a/solr/src/test/org/apache/solr/analysis/TestCzechStemFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestCzechStemFilterFactory.java index 5f941948e2b..929ec829481 100644 --- a/solr/src/test/org/apache/solr/analysis/TestCzechStemFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestCzechStemFilterFactory.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the Czech stem filter factory is working. diff --git a/solr/src/test/org/apache/solr/analysis/TestDelimitedPayloadTokenFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestDelimitedPayloadTokenFilterFactory.java index bc7f4b97a7f..cc4af4f5dd8 100644 --- a/solr/src/test/org/apache/solr/analysis/TestDelimitedPayloadTokenFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestDelimitedPayloadTokenFilterFactory.java @@ -22,7 +22,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.payloads.DelimitedPayloadTokenFilter; import org.apache.lucene.analysis.payloads.FloatEncoder; import org.apache.lucene.analysis.payloads.PayloadHelper; diff --git a/solr/src/test/org/apache/solr/analysis/TestDictionaryCompoundWordTokenFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestDictionaryCompoundWordTokenFilterFactory.java index 85fbc5c9f26..69dea685392 100644 --- a/solr/src/test/org/apache/solr/analysis/TestDictionaryCompoundWordTokenFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestDictionaryCompoundWordTokenFilterFactory.java @@ -24,7 +24,7 @@ import java.util.Map; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.solr.common.ResourceLoader; import org.apache.solr.core.SolrResourceLoader; diff --git a/solr/src/test/org/apache/solr/analysis/TestDutchStemFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestDutchStemFilterFactory.java index aee235c523c..6e3be4d8705 100644 --- a/solr/src/test/org/apache/solr/analysis/TestDutchStemFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestDutchStemFilterFactory.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the Dutch stem filter factory is working. diff --git a/solr/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java index feb374908d9..7399baf228c 100644 --- a/solr/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java @@ -24,7 +24,7 @@ import java.util.Map; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.solr.common.ResourceLoader; import org.apache.solr.core.SolrResourceLoader; diff --git a/solr/src/test/org/apache/solr/analysis/TestFrenchStemFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestFrenchStemFilterFactory.java index 7a32060da08..d950df11819 100644 --- a/solr/src/test/org/apache/solr/analysis/TestFrenchStemFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestFrenchStemFilterFactory.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the French stem filter factory is working. diff --git a/solr/src/test/org/apache/solr/analysis/TestGermanStemFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestGermanStemFilterFactory.java index 618ab521f72..ef6cea0c491 100644 --- a/solr/src/test/org/apache/solr/analysis/TestGermanStemFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestGermanStemFilterFactory.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the German stem filter factory is working. diff --git a/solr/src/test/org/apache/solr/analysis/TestGreekLowerCaseFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestGreekLowerCaseFilterFactory.java index 929204e776e..a74d1089fb8 100644 --- a/solr/src/test/org/apache/solr/analysis/TestGreekLowerCaseFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestGreekLowerCaseFilterFactory.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the Greek lowercase filter factory is working. diff --git a/solr/src/test/org/apache/solr/analysis/TestGreekStemFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestGreekStemFilterFactory.java index c2ede0dd7e0..b4f70f93a21 100644 --- a/solr/src/test/org/apache/solr/analysis/TestGreekStemFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestGreekStemFilterFactory.java @@ -5,7 +5,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.el.GreekLowerCaseFilter; /** diff --git a/solr/src/test/org/apache/solr/analysis/TestIndonesianStemFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestIndonesianStemFilterFactory.java index 37a35af848e..e73961f752a 100644 --- a/solr/src/test/org/apache/solr/analysis/TestIndonesianStemFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestIndonesianStemFilterFactory.java @@ -24,7 +24,7 @@ import java.util.Map; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the Indonesian stem filter factory is working. diff --git a/solr/src/test/org/apache/solr/analysis/TestKeywordMarkerFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestKeywordMarkerFilterFactory.java index 5638d58ceee..922082c4086 100644 --- a/solr/src/test/org/apache/solr/analysis/TestKeywordMarkerFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestKeywordMarkerFilterFactory.java @@ -23,10 +23,10 @@ import java.io.StringReader; import java.util.HashMap; import java.util.Map; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.en.PorterStemFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; import org.apache.solr.common.ResourceLoader; import org.apache.solr.core.SolrResourceLoader; diff --git a/solr/src/test/org/apache/solr/analysis/TestMultiWordSynonyms.java b/solr/src/test/org/apache/solr/analysis/TestMultiWordSynonyms.java index 77f3e5b3afa..e4f71c57249 100644 --- a/solr/src/test/org/apache/solr/analysis/TestMultiWordSynonyms.java +++ b/solr/src/test/org/apache/solr/analysis/TestMultiWordSynonyms.java @@ -1,6 +1,6 @@ package org.apache.solr.analysis; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.synonym.SynonymFilter; import org.apache.lucene.analysis.synonym.SynonymMap; import org.junit.Test; diff --git a/solr/src/test/org/apache/solr/analysis/TestNGramFilters.java b/solr/src/test/org/apache/solr/analysis/TestNGramFilters.java index 0b31ee20371..45dbeda58e3 100644 --- a/solr/src/test/org/apache/solr/analysis/TestNGramFilters.java +++ b/solr/src/test/org/apache/solr/analysis/TestNGramFilters.java @@ -24,7 +24,7 @@ import java.util.Map; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the NGram filter factories are working. diff --git a/solr/src/test/org/apache/solr/analysis/TestPatternReplaceCharFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestPatternReplaceCharFilterFactory.java index 983474e234d..ef60e0dd781 100644 --- a/solr/src/test/org/apache/solr/analysis/TestPatternReplaceCharFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestPatternReplaceCharFilterFactory.java @@ -25,7 +25,7 @@ import java.util.Map; import org.apache.lucene.analysis.CharReader; import org.apache.lucene.analysis.CharStream; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure this factory is working diff --git a/solr/src/test/org/apache/solr/analysis/TestPatternReplaceFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestPatternReplaceFilterFactory.java index 485fdd70e06..878b07d9341 100644 --- a/solr/src/test/org/apache/solr/analysis/TestPatternReplaceFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestPatternReplaceFilterFactory.java @@ -18,7 +18,7 @@ package org.apache.solr.analysis; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import java.io.StringReader; import java.util.HashMap; diff --git a/solr/src/test/org/apache/solr/analysis/TestPersianNormalizationFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestPersianNormalizationFilterFactory.java index 8831f366d3a..d7cd1c6a9f5 100644 --- a/solr/src/test/org/apache/solr/analysis/TestPersianNormalizationFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestPersianNormalizationFilterFactory.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the Persian normalization factory is working. diff --git a/solr/src/test/org/apache/solr/analysis/TestPhoneticFilter.java b/solr/src/test/org/apache/solr/analysis/TestPhoneticFilter.java index 6f0c62bedd7..c2875beb38a 100644 --- a/solr/src/test/org/apache/solr/analysis/TestPhoneticFilter.java +++ b/solr/src/test/org/apache/solr/analysis/TestPhoneticFilter.java @@ -24,7 +24,7 @@ import java.util.Map; import org.apache.commons.codec.language.Metaphone; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** diff --git a/solr/src/test/org/apache/solr/analysis/TestPorterStemFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestPorterStemFilterFactory.java index acfc2a77a12..58b17d9f454 100644 --- a/solr/src/test/org/apache/solr/analysis/TestPorterStemFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestPorterStemFilterFactory.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the Porter stem filter factory is working. diff --git a/solr/src/test/org/apache/solr/analysis/TestReverseStringFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestReverseStringFilterFactory.java index 9672693a868..8165684a77e 100644 --- a/solr/src/test/org/apache/solr/analysis/TestReverseStringFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestReverseStringFilterFactory.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the Reverse string filter factory is working. diff --git a/solr/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java index a457df9a5b8..00ff0cd6caf 100644 --- a/solr/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java @@ -25,7 +25,7 @@ import java.util.Map; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.search.Query; import org.apache.solr.SolrTestCaseJ4; diff --git a/solr/src/test/org/apache/solr/analysis/TestShingleFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestShingleFilterFactory.java index 4e8248cf376..1f30feea724 100644 --- a/solr/src/test/org/apache/solr/analysis/TestShingleFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestShingleFilterFactory.java @@ -23,7 +23,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the Shingle filter factory works. diff --git a/solr/src/test/org/apache/solr/analysis/TestStandardFactories.java b/solr/src/test/org/apache/solr/analysis/TestStandardFactories.java index 62c807f5b7f..c3b9a085800 100644 --- a/solr/src/test/org/apache/solr/analysis/TestStandardFactories.java +++ b/solr/src/test/org/apache/solr/analysis/TestStandardFactories.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the standard lucene factories are working. diff --git a/solr/src/test/org/apache/solr/analysis/TestStemmerOverrideFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestStemmerOverrideFilterFactory.java index ae2b936dfcf..6abd9029a9e 100644 --- a/solr/src/test/org/apache/solr/analysis/TestStemmerOverrideFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestStemmerOverrideFilterFactory.java @@ -23,10 +23,10 @@ import java.io.StringReader; import java.util.HashMap; import java.util.Map; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.en.PorterStemFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; import org.apache.solr.common.ResourceLoader; import org.apache.solr.core.SolrResourceLoader; diff --git a/solr/src/test/org/apache/solr/analysis/TestThaiWordFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestThaiWordFilterFactory.java index 1420b304bd5..3ae0e21bc03 100644 --- a/solr/src/test/org/apache/solr/analysis/TestThaiWordFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestThaiWordFilterFactory.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the Thai word filter factory is working. diff --git a/solr/src/test/org/apache/solr/analysis/TestTrimFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestTrimFilterFactory.java index 9e1c6847112..627eba5914d 100644 --- a/solr/src/test/org/apache/solr/analysis/TestTrimFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestTrimFilterFactory.java @@ -23,9 +23,9 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.analysis.KeywordTokenizer; import org.apache.lucene.analysis.Token; import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.core.KeywordTokenizer; import org.apache.lucene.analysis.tokenattributes.FlagsAttribute; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; diff --git a/solr/src/test/org/apache/solr/analysis/TestTurkishLowerCaseFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestTurkishLowerCaseFilterFactory.java index c533a53ad85..e2174ea50f5 100644 --- a/solr/src/test/org/apache/solr/analysis/TestTurkishLowerCaseFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestTurkishLowerCaseFilterFactory.java @@ -22,7 +22,7 @@ import java.io.StringReader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; /** * Simple tests to ensure the Turkish lowercase filter factory is working. diff --git a/solr/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java b/solr/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java index 0c7e080dc6f..099accc8a85 100644 --- a/solr/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java +++ b/solr/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java @@ -158,7 +158,7 @@ public class DocumentAnalysisRequestHandlerTest extends AnalysisRequestHandlerTe NamedList> whitetokResult = documentResult.get("whitetok"); assertNotNull("an analysis for the 'whitetok' field should be returned", whitetokResult); queryResult = whitetokResult.get("query"); - tokenList = (List) queryResult.get("org.apache.lucene.analysis.WhitespaceTokenizer"); + tokenList = (List) queryResult.get("org.apache.lucene.analysis.core.WhitespaceTokenizer"); assertNotNull("Expecting the 'WhitespaceTokenizer' to be applied on the query for the 'whitetok' field", tokenList); assertEquals("Query has only one token", 1, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("JUMPING", null, "word", 0, 7, 1, null, false)); @@ -182,11 +182,11 @@ public class DocumentAnalysisRequestHandlerTest extends AnalysisRequestHandlerTe assertNotNull("Expecting the 'StandardFilter' to be applied on the query for the 'text' field", tokenList); assertEquals("Query has only one token", 1, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("JUMPING", null, "", 0, 7, 1, null, false)); - tokenList = (List) queryResult.get("org.apache.lucene.analysis.LowerCaseFilter"); + tokenList = (List) queryResult.get("org.apache.lucene.analysis.core.LowerCaseFilter"); assertNotNull("Expecting the 'LowerCaseFilter' to be applied on the query for the 'text' field", tokenList); assertEquals("Query has only one token", 1, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("jumping", null, "", 0, 7, 1, null, false)); - tokenList = (List) queryResult.get("org.apache.lucene.analysis.StopFilter"); + tokenList = (List) queryResult.get("org.apache.lucene.analysis.core.StopFilter"); assertNotNull("Expecting the 'StopFilter' to be applied on the query for the 'text' field", tokenList); assertEquals("Query has only one token", 1, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("jumping", null, "", 0, 7, 1, null, false)); @@ -215,7 +215,7 @@ public class DocumentAnalysisRequestHandlerTest extends AnalysisRequestHandlerTe assertToken(tokenList.get(3), new TokenInfo("Over", null, "", 15, 19, 4, null, false)); assertToken(tokenList.get(4), new TokenInfo("The", null, "", 20, 23, 5, null, false)); assertToken(tokenList.get(5), new TokenInfo("Dogs", null, "", 24, 28, 6, null, false)); - tokenList = valueResult.get("org.apache.lucene.analysis.LowerCaseFilter"); + tokenList = valueResult.get("org.apache.lucene.analysis.core.LowerCaseFilter"); assertNotNull("Expecting the 'LowerCaseFilter' to be applied on the index for the 'text' field", tokenList); assertEquals("Expecting 6 tokens", 6, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("the", null, "", 0, 3, 1, null, false)); @@ -224,7 +224,7 @@ public class DocumentAnalysisRequestHandlerTest extends AnalysisRequestHandlerTe assertToken(tokenList.get(3), new TokenInfo("over", null, "", 15, 19, 4, null, false)); assertToken(tokenList.get(4), new TokenInfo("the", null, "", 20, 23, 5, null, false)); assertToken(tokenList.get(5), new TokenInfo("dogs", null, "", 24, 28, 6, null, false)); - tokenList = valueResult.get("org.apache.lucene.analysis.StopFilter"); + tokenList = valueResult.get("org.apache.lucene.analysis.core.StopFilter"); assertNotNull("Expecting the 'StopFilter' to be applied on the index for the 'text' field", tokenList); assertEquals("Expecting 4 tokens after stop word removal", 4, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("fox", null, "", 4, 7, 1, null, false)); diff --git a/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java b/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java index 99c0da4830c..cf570329588 100644 --- a/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java +++ b/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java @@ -17,8 +17,8 @@ package org.apache.solr.handler; -import org.apache.lucene.analysis.KeywordTokenizer; -import org.apache.lucene.analysis.WhitespaceTokenizer; +import org.apache.lucene.analysis.core.KeywordTokenizer; +import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.solr.common.params.AnalysisParams; import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.params.ModifiableSolrParams; @@ -149,7 +149,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB assertToken(tokenList.get(7), new TokenInfo("lazy", null, "", 34, 38, 8, null, false)); assertToken(tokenList.get(8), new TokenInfo("brown", null, "", 39, 44, 9, null, true)); assertToken(tokenList.get(9), new TokenInfo("dogs", null, "", 45, 49, 10, null, false)); - tokenList = indexPart.get("org.apache.lucene.analysis.LowerCaseFilter"); + tokenList = indexPart.get("org.apache.lucene.analysis.core.LowerCaseFilter"); assertNotNull("Expcting LowerCaseFilter analysis breakdown", tokenList); assertEquals(tokenList.size(), 10); assertToken(tokenList.get(0), new TokenInfo("the", null, "", 0, 3, 1, null, false)); @@ -162,7 +162,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB assertToken(tokenList.get(7), new TokenInfo("lazy", null, "", 34, 38, 8, null, false)); assertToken(tokenList.get(8), new TokenInfo("brown", null, "", 39, 44, 9, null, true)); assertToken(tokenList.get(9), new TokenInfo("dogs", null, "", 45, 49, 10, null, false)); - tokenList = indexPart.get("org.apache.lucene.analysis.StopFilter"); + tokenList = indexPart.get("org.apache.lucene.analysis.core.StopFilter"); assertNotNull("Expcting StopFilter analysis breakdown", tokenList); assertEquals(tokenList.size(), 8); assertToken(tokenList.get(0), new TokenInfo("quick", null, "", 4, 9, 1, null, false)); @@ -198,12 +198,12 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB assertEquals(2, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("fox", null, "", 0, 3, 1, null, false)); assertToken(tokenList.get(1), new TokenInfo("brown", null, "", 4, 9, 2, null, false)); - tokenList = queryPart.get("org.apache.lucene.analysis.LowerCaseFilter"); + tokenList = queryPart.get("org.apache.lucene.analysis.core.LowerCaseFilter"); assertNotNull("Expcting LowerCaseFilter analysis breakdown", tokenList); assertEquals(2, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("fox", null, "", 0, 3, 1, null, false)); assertToken(tokenList.get(1), new TokenInfo("brown", null, "", 4, 9, 2, null, false)); - tokenList = queryPart.get("org.apache.lucene.analysis.StopFilter"); + tokenList = queryPart.get("org.apache.lucene.analysis.core.StopFilter"); assertNotNull("Expcting StopFilter analysis breakdown", tokenList); assertEquals(2, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("fox", null, "", 0, 3, 1, null, false)); @@ -220,7 +220,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB indexPart = nameTextType.get("index"); assertNotNull("expecting an index token analysis for field type 'nametext'", indexPart); - tokenList = indexPart.get("org.apache.lucene.analysis.WhitespaceTokenizer"); + tokenList = indexPart.get("org.apache.lucene.analysis.core.WhitespaceTokenizer"); assertNotNull("Expcting WhitespaceTokenizer analysis breakdown", tokenList); assertEquals(10, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("the", null, "word", 0, 3, 1, null, false)); @@ -314,7 +314,7 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB assertEquals(" whátëvêr ", indexPart.get("org.apache.lucene.analysis.charfilter.HTMLStripCharFilter")); assertEquals(" whatever ", indexPart.get("org.apache.lucene.analysis.charfilter.MappingCharFilter")); - List tokenList = (List)indexPart.get("org.apache.lucene.analysis.WhitespaceTokenizer"); + List tokenList = (List)indexPart.get("org.apache.lucene.analysis.core.WhitespaceTokenizer"); assertNotNull("Expecting WhitespaceTokenizer analysis breakdown", tokenList); assertEquals(tokenList.size(), 1); assertToken(tokenList.get(0), new TokenInfo("whatever", null, "word", 12, 20, 1, null, false)); diff --git a/solr/src/test/org/apache/solr/highlight/HighlighterTest.java b/solr/src/test/org/apache/solr/highlight/HighlighterTest.java index 612a2a31b52..7df465a2228 100755 --- a/solr/src/test/org/apache/solr/highlight/HighlighterTest.java +++ b/solr/src/test/org/apache/solr/highlight/HighlighterTest.java @@ -20,7 +20,7 @@ package org.apache.solr.highlight; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Token; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.core.SolrCore; import org.apache.solr.request.SolrQueryRequest; diff --git a/solr/src/test/org/apache/solr/search/TestSort.java b/solr/src/test/org/apache/solr/search/TestSort.java index aff9ba64d2d..8d60d66c7de 100755 --- a/solr/src/test/org/apache/solr/search/TestSort.java +++ b/solr/src/test/org/apache/solr/search/TestSort.java @@ -17,7 +17,7 @@ package org.apache.solr.search; -import org.apache.lucene.analysis.SimpleAnalyzer; +import org.apache.lucene.analysis.core.SimpleAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; diff --git a/solr/src/test/org/apache/solr/spelling/IndexBasedSpellCheckerTest.java b/solr/src/test/org/apache/solr/spelling/IndexBasedSpellCheckerTest.java index ba772ac83ba..dfd58063e97 100644 --- a/solr/src/test/org/apache/solr/spelling/IndexBasedSpellCheckerTest.java +++ b/solr/src/test/org/apache/solr/spelling/IndexBasedSpellCheckerTest.java @@ -19,7 +19,7 @@ package org.apache.solr.spelling; import static org.junit.Assert.*; import org.apache.lucene.analysis.Token; -import org.apache.lucene.analysis.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; diff --git a/solr/src/test/org/apache/solr/spelling/SimpleQueryConverter.java b/solr/src/test/org/apache/solr/spelling/SimpleQueryConverter.java index 19bc9c66bd5..3b13cadc2fd 100644 --- a/solr/src/test/org/apache/solr/spelling/SimpleQueryConverter.java +++ b/solr/src/test/org/apache/solr/spelling/SimpleQueryConverter.java @@ -17,8 +17,8 @@ package org.apache.solr.spelling; import org.apache.lucene.analysis.Token; -import org.apache.lucene.analysis.WhitespaceAnalyzer; import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.analysis.tokenattributes.FlagsAttribute; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; diff --git a/solr/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java b/solr/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java index 0bb1d052973..a6ba3fd37ec 100644 --- a/solr/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java +++ b/solr/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java @@ -18,7 +18,7 @@ package org.apache.solr.spelling; import org.apache.lucene.analysis.Token; -import org.apache.lucene.analysis.WhitespaceAnalyzer; +import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.solr.common.util.NamedList; import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertEquals; diff --git a/solr/src/test/test-files/solr/conf/schema-copyfield-test.xml b/solr/src/test/test-files/solr/conf/schema-copyfield-test.xml index ce05b3f2c29..2332e8c5ac4 100644 --- a/solr/src/test/test-files/solr/conf/schema-copyfield-test.xml +++ b/solr/src/test/test-files/solr/conf/schema-copyfield-test.xml @@ -119,7 +119,7 @@ - + diff --git a/solr/src/test/test-files/solr/conf/schema-required-fields.xml b/solr/src/test/test-files/solr/conf/schema-required-fields.xml index 3e7d33d9b28..1535c8a72b9 100644 --- a/solr/src/test/test-files/solr/conf/schema-required-fields.xml +++ b/solr/src/test/test-files/solr/conf/schema-required-fields.xml @@ -110,7 +110,7 @@ - + diff --git a/solr/src/test/test-files/solr/conf/schema.xml b/solr/src/test/test-files/solr/conf/schema.xml index 159d1af992c..ccf09be32d2 100644 --- a/solr/src/test/test-files/solr/conf/schema.xml +++ b/solr/src/test/test-files/solr/conf/schema.xml @@ -140,7 +140,7 @@ - + diff --git a/solr/src/test/test-files/solr/conf/schema12.xml b/solr/src/test/test-files/solr/conf/schema12.xml index c2cc72e1dcd..bb82b1a6e0d 100755 --- a/solr/src/test/test-files/solr/conf/schema12.xml +++ b/solr/src/test/test-files/solr/conf/schema12.xml @@ -146,7 +146,7 @@ - +