Apache Lucene open-source search software
LUCENE-3283: Moved core QueryParsers to queryparser module
Christopher John Male5f30bedccc3f
diff --git a/dev-tools/eclipse/dot.classpath b/dev-tools/eclipse/dot.classpathindex 103f568506a..9fc5db22dab 100644--- a/dev-tools/eclipse/dot.classpath+++ b/dev-tools/eclipse/dot.classpath@@ -49,6 +49,8 @@<classpathentry kind="src" path="modules/grouping/src/test"/><classpathentry kind="src" path="modules/queries/src/java"/><classpathentry kind="src" path="modules/queries/src/test"/>+ <classpathentry kind="src" path="modules/queryparser/src/java"/>+ <classpathentry kind="src" path="modules/queryparser/src/test"/><classpathentry kind="src" path="modules/suggest/src/java"/><classpathentry kind="src" path="modules/suggest/src/test"/><classpathentry kind="src" path="solr/core/src/java"/>diff --git a/dev-tools/idea/.idea/modules.xml b/dev-tools/idea/.idea/modules.xmlindex 92324feba31..71790034699 100644--- a/dev-tools/idea/.idea/modules.xml+++ b/dev-tools/idea/.idea/modules.xml@@ -25,6 +25,7 @@<module filepath="$PROJECT_DIR$/modules/grouping/grouping.iml" /><module filepath="$PROJECT_DIR$/modules/join/join.iml" /><module filepath="$PROJECT_DIR$/modules/queries/queries.iml" />+ <module filepath="$PROJECT_DIR$/modules/queryparser/queryparser.iml" /><module filepath="$PROJECT_DIR$/modules/suggest/suggest.iml" /><module filepath="$PROJECT_DIR$/solr/solr.iml" /><module filepath="$PROJECT_DIR$/solr/contrib/analysis-extras/analysis-extras.iml" />diff --git a/dev-tools/idea/.idea/workspace.xml b/dev-tools/idea/.idea/workspace.xmlindex 053978d0f6c..35040130361 100644--- a/dev-tools/idea/.idea/workspace.xml+++ b/dev-tools/idea/.idea/workspace.xml@@ -141,6 +141,13 @@<option name="VM_PARAMETERS" value="-ea -DtempDir=temp" /><option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option></configuration>+ <configuration default="false" name="queryparser module" type="JUnit" factoryName="JUnit">+ <module name="queryparser" />+ <option name="TEST_OBJECT" value="package" />+ <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/modules/queries/build" />+ <option name="VM_PARAMETERS" value="-ea -DtempDir=temp" />+ <option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>+ </configuration><configuration default="false" name="queryparser contrib" type="JUnit" factoryName="JUnit"><module name="queryparser-contrib" /><option name="TEST_OBJECT" value="package" />@@ -204,7 +211,7 @@<option name="VM_PARAMETERS" value="-ea -DtempDir=temp" /><option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option></configuration>- <list size="29">+ <list size="30"><item index="0" class="java.lang.String" itemvalue="JUnit.analysis-extras contrib" /><item index="1" class="java.lang.String" itemvalue="JUnit.benchmark module" /><item index="2" class="java.lang.String" itemvalue="JUnit.clustering contrib" />@@ -225,15 +232,16 @@<item index="17" class="java.lang.String" itemvalue="JUnit.phonetic analysis module" /><item index="18" class="java.lang.String" itemvalue="JUnit.queries contrib" /><item index="19" class="java.lang.String" itemvalue="JUnit.queries module" />- <item index="20" class="java.lang.String" itemvalue="JUnit.queryparser contrib" />- <item index="21" class="java.lang.String" itemvalue="JUnit.smartcn analysis module" />- <item index="22" class="java.lang.String" itemvalue="JUnit.solr" />- <item index="23" class="java.lang.String" itemvalue="JUnit.spatial contrib" />- <item index="24" class="java.lang.String" itemvalue="JUnit.stempel analysis module" />- <item index="25" class="java.lang.String" itemvalue="JUnit.suggest module" />- <item index="26" class="java.lang.String" itemvalue="JUnit.uima contrib" />- <item index="27" class="java.lang.String" itemvalue="JUnit.wordnet contrib" />- <item index="28" class="java.lang.String" itemvalue="JUnit.xml-query-parser contrib" />+ <item index="20" class="java.lang.String" itemvalue="JUnit.queryparser module" />+ <item index="21" class="java.lang.String" itemvalue="JUnit.queryparser contrib" />+ <item index="22" class="java.lang.String" itemvalue="JUnit.smartcn analysis module" />+ <item index="23" class="java.lang.String" itemvalue="JUnit.solr" />+ <item index="24" class="java.lang.String" itemvalue="JUnit.spatial contrib" />+ <item index="25" class="java.lang.String" itemvalue="JUnit.stempel analysis module" />+ <item index="26" class="java.lang.String" itemvalue="JUnit.suggest module" />+ <item index="27" class="java.lang.String" itemvalue="JUnit.uima contrib" />+ <item index="28" class="java.lang.String" itemvalue="JUnit.wordnet contrib" />+ <item index="29" class="java.lang.String" itemvalue="JUnit.xml-query-parser contrib" /></list></component></project>diff --git a/dev-tools/idea/lucene/contrib/demo/demo.iml b/dev-tools/idea/lucene/contrib/demo/demo.imlindex 95824a448ae..6941a7fd0fc 100644--- a/dev-tools/idea/lucene/contrib/demo/demo.iml+++ b/dev-tools/idea/lucene/contrib/demo/demo.iml@@ -13,5 +13,6 @@<orderEntry type="library" scope="TEST" name="JUnit" level="project" /><orderEntry type="module" module-name="analysis-common" /><orderEntry type="module" module-name="lucene" />+ <orderEntry type="module" module-name="queryparser" /></component></module>diff --git a/dev-tools/idea/lucene/contrib/memory/memory.iml b/dev-tools/idea/lucene/contrib/memory/memory.imlindex d8f31f70a8c..69366de4e16 100644--- a/dev-tools/idea/lucene/contrib/memory/memory.iml+++ b/dev-tools/idea/lucene/contrib/memory/memory.iml@@ -14,5 +14,6 @@<orderEntry type="module" module-name="queries-contrib" /><orderEntry type="module" module-name="misc" /><orderEntry type="module" module-name="lucene" />+ <orderEntry type="module" module-name="queryparser" /></component></module>diff --git a/dev-tools/idea/lucene/contrib/queryparser/queryparser-contrib.iml b/dev-tools/idea/lucene/contrib/queryparser/queryparser-contrib.imlindex f6b11896782..28e1a4134a4 100644--- a/dev-tools/idea/lucene/contrib/queryparser/queryparser-contrib.iml+++ b/dev-tools/idea/lucene/contrib/queryparser/queryparser-contrib.iml@@ -15,5 +15,6 @@<orderEntry type="module" module-name="queries-contrib" /><orderEntry type="module" module-name="misc" /><orderEntry type="module" module-name="lucene" />+ <orderEntry type="module" module-name="queryparser" /></component></module>diff --git a/dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml b/dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.imlindex 62ae8599402..7f7a200a56d 100644--- a/dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml+++ b/dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml@@ -18,5 +18,6 @@<orderEntry type="module" module-name="misc" /><orderEntry type="module" module-name="analysis-common" /><orderEntry type="module" module-name="lucene" />+ <orderEntry type="module" module-name="queryparser" /></component></module>diff --git a/dev-tools/idea/modules/benchmark/benchmark.iml b/dev-tools/idea/modules/benchmark/benchmark.imlindex 01eccb10fea..e4820e7229e 100644--- a/dev-tools/idea/modules/benchmark/benchmark.iml+++ b/dev-tools/idea/modules/benchmark/benchmark.iml@@ -30,5 +30,6 @@<orderEntry type="module" module-name="memory" /><orderEntry type="module" module-name="analysis-common" /><orderEntry type="module" module-name="lucene" />+ <orderEntry type="module" module-name="queryparser" /></component></module>diff --git a/dev-tools/idea/modules/queryparser/queryparser.iml b/dev-tools/idea/modules/queryparser/queryparser.imlnew file mode 100644index 00000000000..50cb2814087--- /dev/null+++ b/dev-tools/idea/modules/queryparser/queryparser.iml@@ -0,0 +1,17 @@+<?xml version="1.0" encoding="UTF-8"?>+<module type="JAVA_MODULE" version="4">+ <component name="NewModuleRootManager" inherit-compiler-output="false">+ <output url="file://$MODULE_DIR$/build/classes/java" />+ <output-test url="file://$MODULE_DIR$/build/classes/test" />+ <exclude-output />+ <content url="file://$MODULE_DIR$">+ <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />+ <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />+ <excludeFolder url="file://$MODULE_DIR$/work" />+ </content>+ <orderEntry type="inheritedJdk" />+ <orderEntry type="sourceFolder" forTests="false" />+ <orderEntry type="library" scope="TEST" name="JUnit" level="project" />+ <orderEntry type="module" module-name="lucene" />+ </component>+</module>diff --git a/dev-tools/idea/solr/solr.iml b/dev-tools/idea/solr/solr.imlindex 9a405c40dc8..0d79071fdd3 100644--- a/dev-tools/idea/solr/solr.iml+++ b/dev-tools/idea/solr/solr.iml@@ -31,5 +31,6 @@<orderEntry type="module" module-name="suggest" /><orderEntry type="module" module-name="analysis-common" /><orderEntry type="module" module-name="lucene" />+ <orderEntry type="module" module-name="queryparser" /></component></module>diff --git a/dev-tools/maven/lucene/contrib/demo/pom.xml.template b/dev-tools/maven/lucene/contrib/demo/pom.xml.templateindex 7672424141e..3834132307e 100644--- a/dev-tools/maven/lucene/contrib/demo/pom.xml.template+++ b/dev-tools/maven/lucene/contrib/demo/pom.xml.template@@ -52,6 +52,11 @@<artifactId>lucene-analyzers-common</artifactId><version>${project.version}</version></dependency>+ <dependency>+ <groupId>${project.groupId}</groupId>+ <artifactId>lucene-queryparser</artifactId>+ <version>${project.version}</version>+ </dependency><dependency><groupId>junit</groupId><artifactId>junit</artifactId>diff --git a/dev-tools/maven/lucene/contrib/memory/pom.xml.template b/dev-tools/maven/lucene/contrib/memory/pom.xml.templateindex 8017f82f325..f665fb622d7 100644--- a/dev-tools/maven/lucene/contrib/memory/pom.xml.template+++ b/dev-tools/maven/lucene/contrib/memory/pom.xml.template@@ -43,6 +43,12 @@<artifactId>lucene-core</artifactId><version>${project.version}</version></dependency>+ <dependency>+ <groupId>${project.groupId}</groupId>+ <artifactId>lucene-queryparser</artifactId>+ <version>${project.version}</version>+ <scope>test</scope>+ </dependency><dependency><groupId>${project.groupId}</groupId><artifactId>lucene-test-framework</artifactId>diff --git a/dev-tools/maven/lucene/contrib/queryparser/pom.xml.template b/dev-tools/maven/lucene/contrib/queryparser/pom.xml.templateindex 132bf141b32..4f67518685c 100644--- a/dev-tools/maven/lucene/contrib/queryparser/pom.xml.template+++ b/dev-tools/maven/lucene/contrib/queryparser/pom.xml.template@@ -43,6 +43,11 @@<artifactId>lucene-core</artifactId><version>${project.version}</version></dependency>+ <dependency>+ <groupId>${project.groupId}</groupId>+ <artifactId>lucene-queryparser</artifactId>+ <version>${project.version}</version>+ </dependency><dependency><groupId>${project.groupId}</groupId><artifactId>lucene-core</artifactId>diff --git a/dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template b/dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.templateindex 73bb0d29278..539eed62281 100644--- a/dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template+++ b/dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template@@ -52,6 +52,11 @@<artifactId>lucene-queries-contrib</artifactId><version>${project.version}</version></dependency>+ <dependency>+ <groupId>${project.groupId}</groupId>+ <artifactId>lucene-queryparser</artifactId>+ <version>${project.version}</version>+ </dependency><dependency><groupId>javax.servlet</groupId><artifactId>servlet-api</artifactId>diff --git a/dev-tools/maven/modules/benchmark/pom.xml.template b/dev-tools/maven/modules/benchmark/pom.xml.templateindex 75fb30467f8..2389360e350 100755--- a/dev-tools/maven/modules/benchmark/pom.xml.template+++ b/dev-tools/maven/modules/benchmark/pom.xml.template@@ -62,6 +62,11 @@<artifactId>lucene-memory</artifactId><version>${project.version}</version></dependency>+ <dependency>+ <groupId>${project.groupId}</groupId>+ <artifactId>lucene-queryparser</artifactId>+ <version>${project.version}</version>+ </dependency><dependency><groupId>commons-beanutils</groupId><artifactId>commons-beanutils</artifactId>diff --git a/dev-tools/maven/modules/pom.xml.template b/dev-tools/maven/modules/pom.xml.templateindex 5fcb3c836e0..ae2974ae44c 100644--- a/dev-tools/maven/modules/pom.xml.template+++ b/dev-tools/maven/modules/pom.xml.template@@ -37,6 +37,7 @@<module>grouping</module><module>join</module><module>queries</module>+ <module>queryparser</module><module>suggest</module></modules><build>diff --git a/dev-tools/maven/modules/queryparser/pom.xml.template b/dev-tools/maven/modules/queryparser/pom.xml.templatenew file mode 100644index 00000000000..f10bb3bd669--- /dev/null+++ b/dev-tools/maven/modules/queryparser/pom.xml.template@@ -0,0 +1,71 @@+<project xmlns="http://maven.apache.org/POM/4.0.0"+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">+ <!--+ Licensed to the Apache Software Foundation (ASF) under one+ or more contributor license agreements. See the NOTICE file+ distributed with this work for additional information+ regarding copyright ownership. The ASF licenses this file+ to you under the Apache License, Version 2.0 (the+ "License"); you may not use this file except in compliance+ with the License. You may obtain a copy of the License at++ http://www.apache.org/licenses/LICENSE-2.0++ Unless required by applicable law or agreed to in writing,+ software distributed under the License is distributed on an+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY+ KIND, either express or implied. See the License for the+ specific language governing permissions and limitations+ under the License.+ -->+ <modelVersion>4.0.0</modelVersion>+ <parent>+ <groupId>org.apache.lucene</groupId>+ <artifactId>lucene-parent</artifactId>+ <version>@version@</version>+ <relativePath>../../lucene/pom.xml</relativePath>+ </parent>+ <groupId>org.apache.lucene</groupId>+ <artifactId>lucene-queryparser</artifactId>+ <packaging>jar</packaging>+ <name>Lucene QueryParsers</name>+ <description>Lucene QueryParsers module</description>+ <properties>+ <module-directory>modules/queryparser</module-directory>+ <build-directory>build</build-directory>+ </properties>+ <dependencies>+ <dependency>+ <groupId>${project.groupId}</groupId>+ <artifactId>lucene-core</artifactId>+ <version>${project.version}</version>+ </dependency>+ <dependency>+ <groupId>${project.groupId}</groupId>+ <artifactId>lucene-test-framework</artifactId>+ <version>${project.version}</version>+ <scope>test</scope>+ </dependency>+ <dependency>+ <groupId>junit</groupId>+ <artifactId>junit</artifactId>+ <scope>test</scope>+ </dependency>+ </dependencies>+ <build>+ <directory>${build-directory}</directory>+ <outputDirectory>${build-directory}/classes/java</outputDirectory>+ <testOutputDirectory>${build-directory}/classes/test</testOutputDirectory>+ <sourceDirectory>src/java</sourceDirectory>+ <testSourceDirectory>src/test</testSourceDirectory>+ <testResources>+ <testResource>+ <directory>${project.build.testSourceDirectory}</directory>+ <excludes>+ <exclude>**/*.java</exclude>+ </excludes>+ </testResource>+ </testResources>+ </build>+</project>diff --git a/dev-tools/maven/solr/core/pom.xml.template b/dev-tools/maven/solr/core/pom.xml.templateindex 8a883b938e7..7ef0f03b102 100644--- a/dev-tools/maven/solr/core/pom.xml.template+++ b/dev-tools/maven/solr/core/pom.xml.template@@ -83,7 +83,7 @@</dependency><dependency><groupId>org.apache.lucene</groupId>- <artifactId>lucene-queries-contrib</artifactId>+ <artifactId>lucene-queryparser</artifactId><version>${project.version}</version></dependency><dependency>diff --git a/lucene/MIGRATE.txt b/lucene/MIGRATE.txtindex 268ca527fb3..988293150d4 100644--- a/lucene/MIGRATE.txt+++ b/lucene/MIGRATE.txt@@ -392,3 +392,16 @@ LUCENE-1458, LUCENE-2111: Flexible Indexingboost from outer queries such as BooleanQuery, instead it takes 2 parameters,the outer boost (topLevelBoost) and the norm. Weight.sumOfSquaredWeights hasbeen renamed to Weight.getValueForNormalization().++* LUCENE-3283: Lucene's core o.a.l.queryParser QueryParsers have been consolidated into module/queryparser,+ where other QueryParsers from the codebase will also be placed. The following classes were moved:+ - o.a.l.queryParser.CharStream -> o.a.l.queryparser.classic.CharStream+ - o.a.l.queryParser.FastCharStream -> o.a.l.queryparser.classic.FastCharStream+ - o.a.l.queryParser.MultiFieldQueryParser -> o.a.l.queryparser.classic.MultiFieldQueryParser+ - o.a.l.queryParser.ParseException -> o.a.l.queryparser.classic.ParseException+ - o.a.l.queryParser.QueryParser -> o.a.l.queryparser.classic.QueryParser+ - o.a.l.queryParser.QueryParserBase -> o.a.l.queryparser.classic.QueryParserBase+ - o.a.l.queryParser.QueryParserConstants -> o.a.l.queryparser.classic.QueryParserConstants+ - o.a.l.queryParser.QueryParserTokenManager -> o.a.l.queryparser.classic.QueryParserTokenManager+ - o.a.l.queryParser.QueryParserToken -> o.a.l.queryparser.classic.Token+ - o.a.l.queryParser.QueryParserTokenMgrError -> o.a.l.queryparser.classic.TokenMgrErrordiff --git a/lucene/build.xml b/lucene/build.xmlindex 805734bb8da..7a70a63f8c7 100644--- a/lucene/build.xml+++ b/lucene/build.xml@@ -206,6 +206,7 @@<include name="**/lib/*.jar"/></fileset><pathelement location="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar"/>+ <pathelement location="${common.dir}/../modules/queryparser/build/lucene-queryparser-${version}.jar"/></path><invoke-javadoc@@ -417,9 +418,6 @@<!-- ================================================================== --><target name="clean-javacc"><delete>- <fileset dir="src/java/org/apache/lucene/queryParser" includes="*.java">- <containsregexp expression="Generated.*By.*JavaCC"/>- </fileset><fileset dir="contrib/queryparser/src/java/org/apache/lucene/queryParser/surround/parser" includes="*.java"><containsregexp expression="Generated.*By.*JavaCC"/></fileset>@@ -429,25 +427,7 @@</delete></target>- <target name="javacc" depends="init,javacc-check,clean-javacc,javacc-QueryParser,javacc-contrib-queryparser,javacc-contrib-demo"/>-- <target name="javacc-QueryParser" depends="init,javacc-check" if="javacc.present">- <sequential>- <invoke-javacc target="src/java/org/apache/lucene/queryParser/QueryParser.jj"- outputDir="src/java/org/apache/lucene/queryParser"/>-- <!-- Change the inccorrect public ctors for QueryParser to be protected instead -->- <replaceregexp file="src/java/org/apache/lucene/queryParser/QueryParser.java"- byline="true"- match="public QueryParser\(CharStream "- replace="protected QueryParser(CharStream "/>- <replaceregexp file="src/java/org/apache/lucene/queryParser/QueryParser.java"- byline="true"- match="public QueryParser\(QueryParserTokenManager "- replace="protected QueryParser(QueryParserTokenManager "/>-- </sequential>- </target>+ <target name="javacc" depends="init,javacc-check,clean-javacc,javacc-contrib-queryparser,javacc-contrib-demo"/><target name="javacc-contrib-queryparser" depends="init,javacc-check" if="javacc.present"><ant target="javacc"diff --git a/lucene/contrib/demo/build.xml b/lucene/contrib/demo/build.xmlindex c85e1272664..517e0a1a5c9 100644--- a/lucene/contrib/demo/build.xml+++ b/lucene/contrib/demo/build.xml@@ -29,6 +29,7 @@<module-uptodate name="analysis/common" jarfile="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar"property="analyzers-common.uptodate" classpath.property="analyzers-common.jar"/>+ <module-uptodate name="queryparser" property="queryparser.uptodate" classpath.property="queryparser.jar"/><property name="lucene.jar" value="${common.dir}/build/lucene-core-${version}.jar"/><target name="lucene-jar-uptodate" unless="lucene.jar.uptodate">@@ -45,14 +46,22 @@<path id="classpath"><pathelement path="${analyzers-common.jar}"/>+ <pathelement path="${queryparser.jar}"/><pathelement path="${lucene.jar}"/></path>- <target name="compile-core" depends="jar-analyzers-common,common.compile-core" />+ <target name="compile-core" depends="jar-analyzers-common,build-queryparser,common.compile-core" /><target name="jar-analyzers-common" unless="analyzers-common.uptodate"><subant target="jar-core"><fileset dir="${common.dir}/../modules/analysis/common" includes="build.xml"/></subant></target>++ <target name="build-queryparser" unless="queryparser.uptodate">+ <echo>Demo building dependency modules/queryparser</echo>+ <subant target="default">+ <fileset dir="${common.dir}/../modules/queryparser" includes="build.xml"/>+ </subant>+ </target></project>diff --git a/lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.javaindex 7d1e9292aad..7653a1e2f7f 100644--- a/lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.java+++ b/lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.java@@ -27,7 +27,7 @@ import java.util.Date;import org.apache.lucene.analysis.Analyzer;import org.apache.lucene.analysis.standard.StandardAnalyzer;import org.apache.lucene.document.Document;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.IndexSearcher;import org.apache.lucene.search.Query;import org.apache.lucene.search.ScoreDoc;diff --git a/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java b/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.javaindex 396b29ed58c..85ef9ba790f 100644--- a/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java+++ b/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java@@ -52,7 +52,6 @@ import org.apache.lucene.index.IndexWriter;import org.apache.lucene.index.IndexWriterConfig;import org.apache.lucene.index.Term;import org.apache.lucene.index.IndexWriterConfig.OpenMode;-import org.apache.lucene.queryParser.ParseException;import org.apache.lucene.search.*;import org.apache.lucene.search.BooleanClause.Occur;import org.apache.lucene.search.highlight.SynonymTokenizer.TestHighlightRunner;@@ -1630,7 +1629,7 @@ public class HighlighterTest extends BaseTokenStreamTestCase implements Formatteprivate Directory dir;private Analyzer a = new MockAnalyzer(random, MockTokenizer.WHITESPACE, false);- public void testWeightedTermsWithDeletes() throws IOException, ParseException, InvalidTokenOffsetsException {+ public void testWeightedTermsWithDeletes() throws IOException, InvalidTokenOffsetsException {makeIndex();deleteDocument();searchIndex();@@ -1660,7 +1659,7 @@ public class HighlighterTest extends BaseTokenStreamTestCase implements Formattewriter.close();}- private void searchIndex() throws IOException, ParseException, InvalidTokenOffsetsException {+ private void searchIndex() throws IOException, InvalidTokenOffsetsException {Query query = new TermQuery(new Term("t_text1", "random"));IndexSearcher searcher = new IndexSearcher( dir, true );// This scorer can return negative idf -> null fragmentdiff --git a/lucene/contrib/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java b/lucene/contrib/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.javaindex d7fbe0b0909..3bf22073508 100644--- a/lucene/contrib/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java+++ b/lucene/contrib/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java@@ -42,7 +42,6 @@ import org.apache.lucene.index.IndexWriter;import org.apache.lucene.index.IndexWriterConfig;import org.apache.lucene.index.Term;import org.apache.lucene.index.IndexWriterConfig.OpenMode;-import org.apache.lucene.queryParser.QueryParser;import org.apache.lucene.search.DisjunctionMaxQuery;import org.apache.lucene.search.PhraseQuery;import org.apache.lucene.search.Query;diff --git a/lucene/contrib/memory/build.xml b/lucene/contrib/memory/build.xmlindex 5ce01f5184c..8f73d28f708 100644--- a/lucene/contrib/memory/build.xml+++ b/lucene/contrib/memory/build.xml@@ -24,4 +24,20 @@</description><import file="../contrib-build.xml"/>++ <module-uptodate name="queryparser" property="queryparser.uptodate" classpath.property="queryparser.jar"/>++ <path id="test.classpath">+ <pathelement path="${queryparser.jar}"/>+ <path refid="test.base.classpath"/>+ </path>++ <target name="compile-core" depends="build-queryparser,common.compile-core" />++ <target name="build-queryparser" unless="queryparser.uptodate">+ <echo>Memory building dependency modules/queryparser</echo>+ <subant target="default">+ <fileset dir="${common.dir}/../modules/queryparser" includes="build.xml"/>+ </subant>+ </target></project>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.javaindex 197721b2236..1fe710cc3a0 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@@ -33,7 +33,7 @@ import org.apache.lucene.document.Document;import org.apache.lucene.document.Field;import org.apache.lucene.index.IndexWriter;import org.apache.lucene.index.IndexWriterConfig;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.IndexSearcher;import org.apache.lucene.search.TopDocs;import org.apache.lucene.store.Directory;diff --git a/lucene/contrib/queryparser/build.xml b/lucene/contrib/queryparser/build.xmlindex d12fdefcac5..f1492c8e606 100644--- a/lucene/contrib/queryparser/build.xml+++ b/lucene/contrib/queryparser/build.xml@@ -24,8 +24,15 @@</description><import file="../contrib-build.xml"/>-- <target name="compile-core" depends="javacc-notice, common.compile-core"/>++ <module-uptodate name="queryparser" property="queryparser.uptodate" classpath.property="queryparser.jar"/>++ <path id="classpath">+ <pathelement path="${queryparser.jar}"/>+ <path refid="base.classpath"/>+ </path>++ <target name="compile-core" depends="javacc-notice,build-queryparser,common.compile-core"/><!--NOTE: see the README.javacc for details on how to fully regenerate the parser@@ -100,4 +107,11 @@ import org.apache.lucene.queryParser.core.messages.*;"outputDir="src/java/org/apache/lucene/queryParser/surround/parser"/></target>++ <target name="build-queryparser" unless="queryparser.uptodate">+ <echo>QueryParser Contrib building dependency modules/queryparser</echo>+ <subant target="default">+ <fileset dir="${common.dir}/../modules/queryparser" includes="build.xml"/>+ </subant>+ </target></project>diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.javaindex 136d8405645..ae8defe16f1 100644--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java@@ -25,7 +25,7 @@ import java.util.List;import org.apache.lucene.analysis.Analyzer;import org.apache.lucene.analysis.TokenStream;import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;import org.apache.lucene.util.Version;@@ -41,7 +41,7 @@ import org.apache.lucene.util.Version;* using this parser will be no improvement over QueryParser in such cases).**/-public class AnalyzingQueryParser extends org.apache.lucene.queryParser.QueryParser {+public class AnalyzingQueryParser extends org.apache.lucene.queryparser.classic.QueryParser {/*** Constructs a query parser.diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/complexPhrase/ComplexPhraseQueryParser.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/complexPhrase/ComplexPhraseQueryParser.javaindex 9b4139278ac..97deb6f3fa0 100644--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/complexPhrase/ComplexPhraseQueryParser.java+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/complexPhrase/ComplexPhraseQueryParser.java@@ -25,8 +25,8 @@ import java.util.List;import org.apache.lucene.analysis.Analyzer;import org.apache.lucene.index.IndexReader;import org.apache.lucene.index.Term;-import org.apache.lucene.queryParser.ParseException;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.ParseException;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.BooleanClause;import org.apache.lucene.search.BooleanQuery;import org.apache.lucene.search.MultiTermQuery;diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/ExtendableQueryParser.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/ExtendableQueryParser.javaindex 6592c60afef..c85712b6f4b 100644--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/ExtendableQueryParser.java+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/ExtendableQueryParser.java@@ -18,9 +18,9 @@ package org.apache.lucene.queryParser.ext;*/import org.apache.lucene.analysis.Analyzer;-import org.apache.lucene.queryParser.ParseException;-import org.apache.lucene.queryParser.QueryParser;import org.apache.lucene.queryParser.ext.Extensions.Pair;+import org.apache.lucene.queryparser.classic.ParseException;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.Query;import org.apache.lucene.util.Version;diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/ExtensionQuery.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/ExtensionQuery.javaindex f84faf85b83..423cad3712c 100644--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/ExtensionQuery.java+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/ExtensionQuery.java@@ -1,6 +1,6 @@package org.apache.lucene.queryParser.ext;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.QueryParser;/*** Licensed to the Apache Software Foundation (ASF) under one or morediff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/Extensions.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/Extensions.javaindex edf763d785b..9e3ee393d1d 100644--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/Extensions.java+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/Extensions.java@@ -16,10 +16,11 @@ package org.apache.lucene.queryParser.ext;* See the License for the specific language governing permissions and* limitations under the License.*/+import org.apache.lucene.queryparser.classic.QueryParser;+import java.util.HashMap;import java.util.Map;-import org.apache.lucene.queryParser.QueryParser;/*** The {@link Extensions} class represents an extension mapping to associatediff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/ParserExtension.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/ParserExtension.javaindex b173858c897..77f9ada5efc 100644--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/ParserExtension.java+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/ParserExtension.java@@ -17,19 +17,19 @@ package org.apache.lucene.queryParser.ext;* limitations under the License.*/-import org.apache.lucene.queryParser.ParseException;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;/*** This class represents an extension base class to the Lucene standard- * {@link QueryParser}. The {@link QueryParser} is generated by the JavaCC+ * {@link org.apache.lucene.queryparser.classic.QueryParser}. The+ * {@link org.apache.lucene.queryparser.classic.QueryParser} is generated by the JavaCC* parser generator. Changing or adding functionality or syntax in the standard* query parser requires changes to the JavaCC source file. To enable extending* the standard query parser without changing the JavaCC sources and re-generate* the parser the {@link ParserExtension} can be customized and plugged into an* instance of {@link ExtendableQueryParser}, a direct subclass of- * {@link QueryParser}.+ * {@link org.apache.lucene.queryparser.classic.QueryParser}.** @see Extensions* @see ExtendableQueryParserdiff --git a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/analyzing/TestAnalyzingQueryParser.java b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/analyzing/TestAnalyzingQueryParser.javaindex 8613f8e4642..515d430f980 100644--- a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/analyzing/TestAnalyzingQueryParser.java+++ b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/analyzing/TestAnalyzingQueryParser.java@@ -25,7 +25,7 @@ import org.apache.lucene.analysis.MockTokenizer;import org.apache.lucene.analysis.TokenFilter;import org.apache.lucene.analysis.TokenStream;import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.util.LuceneTestCase;/**diff --git a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/complexPhrase/TestComplexPhraseQuery.java b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/complexPhrase/TestComplexPhraseQuery.javaindex b8aaae839c7..f3cd3f31dfd 100644--- a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/complexPhrase/TestComplexPhraseQuery.java+++ b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/complexPhrase/TestComplexPhraseQuery.java@@ -24,7 +24,7 @@ import org.apache.lucene.analysis.MockAnalyzer;import org.apache.lucene.document.Document;import org.apache.lucene.document.Field;import org.apache.lucene.index.IndexWriter;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.IndexSearcher;import org.apache.lucene.search.Query;import org.apache.lucene.search.ScoreDoc;diff --git a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/ext/ExtensionStub.java b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/ext/ExtensionStub.javaindex 63ce2b369f8..59f17221608 100644--- a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/ext/ExtensionStub.java+++ b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/ext/ExtensionStub.java@@ -1,7 +1,7 @@package org.apache.lucene.queryParser.ext;import org.apache.lucene.index.Term;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;import org.apache.lucene.search.TermQuery;@@ -30,4 +30,4 @@ class ExtensionStub extends ParserExtension {.getRawQueryString()));}-}\ No newline at end of file+}diff --git a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/ext/TestExtendableQueryParser.java b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/ext/TestExtendableQueryParser.javaindex 366168feed7..7aedc93e7ce 100644--- a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/ext/TestExtendableQueryParser.java+++ b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/ext/TestExtendableQueryParser.java@@ -20,26 +20,21 @@ package org.apache.lucene.queryParser.ext;import org.apache.lucene.analysis.Analyzer;import org.apache.lucene.analysis.MockAnalyzer;import org.apache.lucene.analysis.MockTokenizer;-import org.apache.lucene.queryParser.ParseException;-import org.apache.lucene.queryParser.QueryParser;-import org.apache.lucene.queryParser.TestQueryParser;+import org.apache.lucene.queryparser.classic.ParseException;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.BooleanClause;import org.apache.lucene.search.BooleanQuery;import org.apache.lucene.search.Query;import org.apache.lucene.search.TermQuery;+import org.apache.lucene.util.LuceneTestCase;/*** Testcase for the class {@link ExtendableQueryParser}*/-public class TestExtendableQueryParser extends TestQueryParser {+public class TestExtendableQueryParser extends LuceneTestCase {private static char[] DELIMITERS = new char[] {Extensions.DEFAULT_EXTENSION_FIELD_DELIMITER, '-', '|' };- @Override- public QueryParser getParser(Analyzer a) throws Exception {- return getParser(a, null);- }-public QueryParser getParser(Analyzer a, Extensions extensions)throws Exception {if (a == null)diff --git a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.java b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.javaindex 3614d01d397..b53ec6850a0 100644--- a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.java+++ b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.java@@ -35,7 +35,6 @@ import org.apache.lucene.analysis.TokenStream;import org.apache.lucene.analysis.tokenattributes.OffsetAttribute;import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;import org.apache.lucene.document.DateTools;-import org.apache.lucene.queryParser.TestQueryParser;import org.apache.lucene.queryParser.core.QueryNodeException;import org.apache.lucene.queryParser.core.QueryNodeParseException;import org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler;@@ -57,11 +56,11 @@ import org.apache.lucene.util.automaton.CharacterRunAutomaton;* This test case tests {@link PrecedenceQueryParser}.* </p>* <p>- * It contains all tests from {@link TestQueryParser} with some adjusted to- * fit the precedence requirement, plus some precedence test cases.+ * It contains all tests from {@link org.apache.lucene.queryparser.classic.TestQueryParser}+ * with some adjusted to fit the precedence requirement, plus some precedence test cases.* </p>*- * @see TestQueryParser+ * @see org.apache.lucene.queryparser.classic.TestQueryParser*/public class TestPrecedenceQueryParser extends LuceneTestCase {diff --git a/lucene/contrib/xml-query-parser/build.xml b/lucene/contrib/xml-query-parser/build.xmlindex ebe4a96d90f..a86d467c3b1 100644--- a/lucene/contrib/xml-query-parser/build.xml+++ b/lucene/contrib/xml-query-parser/build.xml@@ -29,21 +29,24 @@<property name="lucene.jar" location="${common.dir}/build/lucene-core-${version}.jar"/><property name="servlet.jar" location="${common.dir}/lib/servlet-api-2.4.jar"/><available property="servlet.jar.present" type="file" file="${servlet.jar}"/>+ <module-uptodate name="queryparser" property="queryparser.uptodate" classpath.property="queryparser.jar"/><path id="classpath"><pathelement path="${queries.jar}"/>+ <pathelement path="${queryparser.jar}"/><path refid="base.classpath"/></path><path id="web-classpath"><pathelement path="${queries.jar}"/>+ <pathelement path="${queryparser.jar}"/><pathelement path="${servlet.jar}"/><pathelement path="${build.dir}/${final.name}.jar"/><path refid="base.classpath"/></path>- <target name="compile-core" depends="build-queries, common.compile-core" />+ <target name="compile-core" depends="build-queries,build-queryparser,common.compile-core" /><target name="build-queries" unless="queries.uptodate"><echo>XML Parser building dependency ${queries.jar}</echo>@@ -82,4 +85,11 @@</target>+ <target name="build-queryparser" unless="queryparser.uptodate">+ <echo>Demo building dependency modules/queryparser</echo>+ <subant target="default">+ <fileset dir="${common.dir}/../modules/queryparser" includes="build.xml"/>+ </subant>+ </target>+</project>diff --git a/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/CoreParser.java b/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/CoreParser.javaindex c84b90a2981..080bd0a13e4 100644--- a/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/CoreParser.java+++ b/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/CoreParser.java@@ -6,7 +6,7 @@ import javax.xml.parsers.DocumentBuilder;import javax.xml.parsers.DocumentBuilderFactory;import org.apache.lucene.analysis.Analyzer;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.Query;import org.apache.lucene.xmlparser.builders.*;import org.w3c.dom.Document;diff --git a/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/CorePlusExtensionsParser.java b/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/CorePlusExtensionsParser.javaindex 37022b3e28a..cc68dec60b2 100644--- a/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/CorePlusExtensionsParser.java+++ b/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/CorePlusExtensionsParser.java@@ -1,7 +1,7 @@package org.apache.lucene.xmlparser;import org.apache.lucene.analysis.Analyzer;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.xmlparser.builders.BooleanFilterBuilder;import org.apache.lucene.xmlparser.builders.BoostingQueryBuilder;import org.apache.lucene.xmlparser.builders.DuplicateFilterBuilder;diff --git a/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/UserInputQueryBuilder.java b/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/UserInputQueryBuilder.javaindex 7b6d865a4f2..0ada2ca00a8 100644--- a/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/UserInputQueryBuilder.java+++ b/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/UserInputQueryBuilder.java@@ -1,8 +1,8 @@package org.apache.lucene.xmlparser.builders;import org.apache.lucene.analysis.Analyzer;-import org.apache.lucene.queryParser.ParseException;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.ParseException;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.Query;import org.apache.lucene.xmlparser.DOMUtils;import org.apache.lucene.xmlparser.ParserException;diff --git a/lucene/src/java/org/apache/lucene/analysis/package.html b/lucene/src/java/org/apache/lucene/analysis/package.htmlindex 4ce7f49b590..45d9d737c02 100644--- a/lucene/src/java/org/apache/lucene/analysis/package.html+++ b/lucene/src/java/org/apache/lucene/analysis/package.html@@ -123,10 +123,8 @@ There are many post tokenization steps that can be done, including (but not limi{@link org.apache.lucene.index.IndexWriter#addDocument(org.apache.lucene.document.Document) addDocument(doc)},the Analyzer in effect for indexing is invoked for each indexed field of the added document.</li>- <li>At search, as a consequence of- {@link org.apache.lucene.queryParser.QueryParser#parse(java.lang.String) QueryParser.parse(queryText)},- the QueryParser may invoke the Analyzer in effect.- Note that for some queries analysis does not take place, e.g. wildcard queries.+ <li>At search, a QueryParser may invoke the Analyzer during parsing. Note that for some queries, analysis does not+ take place, e.g. wildcard queries.</li></ul>However an application might invoke Analysis of any text for testing or for any other purpose, something like:diff --git a/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java b/lucene/src/java/org/apache/lucene/search/MultiTermQuery.javaindex e8e7020975b..aba17817184 100644--- a/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java+++ b/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java@@ -23,7 +23,6 @@ import org.apache.lucene.index.IndexReader;import org.apache.lucene.index.Term;import org.apache.lucene.index.Terms;import org.apache.lucene.index.TermsEnum;-import org.apache.lucene.queryParser.QueryParser;import org.apache.lucene.util.AttributeSource;import org.apache.lucene.util.TermContext;@@ -56,7 +55,7 @@ import org.apache.lucene.util.TermContext;* a priority queue to only collect competitive terms* and not hit this limitation.*- * Note that {@link QueryParser} produces+ * Note that org.apache.lucene.queryparser.classic.QueryParser produces* MultiTermQueries using {@link* #CONSTANT_SCORE_AUTO_REWRITE_DEFAULT} by default.*/diff --git a/lucene/src/java/org/apache/lucene/search/Query.java b/lucene/src/java/org/apache/lucene/search/Query.javaindex d4a8d4372b5..0bf05ecd705 100644--- a/lucene/src/java/org/apache/lucene/search/Query.java+++ b/lucene/src/java/org/apache/lucene/search/Query.java@@ -39,10 +39,6 @@ import org.apache.lucene.index.Term;<li> {@link NumericRangeQuery}<li> {@link org.apache.lucene.search.spans.SpanQuery}</ul>- <p>A parser for queries is contained in:- <ul>- <li>{@link org.apache.lucene.queryParser.QueryParser QueryParser}- </ul>*/public abstract class Query implements Cloneable {private float boost = 1.0f; // query boost factor@@ -61,17 +57,6 @@ public abstract class Query implements Cloneable {/** Prints a query to a string, with <code>field</code> assumed to be the* default field and omitted.- * <p>The representation used is one that is supposed to be readable- * by {@link org.apache.lucene.queryParser.QueryParser QueryParser}. However,- * there are the following limitations:- * <ul>- * <li>If the query was created by the parser, the printed- * representation may not be exactly what was parsed. For example,- * characters that need to be escaped will be represented without- * the required backslash.</li>- * <li>Some of the more complicated queries (e.g. span queries)- * don't have a representation that can be parsed by QueryParser.</li>- * </ul>*/public abstract String toString(String field);diff --git a/lucene/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java b/lucene/src/test/org/apache/lucene/search/TestMultiPhraseQuery.javaindex c434b1d9c87..b5ef9fd3fc8 100644--- a/lucene/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java+++ b/lucene/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java@@ -23,7 +23,6 @@ import org.apache.lucene.index.Term;import org.apache.lucene.index.TermsEnum;import org.apache.lucene.index.IndexReader;import org.apache.lucene.index.MultiFields;-import org.apache.lucene.queryParser.ParseException;import org.apache.lucene.store.Directory;import org.apache.lucene.util.BytesRef;import org.apache.lucene.util.TermContext;@@ -465,7 +464,7 @@ public class TestMultiPhraseQuery extends LuceneTestCase {* using query parser, MPQ will be created, and will not be strict about having all query terms* in each position - one of each position is sufficient (OR logic)*/- public void testZeroPosIncrSloppyParsedAnd() throws IOException, ParseException {+ public void testZeroPosIncrSloppyParsedAnd() throws IOException {MultiPhraseQuery q = new MultiPhraseQuery();q.add(new Term[]{ new Term("field", "a"), new Term("field", "1") }, -1);q.add(new Term[]{ new Term("field", "b"), new Term("field", "1") }, 0);@@ -509,7 +508,7 @@ public class TestMultiPhraseQuery extends LuceneTestCase {/*** PQ AND Mode - Manually creating a phrase query*/- public void testZeroPosIncrSloppyPqAnd() throws IOException, ParseException {+ public void testZeroPosIncrSloppyPqAnd() throws IOException {final PhraseQuery pq = new PhraseQuery();for (TokenAndPos tap : INCR_0_QUERY_TOKENS_AND) {pq.add(new Term("field",tap.token), tap.pos);@@ -524,7 +523,7 @@ public class TestMultiPhraseQuery extends LuceneTestCase {/*** MPQ AND Mode - Manually creating a multiple phrase query*/- public void testZeroPosIncrSloppyMpqAnd() throws IOException, ParseException {+ public void testZeroPosIncrSloppyMpqAnd() throws IOException {final MultiPhraseQuery mpq = new MultiPhraseQuery();for (TokenAndPos tap : INCR_0_QUERY_TOKENS_AND) {mpq.add(new Term[]{new Term("field",tap.token)}, tap.pos); //AND logic@@ -539,7 +538,7 @@ public class TestMultiPhraseQuery extends LuceneTestCase {/*** MPQ Combined AND OR Mode - Manually creating a multiple phrase query*/- public void testZeroPosIncrSloppyMpqAndOrMatch() throws IOException, ParseException {+ public void testZeroPosIncrSloppyMpqAndOrMatch() throws IOException {final MultiPhraseQuery mpq = new MultiPhraseQuery();for (TokenAndPos tap[] : INCR_0_QUERY_TOKENS_AND_OR_MATCH) {Term[] terms = tapTerms(tap);@@ -556,7 +555,7 @@ public class TestMultiPhraseQuery extends LuceneTestCase {/*** MPQ Combined AND OR Mode - Manually creating a multiple phrase query - with no match*/- public void testZeroPosIncrSloppyMpqAndOrNoMatch() throws IOException, ParseException {+ public void testZeroPosIncrSloppyMpqAndOrNoMatch() throws IOException {final MultiPhraseQuery mpq = new MultiPhraseQuery();for (TokenAndPos tap[] : INCR_0_QUERY_TOKENS_AND_OR_NO_MATCHN) {Term[] terms = tapTerms(tap);diff --git a/lucene/src/test/org/apache/lucene/search/TestSort.java b/lucene/src/test/org/apache/lucene/search/TestSort.javaindex 9e355d2fbb6..2c076e976cd 100644--- a/lucene/src/test/org/apache/lucene/search/TestSort.java+++ b/lucene/src/test/org/apache/lucene/search/TestSort.java@@ -38,7 +38,6 @@ import org.apache.lucene.index.RandomIndexWriter;import org.apache.lucene.index.Term;import org.apache.lucene.index.codecs.CodecProvider;import org.apache.lucene.index.values.ValueType;-import org.apache.lucene.queryParser.ParseException;import org.apache.lucene.search.BooleanClause.Occur;import org.apache.lucene.search.FieldValueHitQueue.Entry;import org.apache.lucene.search.cache.ByteValuesCreator;@@ -365,7 +364,7 @@ public class TestSort extends LuceneTestCase {/*** Test String sorting: small queue to many matches, multi field sort, reverse sort*/- public void testStringSort() throws IOException, ParseException {+ public void testStringSort() throws IOException {ScoreDoc[] result = null;IndexSearcher searcher = getFullStrings();sort.setSort(diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopFilter.javaindex 45b847a833e..c36dcbe4c63 100644--- a/modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopFilter.java+++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopFilter.java@@ -26,7 +26,6 @@ import org.apache.lucene.analysis.util.FilteringTokenFilter;import org.apache.lucene.analysis.TokenStream;import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;import org.apache.lucene.analysis.util.CharArraySet;-import org.apache.lucene.queryParser.QueryParser;import org.apache.lucene.util.Version;/**diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/util/FilteringTokenFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/util/FilteringTokenFilter.javaindex aa5d41fdc7c..f810c28c90c 100644--- a/modules/analysis/common/src/java/org/apache/lucene/analysis/util/FilteringTokenFilter.java+++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/util/FilteringTokenFilter.java@@ -22,7 +22,6 @@ import java.io.IOException;import org.apache.lucene.analysis.TokenFilter;import org.apache.lucene.analysis.TokenStream;import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;-import org.apache.lucene.queryParser.QueryParser; // for javadoc/*** Abstract base class for TokenFilters that may remove tokens.@@ -87,7 +86,7 @@ public abstract class FilteringTokenFilter extends TokenFilter {* token is incremented.** <p> <b>NOTE</b>: be sure to also- * set {@link QueryParser#setEnablePositionIncrements} if+ * set org.apache.lucene.queryparser.classic.QueryParser#setEnablePositionIncrements if* you use QueryParser to create queries.*/public void setEnablePositionIncrements(boolean enable) {diff --git a/modules/benchmark/build.xml b/modules/benchmark/build.xmlindex e49137aeb5d..300024eaf66 100644--- a/modules/benchmark/build.xml+++ b/modules/benchmark/build.xml@@ -41,6 +41,8 @@property="analyzers-common.uptodate" classpath.property="analyzers-common.jar"/><contrib-uptodate name="memory" property="memory.uptodate" classpath.property="memory.jar"/>+ <module-uptodate name="queryparser" property="queryparser.uptodate" classpath.property="queryparser.jar"/>+<target name="check-files"><available file="temp/news20.tar.gz" property="news20.exists"/>@@ -160,6 +162,7 @@<pathelement path="${memory.jar}"/><pathelement path="${highlighter.jar}"/><pathelement path="${analyzers-common.jar}"/>+ <pathelement path="${queryparser.jar}"/><path refid="base.classpath"/><fileset dir="lib"><include name="**/*.jar"/>@@ -268,8 +271,13 @@<fileset dir="${common.dir}/contrib/memory" includes="build.xml"/></subant></target>+ <target name="compile-queryparser" unless="queryparser.uptodate">+ <subant target="default">+ <fileset dir="${common.dir}/../modules/queryparser" includes="build.xml"/>+ </subant>+ </target>- <target name="init" depends="contrib-build.init,compile-memory,compile-highlighter,compile-analyzers-common"/>+ <target name="init" depends="contrib-build.init,compile-memory,compile-highlighter,compile-analyzers-common,compile-queryparser"/><target name="clean-javacc"><fileset dir="src/java/org/apache/lucene/benchmark/byTask/feeds/demohtml" includes="*.java">diff --git a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiQueryMaker.java b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiQueryMaker.javaindex 106c6c38766..4253f5bb9c9 100644--- a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiQueryMaker.java+++ b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiQueryMaker.java@@ -24,7 +24,7 @@ import java.util.List;import org.apache.lucene.analysis.Analyzer;import org.apache.lucene.analysis.standard.StandardAnalyzer;import org.apache.lucene.index.Term;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.MultiTermQuery;import org.apache.lucene.search.Query;import org.apache.lucene.search.WildcardQuery;diff --git a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/FileBasedQueryMaker.java b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/FileBasedQueryMaker.javaindex dbfc73196c4..ac17182440a 100644--- a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/FileBasedQueryMaker.java+++ b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/FileBasedQueryMaker.java@@ -1,8 +1,8 @@package org.apache.lucene.benchmark.byTask.feeds;import org.apache.lucene.analysis.Analyzer;-import org.apache.lucene.queryParser.QueryParser;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.Query;import org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask;import org.apache.lucene.util.Version;diff --git a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LongToEnglishQueryMaker.java b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LongToEnglishQueryMaker.javaindex fdee2882518..d97cde525e4 100644--- a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LongToEnglishQueryMaker.java+++ b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LongToEnglishQueryMaker.java@@ -21,7 +21,7 @@ import org.apache.lucene.analysis.Analyzer;import org.apache.lucene.analysis.standard.StandardAnalyzer;import org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask;import org.apache.lucene.benchmark.byTask.utils.Config;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.Query;import org.apache.lucene.util.English;import org.apache.lucene.util.Version;diff --git a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersQueryMaker.java b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersQueryMaker.javaindex c12ed07eca6..9dcc0af09f8 100644--- a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersQueryMaker.java+++ b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersQueryMaker.java@@ -19,7 +19,7 @@ package org.apache.lucene.benchmark.byTask.feeds;import org.apache.lucene.analysis.Analyzer;import org.apache.lucene.index.Term;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.Query;import org.apache.lucene.search.WildcardQuery;import org.apache.lucene.search.spans.SpanFirstQuery;diff --git a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SimpleQueryMaker.java b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SimpleQueryMaker.javaindex c550f33a6f0..115b5c45af0 100644--- a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SimpleQueryMaker.java+++ b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SimpleQueryMaker.java@@ -19,7 +19,7 @@ package org.apache.lucene.benchmark.byTask.feeds;import org.apache.lucene.analysis.Analyzer;import org.apache.lucene.index.Term;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.BooleanClause.Occur;import org.apache.lucene.search.BooleanQuery;import org.apache.lucene.search.Query;diff --git a/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityQueryParser.java b/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityQueryParser.javaindex 66bd2755d04..6a0f22dcee1 100755--- a/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityQueryParser.java+++ b/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityQueryParser.java@@ -16,7 +16,7 @@*/package org.apache.lucene.benchmark.quality;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;/**diff --git a/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/SimpleQQParser.java b/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/SimpleQQParser.javaindex 765bdc61970..d7d8d58a2e3 100755--- a/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/SimpleQQParser.java+++ b/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/SimpleQQParser.java@@ -19,8 +19,8 @@ package org.apache.lucene.benchmark.quality.utils;import org.apache.lucene.analysis.standard.StandardAnalyzer;import org.apache.lucene.benchmark.quality.QualityQuery;import org.apache.lucene.benchmark.quality.QualityQueryParser;-import org.apache.lucene.queryParser.ParseException;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.ParseException;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.BooleanClause;import org.apache.lucene.search.BooleanQuery;import org.apache.lucene.search.Query;diff --git a/modules/build.xml b/modules/build.xmlindex 8c7c337eb7b..62db70ab0ed 100644--- a/modules/build.xml+++ b/modules/build.xml@@ -28,6 +28,7 @@<fileset dir="grouping" includes="build.xml" /><fileset dir="join" includes="build.xml" /><fileset dir="queries" includes="build.xml" />+ <fileset dir="queryparser" includes="build.xml" /><fileset dir="suggest" includes="build.xml" /></subant></sequential>@@ -42,6 +43,7 @@<fileset dir="grouping" includes="build.xml" /><fileset dir="join" includes="build.xml" /><fileset dir="queries" includes="build.xml" />+ <fileset dir="queryparser" includes="build.xml" /><fileset dir="suggest" includes="build.xml" /></subant></sequential>@@ -56,6 +58,7 @@<fileset dir="grouping" includes="build.xml" /><fileset dir="join" includes="build.xml" /><fileset dir="queries" includes="build.xml" />+ <fileset dir="queryparser" includes="build.xml" /><fileset dir="suggest" includes="build.xml" /></subant></sequential>@@ -70,6 +73,7 @@<fileset dir="grouping" includes="build.xml" /><fileset dir="join" includes="build.xml" /><fileset dir="queries" includes="build.xml" />+ <fileset dir="queryparser" includes="build.xml" /><fileset dir="suggest" includes="build.xml" /></subant></sequential>@@ -85,6 +89,7 @@<fileset dir="grouping" includes="build.xml" /><fileset dir="join" includes="build.xml" /><fileset dir="queries" includes="build.xml" />+ <fileset dir="queryparser" includes="build.xml" /><fileset dir="suggest" includes="build.xml" /></subant></sequential>@@ -98,6 +103,7 @@<fileset dir="grouping" includes="build.xml" /><fileset dir="join" includes="build.xml" /><fileset dir="queries" includes="build.xml" />+ <fileset dir="queryparser" includes="build.xml" /><fileset dir="suggest" includes="build.xml" /></subant></sequential>@@ -113,6 +119,7 @@<fileset dir="grouping" includes="build.xml" /><fileset dir="join" includes="build.xml" /><fileset dir="queries" includes="build.xml" />+ <fileset dir="queryparser" includes="build.xml" /><fileset dir="suggest" includes="build.xml" /></subant></sequential>diff --git a/modules/queryparser/LICENSE.txt b/modules/queryparser/LICENSE.txtnew file mode 100644index 00000000000..d6456956733--- /dev/null+++ b/modules/queryparser/LICENSE.txt@@ -0,0 +1,202 @@++ Apache License+ Version 2.0, January 2004+ http://www.apache.org/licenses/++ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION++ 1. Definitions.++ "License" shall mean the terms and conditions for use, reproduction,+ and distribution as defined by Sections 1 through 9 of this document.++ "Licensor" shall mean the copyright owner or entity authorized by+ the copyright owner that is granting the License.++ "Legal Entity" shall mean the union of the acting entity and all+ other entities that control, are controlled by, or are under common+ control with that entity. For the purposes of this definition,+ "control" means (i) the power, direct or indirect, to cause the+ direction or management of such entity, whether by contract or+ otherwise, or (ii) ownership of fifty percent (50%) or more of the+ outstanding shares, or (iii) beneficial ownership of such entity.++ "You" (or "Your") shall mean an individual or Legal Entity+ exercising permissions granted by this License.++ "Source" form shall mean the preferred form for making modifications,+ including but not limited to software source code, documentation+ source, and configuration files.++ "Object" form shall mean any form resulting from mechanical+ transformation or translation of a Source form, including but+ not limited to compiled object code, generated documentation,+ and conversions to other media types.++ "Work" shall mean the work of authorship, whether in Source or+ Object form, made available under the License, as indicated by a+ copyright notice that is included in or attached to the work+ (an example is provided in the Appendix below).++ "Derivative Works" shall mean any work, whether in Source or Object+ form, that is based on (or derived from) the Work and for which the+ editorial revisions, annotations, elaborations, or other modifications+ represent, as a whole, an original work of authorship. For the purposes+ of this License, Derivative Works shall not include works that remain+ separable from, or merely link (or bind by name) to the interfaces of,+ the Work and Derivative Works thereof.++ "Contribution" shall mean any work of authorship, including+ the original version of the Work and any modifications or additions+ to that Work or Derivative Works thereof, that is intentionally+ submitted to Licensor for inclusion in the Work by the copyright owner+ or by an individual or Legal Entity authorized to submit on behalf of+ the copyright owner. For the purposes of this definition, "submitted"+ means any form of electronic, verbal, or written communication sent+ to the Licensor or its representatives, including but not limited to+ communication on electronic mailing lists, source code control systems,+ and issue tracking systems that are managed by, or on behalf of, the+ Licensor for the purpose of discussing and improving the Work, but+ excluding communication that is conspicuously marked or otherwise+ designated in writing by the copyright owner as "Not a Contribution."++ "Contributor" shall mean Licensor and any individual or Legal Entity+ on behalf of whom a Contribution has been received by Licensor and+ subsequently incorporated within the Work.++ 2. Grant of Copyright License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ copyright license to reproduce, prepare Derivative Works of,+ publicly display, publicly perform, sublicense, and distribute the+ Work and such Derivative Works in Source or Object form.++ 3. Grant of Patent License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ (except as stated in this section) patent license to make, have made,+ use, offer to sell, sell, import, and otherwise transfer the Work,+ where such license applies only to those patent claims licensable+ by such Contributor that are necessarily infringed by their+ Contribution(s) alone or by combination of their Contribution(s)+ with the Work to which such Contribution(s) was submitted. If You+ institute patent litigation against any entity (including a+ cross-claim or counterclaim in a lawsuit) alleging that the Work+ or a Contribution incorporated within the Work constitutes direct+ or contributory patent infringement, then any patent licenses+ granted to You under this License for that Work shall terminate+ as of the date such litigation is filed.++ 4. Redistribution. You may reproduce and distribute copies of the+ Work or Derivative Works thereof in any medium, with or without+ modifications, and in Source or Object form, provided that You+ meet the following conditions:++ (a) You must give any other recipients of the Work or+ Derivative Works a copy of this License; and++ (b) You must cause any modified files to carry prominent notices+ stating that You changed the files; and++ (c) You must retain, in the Source form of any Derivative Works+ that You distribute, all copyright, patent, trademark, and+ attribution notices from the Source form of the Work,+ excluding those notices that do not pertain to any part of+ the Derivative Works; and++ (d) If the Work includes a "NOTICE" text file as part of its+ distribution, then any Derivative Works that You distribute must+ include a readable copy of the attribution notices contained+ within such NOTICE file, excluding those notices that do not+ pertain to any part of the Derivative Works, in at least one+ of the following places: within a NOTICE text file distributed+ as part of the Derivative Works; within the Source form or+ documentation, if provided along with the Derivative Works; or,+ within a display generated by the Derivative Works, if and+ wherever such third-party notices normally appear. The contents+ of the NOTICE file are for informational purposes only and+ do not modify the License. You may add Your own attribution+ notices within Derivative Works that You distribute, alongside+ or as an addendum to the NOTICE text from the Work, provided+ that such additional attribution notices cannot be construed+ as modifying the License.++ You may add Your own copyright statement to Your modifications and+ may provide additional or different license terms and conditions+ for use, reproduction, or distribution of Your modifications, or+ for any such Derivative Works as a whole, provided Your use,+ reproduction, and distribution of the Work otherwise complies with+ the conditions stated in this License.++ 5. Submission of Contributions. Unless You explicitly state otherwise,+ any Contribution intentionally submitted for inclusion in the Work+ by You to the Licensor shall be under the terms and conditions of+ this License, without any additional terms or conditions.+ Notwithstanding the above, nothing herein shall supersede or modify+ the terms of any separate license agreement you may have executed+ with Licensor regarding such Contributions.++ 6. Trademarks. This License does not grant permission to use the trade+ names, trademarks, service marks, or product names of the Licensor,+ except as required for reasonable and customary use in describing the+ origin of the Work and reproducing the content of the NOTICE file.++ 7. Disclaimer of Warranty. Unless required by applicable law or+ agreed to in writing, Licensor provides the Work (and each+ Contributor provides its Contributions) on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or+ implied, including, without limitation, any warranties or conditions+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A+ PARTICULAR PURPOSE. You are solely responsible for determining the+ appropriateness of using or redistributing the Work and assume any+ risks associated with Your exercise of permissions under this License.++ 8. Limitation of Liability. In no event and under no legal theory,+ whether in tort (including negligence), contract, or otherwise,+ unless required by applicable law (such as deliberate and grossly+ negligent acts) or agreed to in writing, shall any Contributor be+ liable to You for damages, including any direct, indirect, special,+ incidental, or consequential damages of any character arising as a+ result of this License or out of the use or inability to use the+ Work (including but not limited to damages for loss of goodwill,+ work stoppage, computer failure or malfunction, or any and all+ other commercial damages or losses), even if such Contributor+ has been advised of the possibility of such damages.++ 9. Accepting Warranty or Additional Liability. While redistributing+ the Work or Derivative Works thereof, You may choose to offer,+ and charge a fee for, acceptance of support, warranty, indemnity,+ or other liability obligations and/or rights consistent with this+ License. However, in accepting such obligations, You may act only+ on Your own behalf and on Your sole responsibility, not on behalf+ of any other Contributor, and only if You agree to indemnify,+ defend, and hold each Contributor harmless for any liability+ incurred by, or claims asserted against, such Contributor by reason+ of your accepting any such warranty or additional liability.++ END OF TERMS AND CONDITIONS++ APPENDIX: How to apply the Apache License to your work.++ To apply the Apache License to your work, attach the following+ boilerplate notice, with the fields enclosed by brackets "[]"+ replaced with your own identifying information. (Don't include+ the brackets!) The text should be enclosed in the appropriate+ comment syntax for the file format. We also recommend that a+ file or class name and description of purpose be included on the+ same "printed page" as the copyright notice for easier+ identification within third-party archives.++ Copyright [yyyy] [name of copyright owner]++ Licensed under the Apache License, Version 2.0 (the "License");+ you may not use this file except in compliance with the License.+ You may obtain a copy of the License at++ http://www.apache.org/licenses/LICENSE-2.0++ Unless required by applicable law or agreed to in writing, software+ distributed under the License is distributed on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ See the License for the specific language governing permissions and+ limitations under the License.diff --git a/modules/queryparser/NOTICE.txt b/modules/queryparser/NOTICE.txtnew file mode 100644index 00000000000..1743ea8df5e--- /dev/null+++ b/modules/queryparser/NOTICE.txt@@ -0,0 +1,5 @@+Apache Lucene QueryParsers+Copyright 2011 The Apache Software Foundation++This product includes software developed by+The Apache Software Foundation (http://www.apache.org/).diff --git a/modules/queryparser/build.xml b/modules/queryparser/build.xmlnew file mode 100644index 00000000000..7bdec278ab2--- /dev/null+++ b/modules/queryparser/build.xml@@ -0,0 +1,59 @@+<!--+ Licensed to the Apache Software Foundation (ASF) under one or more+ contributor license agreements. See the NOTICE file distributed with+ this work for additional information regarding copyright ownership.+ The ASF licenses this file to You under the Apache License, Version 2.0+ (the "License"); you may not use this file except in compliance with+ the License. You may obtain a copy of the License at++ http://www.apache.org/licenses/LICENSE-2.0++ Unless required by applicable law or agreed to in writing, software+ distributed under the License is distributed on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ See the License for the specific language governing permissions and+ limitations under the License.+ -->++<project name="queryparser" default="default">+ <description>+ Lucene QueryParsers+ </description>++ <property name="build.dir" location="build/"/>+ <property name="dist.dir" location="dist/"/>+ <property name="maven.dist.dir" location="../dist/maven"/>++ <import file="../../lucene/contrib/contrib-build.xml"/>++ <target name="dist-maven" depends="jar-core,javadocs,contrib-build.dist-maven"/>++ <target name="clean-javacc">+ <delete>+ <fileset dir="src/java/org/apache/lucene/queryparser/classic" includes="*.java">+ <containsregexp expression="Generated.*By.*JavaCC"/>+ </fileset>+ </delete>+ </target>++ <target name="javacc" depends="init,javacc-check,clean-javacc,javacc-QueryParser"/>++ <target name="javacc-QueryParser" depends="init,javacc-check" if="javacc.present">+ <sequential>+ <invoke-javacc target="src/java/org/apache/lucene/queryparser/classic/QueryParser.jj"+ outputDir="src/java/org/apache/lucene/queryparser/classic"/>++ <!-- Change the incorrect public ctors for QueryParser to be protected instead -->+ <replaceregexp file="src/java/org/apache/lucene/queryparser/classic/QueryParser.java"+ byline="true"+ match="public QueryParser\(CharStream "+ replace="protected QueryParser(CharStream "/>+ <replaceregexp file="src/java/org/apache/lucene/queryparser/classic/QueryParser.java"+ byline="true"+ match="public QueryParser\(QueryParserTokenManager "+ replace="protected QueryParser(QueryParserTokenManager "/>++ </sequential>+ </target>++</project>diff --git a/lucene/src/java/org/apache/lucene/queryParser/CharStream.java b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.javasimilarity index 96%rename from lucene/src/java/org/apache/lucene/queryParser/CharStream.javarename to modules/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.javaindex fe1c9e731d6..d5b80024580 100644--- a/lucene/src/java/org/apache/lucene/queryParser/CharStream.java+++ b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.java@@ -1,6 +1,6 @@/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 4.1 *//* JavaCCOptions:STATIC=false */-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;/*** This interface describes a character stream that maintains line and@@ -28,14 +28,14 @@ public interface CharStream {/*** Returns the column position of the character last read.- * @deprecated (gen)+ * @deprecated* @see #getEndColumn*/int getColumn();/*** Returns the line number of the character last read.- * @deprecated (gen)+ * @deprecated* @see #getEndLine*/int getLine();@@ -109,4 +109,4 @@ public interface CharStream {void Done();}-/* JavaCC - OriginalChecksum=32a89423891f765dde472f7ef0e3ef7b (do not edit this line) */+/* JavaCC - OriginalChecksum=0790771f0d47abfd976f028fa2364b0f (do not edit this line) */diff --git a/lucene/src/java/org/apache/lucene/queryParser/FastCharStream.java b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/FastCharStream.javasimilarity index 98%rename from lucene/src/java/org/apache/lucene/queryParser/FastCharStream.javarename to modules/queryparser/src/java/org/apache/lucene/queryparser/classic/FastCharStream.javaindex 8c1a1b9a633..3960cc44c5a 100644--- a/lucene/src/java/org/apache/lucene/queryParser/FastCharStream.java+++ b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/FastCharStream.java@@ -1,5 +1,5 @@// FastCharStream.java-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;/*** Licensed to the Apache Software Foundation (ASF) under one or morediff --git a/lucene/src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/MultiFieldQueryParser.javasimilarity index 99%rename from lucene/src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.javarename to modules/queryparser/src/java/org/apache/lucene/queryparser/classic/MultiFieldQueryParser.javaindex 4e0dd68818c..b55f99dadf3 100644--- a/lucene/src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java+++ b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/MultiFieldQueryParser.java@@ -1,4 +1,4 @@-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;/*** Licensed to the Apache Software Foundation (ASF) under one or morediff --git a/lucene/src/java/org/apache/lucene/queryParser/ParseException.java b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.javasimilarity index 98%rename from lucene/src/java/org/apache/lucene/queryParser/ParseException.javarename to modules/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.javaindex b48a44644d8..f638ae1554b 100644--- a/lucene/src/java/org/apache/lucene/queryParser/ParseException.java+++ b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.java@@ -1,6 +1,6 @@/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 *//* JavaCCOptions:KEEP_LINE_COL=null */-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;/*** This exception is thrown when parse errors are encountered.@@ -195,4 +195,4 @@ public class ParseException extends Exception {}}-/* JavaCC - OriginalChecksum=c7631a240f7446940695eac31d9483ca (do not edit this line) */+/* JavaCC - OriginalChecksum=f669ffb14d5be55de6298772ac9befeb (do not edit this line) */diff --git a/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.javasimilarity index 99%rename from lucene/src/java/org/apache/lucene/queryParser/QueryParser.javarename to modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.javaindex f3ed3488d18..007959598a4 100644--- a/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java+++ b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java@@ -1,5 +1,5 @@/* Generated By:JavaCC: Do not edit this line. QueryParser.java */-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;import java.io.StringReader;import java.util.ArrayList;@@ -640,7 +640,7 @@ public class QueryParser extends QueryParserBase implements QueryParserConstantsreturn (jj_ntk = jj_nt.kind);}- private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();+ private java.util.List jj_expentries = new java.util.ArrayList();private int[] jj_expentry;private int jj_kind = -1;private int[] jj_lasttokens = new int[100];@@ -703,7 +703,7 @@ public class QueryParser extends QueryParserBase implements QueryParserConstantsjj_add_error_token(0, 0);int[][] exptokseq = new int[jj_expentries.size()][];for (int i = 0; i < jj_expentries.size(); i++) {- exptokseq[i] = jj_expentries.get(i);+ exptokseq[i] = (int[])jj_expentries.get(i);}return new ParseException(token, exptokseq, tokenImage);}diff --git a/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jjsimilarity index 99%rename from lucene/src/java/org/apache/lucene/queryParser/QueryParser.jjrename to modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jjindex 21087bdc1d7..26f15c8a7ff 100644--- a/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj+++ b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj@@ -23,7 +23,7 @@ options {PARSER_BEGIN(QueryParser)-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;import java.io.StringReader;import java.util.ArrayList;diff --git a/lucene/src/java/org/apache/lucene/queryParser/QueryParserBase.java b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.javasimilarity index 97%rename from lucene/src/java/org/apache/lucene/queryParser/QueryParserBase.javarename to modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.javaindex 58c77fd2897..9abddc031b7 100644--- a/lucene/src/java/org/apache/lucene/queryParser/QueryParserBase.java+++ b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java@@ -15,7 +15,7 @@* limitations under the License.*/-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;import java.io.IOException;import java.io.StringReader;@@ -30,7 +30,7 @@ import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute;import org.apache.lucene.document.DateTools;import org.apache.lucene.index.Term;-import org.apache.lucene.queryParser.QueryParser.Operator;+import org.apache.lucene.queryparser.classic.QueryParser.Operator;import org.apache.lucene.search.*;import org.apache.lucene.util.BytesRef;import org.apache.lucene.util.Version;@@ -459,14 +459,14 @@ public abstract class QueryParserBase {}/**- * @exception org.apache.lucene.queryParser.ParseException throw in overridden method to disallow+ * @exception org.apache.lucene.queryparser.classic.ParseException throw in overridden method to disallow*/protected Query getFieldQuery(String field, String queryText, boolean quoted) throws ParseException {return newFieldQuery(analyzer, field, queryText, quoted);}/**- * @exception org.apache.lucene.queryParser.ParseException throw in overridden method to disallow+ * @exception org.apache.lucene.queryparser.classic.ParseException throw in overridden method to disallow*/protected Query newFieldQuery(Analyzer analyzer, String field, String queryText, boolean quoted) throws ParseException {// Use the analyzer to get all the tokens, and then build a TermQuery,@@ -644,7 +644,7 @@ public abstract class QueryParserBase {* This method may be overridden, for example, to return* a SpanNearQuery instead of a PhraseQuery.*- * @exception org.apache.lucene.queryParser.ParseException throw in overridden method to disallow+ * @exception org.apache.lucene.queryparser.classic.ParseException throw in overridden method to disallow*/protected Query getFieldQuery(String field, String queryText, int slop)throws ParseException {@@ -662,7 +662,7 @@ public abstract class QueryParserBase {/***- * @exception org.apache.lucene.queryParser.ParseException+ * @exception org.apache.lucene.queryparser.classic.ParseException*/protected Query getRangeQuery(String field,String part1,@@ -874,7 +874,7 @@ public abstract class QueryParserBase {* to join.** @return Resulting {@link org.apache.lucene.search.Query} object.- * @exception org.apache.lucene.queryParser.ParseException throw in overridden method to disallow+ * @exception org.apache.lucene.queryparser.classic.ParseException throw in overridden method to disallow*/protected Query getBooleanQuery(List<BooleanClause> clauses) throws ParseException {return getBooleanQuery(clauses, false);@@ -892,7 +892,7 @@ public abstract class QueryParserBase {* @param disableCoord true if coord scoring should be disabled.** @return Resulting {@link org.apache.lucene.search.Query} object.- * @exception org.apache.lucene.queryParser.ParseException throw in overridden method to disallow+ * @exception org.apache.lucene.queryparser.classic.ParseException throw in overridden method to disallow*/protected Query getBooleanQuery(List<BooleanClause> clauses, boolean disableCoord)throws ParseException@@ -926,7 +926,7 @@ public abstract class QueryParserBase {* characters (? or *), but is not simple prefix term** @return Resulting {@link org.apache.lucene.search.Query} built for the term- * @exception org.apache.lucene.queryParser.ParseException throw in overridden method to disallow+ * @exception org.apache.lucene.queryparser.classic.ParseException throw in overridden method to disallow*/protected Query getWildcardQuery(String field, String termStr) throws ParseException{@@ -960,7 +960,7 @@ public abstract class QueryParserBase {* @param termStr Term token that contains a regular expression** @return Resulting {@link org.apache.lucene.search.Query} built for the term- * @exception org.apache.lucene.queryParser.ParseException throw in overridden method to disallow+ * @exception org.apache.lucene.queryparser.classic.ParseException throw in overridden method to disallow*/protected Query getRegexpQuery(String field, String termStr) throws ParseException{@@ -992,7 +992,7 @@ public abstract class QueryParserBase {* (<b>without</b> trailing '*' character!)** @return Resulting {@link org.apache.lucene.search.Query} built for the term- * @exception org.apache.lucene.queryParser.ParseException throw in overridden method to disallow+ * @exception org.apache.lucene.queryparser.classic.ParseException throw in overridden method to disallow*/protected Query getPrefixQuery(String field, String termStr) throws ParseException{@@ -1014,7 +1014,7 @@ public abstract class QueryParserBase {* @param termStr Term token to use for building term for the query** @return Resulting {@link org.apache.lucene.search.Query} built for the term- * @exception org.apache.lucene.queryParser.ParseException throw in overridden method to disallow+ * @exception org.apache.lucene.queryparser.classic.ParseException throw in overridden method to disallow*/protected Query getFuzzyQuery(String field, String termStr, float minSimilarity) throws ParseException{diff --git a/lucene/src/java/org/apache/lucene/queryParser/QueryParserConstants.java b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserConstants.javasimilarity index 98%rename from lucene/src/java/org/apache/lucene/queryParser/QueryParserConstants.javarename to modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserConstants.javaindex 9e9295eaef5..02a5b5f228b 100644--- a/lucene/src/java/org/apache/lucene/queryParser/QueryParserConstants.java+++ b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserConstants.java@@ -1,5 +1,5 @@/* Generated By:JavaCC: Do not edit this line. QueryParserConstants.java */-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;/**diff --git a/lucene/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserTokenManager.javasimilarity index 99%rename from lucene/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.javarename to modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserTokenManager.javaindex fc5fe57156a..ba278516881 100644--- a/lucene/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java+++ b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserTokenManager.java@@ -1,5 +1,5 @@/* Generated By:JavaCC: Do not edit this line. QueryParserTokenManager.java */-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;import java.io.StringReader;import java.util.ArrayList;import java.util.List;diff --git a/lucene/src/java/org/apache/lucene/queryParser/Token.java b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.javasimilarity index 97%rename from lucene/src/java/org/apache/lucene/queryParser/Token.javarename to modules/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.javaindex 2c665d6ab22..2b47564fcc0 100644--- a/lucene/src/java/org/apache/lucene/queryParser/Token.java+++ b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.java@@ -1,6 +1,6 @@/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 *//* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;/*** Describes the input token stream.@@ -121,4 +121,4 @@ public class Token {}}-/* JavaCC - OriginalChecksum=c147cc166a7cf8812c7c39bc8c5eb868 (do not edit this line) */+/* JavaCC - OriginalChecksum=9f74ef8b727ef4e5dafb84a45b3584c9 (do not edit this line) */diff --git a/lucene/src/java/org/apache/lucene/queryParser/TokenMgrError.java b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.javasimilarity index 97%rename from lucene/src/java/org/apache/lucene/queryParser/TokenMgrError.javarename to modules/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.javaindex b4ffd429b2b..7dad74792a0 100644--- a/lucene/src/java/org/apache/lucene/queryParser/TokenMgrError.java+++ b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.java@@ -1,6 +1,6 @@/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 *//* JavaCCOptions: */-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;/** Token Manager Error. */@SuppressWarnings("serial")@@ -138,4 +138,4 @@ public class TokenMgrError extends Errorthis(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);}}-/* JavaCC - OriginalChecksum=1c94e13236c7e0121e49427992341ee3 (do not edit this line) */+/* JavaCC - OriginalChecksum=b55ad725f5fbc672fa115f498926930c (do not edit this line) */diff --git a/lucene/src/java/org/apache/lucene/queryParser/package.html b/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/package.htmlsimilarity index 100%rename from lucene/src/java/org/apache/lucene/queryParser/package.htmlrename to modules/queryparser/src/java/org/apache/lucene/queryparser/classic/package.htmldiff --git a/modules/queryparser/src/java/overview.html b/modules/queryparser/src/java/overview.htmlnew file mode 100644index 00000000000..40c7086c3b9--- /dev/null+++ b/modules/queryparser/src/java/overview.html@@ -0,0 +1,26 @@+<!--+ Licensed to the Apache Software Foundation (ASF) under one or more+ contributor license agreements. See the NOTICE file distributed with+ this work for additional information regarding copyright ownership.+ The ASF licenses this file to You under the Apache License, Version 2.0+ (the "License"); you may not use this file except in compliance with+ the License. You may obtain a copy of the License at++ http://www.apache.org/licenses/LICENSE-2.0++ Unless required by applicable law or agreed to in writing, software+ distributed under the License is distributed on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ See the License for the specific language governing permissions and+ limitations under the License.+ -->+<html>+ <head>+ <title>+ QueryParsers+ </title>+ </head>+ <body>+ QueryParsers+ </body>+</html>diff --git a/lucene/src/test/org/apache/lucene/queryParser/TestMultiAnalyzer.java b/modules/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiAnalyzer.javasimilarity index 99%rename from lucene/src/test/org/apache/lucene/queryParser/TestMultiAnalyzer.javarename to modules/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiAnalyzer.javaindex 56246fbbc59..468fae50f00 100644--- a/lucene/src/test/org/apache/lucene/queryParser/TestMultiAnalyzer.java+++ b/modules/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiAnalyzer.java@@ -1,4 +1,4 @@-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;/*** Licensed to the Apache Software Foundation (ASF) under one or morediff --git a/lucene/src/test/org/apache/lucene/queryParser/TestMultiFieldQueryParser.java b/modules/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiFieldQueryParser.javasimilarity index 99%rename from lucene/src/test/org/apache/lucene/queryParser/TestMultiFieldQueryParser.javarename to modules/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiFieldQueryParser.javaindex 4611aca906b..a1fd5492654 100644--- a/lucene/src/test/org/apache/lucene/queryParser/TestMultiFieldQueryParser.java+++ b/modules/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiFieldQueryParser.java@@ -1,4 +1,4 @@-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;/*** Licensed to the Apache Software Foundation (ASF) under one or morediff --git a/lucene/src/test/org/apache/lucene/queryParser/TestMultiPhraseQueryParsing.java b/modules/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiPhraseQueryParsing.javasimilarity index 98%rename from lucene/src/test/org/apache/lucene/queryParser/TestMultiPhraseQueryParsing.javarename to modules/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiPhraseQueryParsing.javaindex 12bdbab1dcc..e6b9a15ffa9 100644--- a/lucene/src/test/org/apache/lucene/queryParser/TestMultiPhraseQueryParsing.java+++ b/modules/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiPhraseQueryParsing.java@@ -1,4 +1,4 @@-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;/** Licensed to the Apache Software Foundation (ASF) under one or morediff --git a/lucene/src/test/org/apache/lucene/queryParser/TestQueryParser.java b/modules/queryparser/src/test/org/apache/lucene/queryparser/classic/TestQueryParser.javasimilarity index 99%rename from lucene/src/test/org/apache/lucene/queryParser/TestQueryParser.javarename to modules/queryparser/src/test/org/apache/lucene/queryparser/classic/TestQueryParser.javaindex 715177cacc6..d2c7513bff3 100644--- a/lucene/src/test/org/apache/lucene/queryParser/TestQueryParser.java+++ b/modules/queryparser/src/test/org/apache/lucene/queryparser/classic/TestQueryParser.java@@ -1,4 +1,4 @@-package org.apache.lucene.queryParser;+package org.apache.lucene.queryparser.classic;/*** Licensed to the Apache Software Foundation (ASF) under one or morediff --git a/solr/common-build.xml b/solr/common-build.xmlindex a6e400f8cea..5478079cbb5 100644--- a/solr/common-build.xml+++ b/solr/common-build.xml@@ -89,6 +89,8 @@property="grouping.uptodate" classpath.property="grouping.jar"/><module-uptodate name="queries" jarfile="${common.dir}/../modules/queries/build/lucene-queries-${version}.jar"property="queries.uptodate" classpath.property="queries.jar"/>+ <module-uptodate name="queryparser" jarfile="${common.dir}/../modules/queryparser/build/lucene-queryparser-${version}.jar"+ property="queryparser.uptodate" classpath.property="queryparser.jar"/><contrib-uptodate name="highlighter" property="highlighter.uptodate" classpath.property="highlighter.jar"/><contrib-uptodate name="memory" property="memory.uptodate" classpath.property="memory.jar"/><contrib-uptodate name="misc" property="misc.uptodate" classpath.property="misc.jar"/>@@ -120,6 +122,11 @@<propertyset refid="uptodate.and.compiled.properties"/></ant></target>+ <target name="compile-queryparser" unless="queryparser.uptodate">+ <ant dir="${common.dir}/../modules/queryparser" target="default" inheritAll="false">+ <propertyset refid="uptodate.and.compiled.properties"/>+ </ant>+ </target><target name="compile-highlighter" unless="highlighter.uptodate"><ant dir="${common.dir}/contrib/highlighter" target="default" inheritAll="false"><propertyset refid="uptodate.and.compiled.properties"/>@@ -163,6 +170,7 @@<pathelement path="${suggest.jar}"/><pathelement path="${grouping.jar}"/><pathelement path="${queries.jar}"/>+ <pathelement path="${queryparser.jar}"/><pathelement location="${common-solr.dir}/build/solr-solrj/classes/java"/><pathelement location="${common-solr.dir}/build/solr-core/classes/java"/><path refid="base.classpath"/>@@ -245,7 +253,7 @@<target name="prep-lucene-jars"depends="compile-analyzers-common, compile-analyzers-phonetic, compile-suggest,compile-highlighter, compile-memory, compile-misc, compile-queries-contrib,- compile-spatial, compile-grouping, compile-queries">+ compile-spatial, compile-grouping, compile-queries, compile-queryparser"><ant dir="${common.dir}" target="default" inheritall="false"><propertyset refid="uptodate.and.compiled.properties"/></ant>@@ -260,6 +268,7 @@<fileset file="${grouping.jar}" /><fileset file="${common-module.jar}" /><fileset file="${queries.jar}" />+ <fileset file="${queryparser.jar}" /><fileset file="${highlighter.jar}" /><fileset file="${memory.jar}" /><fileset file="${misc.jar}" />diff --git a/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java b/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.javaindex 216c26305fd..507f3b97bc0 100644--- a/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java@@ -32,7 +32,7 @@ import java.util.regex.Pattern;import org.apache.lucene.document.Document;import org.apache.lucene.index.IndexReader;import org.apache.lucene.index.Term;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.*;import org.apache.lucene.search.similar.MoreLikeThis;import org.apache.solr.common.SolrException;diff --git a/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java b/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.javaindex 3fe4e026906..c5df537b872 100644--- a/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java+++ b/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java@@ -17,6 +17,7 @@package org.apache.solr.handler;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.solr.common.SolrException;import org.apache.solr.common.params.SolrParams;import org.apache.solr.common.util.NamedList;@@ -27,7 +28,6 @@ import org.apache.solr.request.SolrQueryRequest;import org.apache.solr.request.SolrRequestHandler;import org.apache.solr.response.SolrQueryResponse;import org.apache.solr.util.SolrPluginUtils;-import org.apache.lucene.queryParser.ParseException;import java.net.URL;diff --git a/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java b/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.javaindex a398967ccdf..ffe51a81b47 100644--- a/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java+++ b/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java@@ -17,7 +17,7 @@package org.apache.solr.handler.component;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.util.OpenBitSet;import org.apache.solr.common.SolrException;import org.apache.solr.common.params.CommonParams;diff --git a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.javaindex 91b884c7536..84cd42dfa86 100644--- a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java+++ b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java@@ -21,7 +21,7 @@ import org.apache.lucene.document.Field;import org.apache.lucene.index.IndexReader.AtomicReaderContext;import org.apache.lucene.index.IndexReader.ReaderContext;import org.apache.lucene.index.Term;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.*;import org.apache.lucene.util.BytesRef;import org.apache.lucene.util.CharsRef;diff --git a/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java b/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.javaindex 9991152da73..de6349d88c0 100644--- a/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java@@ -17,7 +17,7 @@package org.apache.solr.handler.component;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.solr.common.SolrException;import org.apache.solr.common.params.CommonParams;import org.apache.solr.common.params.ModifiableSolrParams;diff --git a/solr/core/src/java/org/apache/solr/request/SimpleFacets.java b/solr/core/src/java/org/apache/solr/request/SimpleFacets.javaindex 1593d923fe0..7fa02eeb77c 100644--- a/solr/core/src/java/org/apache/solr/request/SimpleFacets.java+++ b/solr/core/src/java/org/apache/solr/request/SimpleFacets.java@@ -18,7 +18,7 @@package org.apache.solr.request;import org.apache.lucene.index.*;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.*;import org.apache.lucene.util.BytesRef;import org.apache.lucene.util.CharsRef;diff --git a/solr/core/src/java/org/apache/solr/schema/IndexSchema.java b/solr/core/src/java/org/apache/solr/schema/IndexSchema.javaindex 4fd106d25e0..ad501ce91e0 100644--- a/solr/core/src/java/org/apache/solr/schema/IndexSchema.java+++ b/solr/core/src/java/org/apache/solr/schema/IndexSchema.java@@ -24,7 +24,6 @@ import org.apache.lucene.search.DefaultSimilarity;import org.apache.lucene.search.IndexSearcher;import org.apache.lucene.search.Similarity;import org.apache.lucene.search.SimilarityProvider;-import org.apache.lucene.queryParser.QueryParser;import org.apache.lucene.util.Version;import org.apache.solr.common.ResourceLoader;import org.apache.solr.common.SolrException;diff --git a/solr/core/src/java/org/apache/solr/search/BoostQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/BoostQParserPlugin.javaindex 1c194c8827f..5acd6b1d798 100755--- a/solr/core/src/java/org/apache/solr/search/BoostQParserPlugin.java+++ b/solr/core/src/java/org/apache/solr/search/BoostQParserPlugin.java@@ -20,7 +20,7 @@ import org.apache.lucene.queries.function.BoostedQuery;import org.apache.lucene.queries.function.FunctionQuery;import org.apache.lucene.queries.function.ValueSource;import org.apache.lucene.queries.function.valuesource.QueryValueSource;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;import org.apache.solr.common.params.SolrParams;import org.apache.solr.common.util.NamedList;diff --git a/solr/core/src/java/org/apache/solr/search/DisMaxQParser.java b/solr/core/src/java/org/apache/solr/search/DisMaxQParser.javaindex 965fe9961de..e64fa18e77d 100644--- a/solr/core/src/java/org/apache/solr/search/DisMaxQParser.java+++ b/solr/core/src/java/org/apache/solr/search/DisMaxQParser.java@@ -16,8 +16,8 @@*/package org.apache.solr.search;-import org.apache.lucene.queryParser.ParseException;-import org.apache.lucene.queryParser.QueryParser.Operator;+import org.apache.lucene.queryparser.classic.ParseException;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.BooleanClause;import org.apache.lucene.search.BooleanQuery;import org.apache.lucene.search.Query;@@ -59,10 +59,10 @@ public class DisMaxQParser extends QParser {*/public static String parseMinShouldMatch(final IndexSchema schema,final SolrParams params) {- Operator op = QueryParsing.getQueryParserDefaultOperator+ QueryParser.Operator op = QueryParsing.getQueryParserDefaultOperator(schema, params.get(QueryParsing.OP));return params.get(DisMaxParams.MM,- op.equals(Operator.AND) ? "100%" : "0%");+ op.equals(QueryParser.Operator.AND) ? "100%" : "0%");}public DisMaxQParser(String qstr, SolrParams localParams, SolrParams params, SolrQueryRequest req) {diff --git a/solr/core/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.javaindex 11139ab3531..28650ae7c04 100755--- a/solr/core/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.java+++ b/solr/core/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.java@@ -27,8 +27,8 @@ import org.apache.lucene.queries.function.FunctionQuery;import org.apache.lucene.queries.function.ValueSource;import org.apache.lucene.queries.function.valuesource.ProductFloatFunction;import org.apache.lucene.queries.function.valuesource.QueryValueSource;-import org.apache.lucene.queryParser.ParseException;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.ParseException;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.*;import org.apache.lucene.analysis.Analyzer;import org.apache.lucene.analysis.TokenStream;diff --git a/solr/core/src/java/org/apache/solr/search/FieldQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/FieldQParserPlugin.javaindex 499086f3ba5..4f01081d7ff 100644--- a/solr/core/src/java/org/apache/solr/search/FieldQParserPlugin.java+++ b/solr/core/src/java/org/apache/solr/search/FieldQParserPlugin.java@@ -16,7 +16,7 @@*/package org.apache.solr.search;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.*;import org.apache.solr.common.params.SolrParams;import org.apache.solr.common.util.NamedList;diff --git a/solr/core/src/java/org/apache/solr/search/FunctionQParser.java b/solr/core/src/java/org/apache/solr/search/FunctionQParser.javaindex d7ef606f23e..58a766be387 100755--- a/solr/core/src/java/org/apache/solr/search/FunctionQParser.java+++ b/solr/core/src/java/org/apache/solr/search/FunctionQParser.java@@ -19,7 +19,7 @@ package org.apache.solr.search;import org.apache.lucene.queries.function.FunctionQuery;import org.apache.lucene.queries.function.ValueSource;import org.apache.lucene.queries.function.valuesource.*;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;import org.apache.solr.common.params.SolrParams;import org.apache.solr.request.SolrQueryRequest;diff --git a/solr/core/src/java/org/apache/solr/search/FunctionRangeQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/FunctionRangeQParserPlugin.javaindex 11be0969613..9abe44b94fb 100755--- a/solr/core/src/java/org/apache/solr/search/FunctionRangeQParserPlugin.java+++ b/solr/core/src/java/org/apache/solr/search/FunctionRangeQParserPlugin.java@@ -22,7 +22,7 @@ import org.apache.lucene.queries.function.FunctionQuery;import org.apache.lucene.queries.function.ValueSource;import org.apache.lucene.queries.function.ValueSourceScorer;import org.apache.lucene.queries.function.valuesource.QueryValueSource;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.*;import org.apache.solr.common.params.SolrParams;import org.apache.solr.common.util.NamedList;diff --git a/solr/core/src/java/org/apache/solr/search/Grouping.java b/solr/core/src/java/org/apache/solr/search/Grouping.javaindex 4ee4c809fb0..8fff90b2a92 100755--- a/solr/core/src/java/org/apache/solr/search/Grouping.java+++ b/solr/core/src/java/org/apache/solr/search/Grouping.java@@ -24,7 +24,7 @@ import org.apache.lucene.queries.function.DocValues;import org.apache.lucene.queries.function.FunctionQuery;import org.apache.lucene.queries.function.ValueSource;import org.apache.lucene.queries.function.valuesource.QueryValueSource;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.*;import org.apache.lucene.search.grouping.*;import org.apache.lucene.util.BytesRef;diff --git a/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.javaindex 61da1b1b9d4..ca71cebe263 100644--- a/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java+++ b/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java@@ -17,7 +17,7 @@package org.apache.solr.search;import org.apache.lucene.index.*;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.*;import org.apache.lucene.util.Bits;import org.apache.lucene.util.BytesRef;diff --git a/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.javaindex b9d61e9ad3a..793af1c7e0c 100755--- a/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java+++ b/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java@@ -16,7 +16,7 @@*/package org.apache.solr.search;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;import org.apache.lucene.search.Sort;import org.apache.solr.common.SolrException;diff --git a/solr/core/src/java/org/apache/solr/search/NestedQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/NestedQParserPlugin.javaindex cb011ec3c41..ad3bf5ce0ef 100755--- a/solr/core/src/java/org/apache/solr/search/NestedQParserPlugin.java+++ b/solr/core/src/java/org/apache/solr/search/NestedQParserPlugin.java@@ -17,7 +17,7 @@package org.apache.solr.search;import org.apache.lucene.queries.function.ValueSource;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;import org.apache.solr.common.params.SolrParams;import org.apache.solr.common.util.NamedList;diff --git a/solr/core/src/java/org/apache/solr/search/PrefixQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/PrefixQParserPlugin.javaindex 8e1858cfc67..6258209b759 100755--- a/solr/core/src/java/org/apache/solr/search/PrefixQParserPlugin.java+++ b/solr/core/src/java/org/apache/solr/search/PrefixQParserPlugin.java@@ -17,7 +17,7 @@package org.apache.solr.search;import org.apache.lucene.index.Term;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.PrefixQuery;import org.apache.lucene.search.Query;import org.apache.solr.common.params.SolrParams;diff --git a/solr/core/src/java/org/apache/solr/search/QParser.java b/solr/core/src/java/org/apache/solr/search/QParser.javaindex 50504648baa..a8b7cf825d8 100755--- a/solr/core/src/java/org/apache/solr/search/QParser.java+++ b/solr/core/src/java/org/apache/solr/search/QParser.java@@ -16,7 +16,7 @@*/package org.apache.solr.search;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;import org.apache.lucene.search.Sort;import org.apache.solr.common.params.CommonParams;diff --git a/solr/core/src/java/org/apache/solr/search/QueryParsing.java b/solr/core/src/java/org/apache/solr/search/QueryParsing.javaindex 4ccfd0ea2b6..44f9adf537c 100644--- a/solr/core/src/java/org/apache/solr/search/QueryParsing.java+++ b/solr/core/src/java/org/apache/solr/search/QueryParsing.java@@ -20,8 +20,8 @@ package org.apache.solr.search;import org.apache.lucene.index.Term;import org.apache.lucene.queries.function.FunctionQuery;import org.apache.lucene.queries.function.valuesource.QueryValueSource;-import org.apache.lucene.queryParser.ParseException;-import org.apache.lucene.queryParser.QueryParser.Operator;+import org.apache.lucene.queryparser.classic.ParseException;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.BooleanClause;import org.apache.lucene.search.BooleanQuery;import org.apache.lucene.search.ConstantScoreQuery;@@ -79,11 +79,11 @@ public class QueryParsing {* @see IndexSchema#getQueryParserDefaultOperator()* @see #OP*/- public static Operator getQueryParserDefaultOperator(final IndexSchema sch,+ public static QueryParser.Operator getQueryParserDefaultOperator(final IndexSchema sch,final String override) {String val = override;if (null == val) val = sch.getQueryParserDefaultOperator();- return "AND".equals(val) ? Operator.AND : Operator.OR;+ return "AND".equals(val) ? QueryParser.Operator.AND : QueryParser.Operator.OR;}diff --git a/solr/core/src/java/org/apache/solr/search/RawQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/RawQParserPlugin.javaindex cbbea8978a1..7c7d894469e 100644--- a/solr/core/src/java/org/apache/solr/search/RawQParserPlugin.java+++ b/solr/core/src/java/org/apache/solr/search/RawQParserPlugin.java@@ -17,7 +17,7 @@package org.apache.solr.search;import org.apache.lucene.index.Term;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;import org.apache.lucene.search.TermQuery;import org.apache.solr.common.params.SolrParams;diff --git a/solr/core/src/java/org/apache/solr/search/ReturnFields.java b/solr/core/src/java/org/apache/solr/search/ReturnFields.javaindex 03aaa4b98c4..eb63a9038ac 100644--- a/solr/core/src/java/org/apache/solr/search/ReturnFields.java+++ b/solr/core/src/java/org/apache/solr/search/ReturnFields.java@@ -22,7 +22,7 @@ import org.apache.commons.io.FilenameUtils;import org.apache.lucene.queries.function.FunctionQuery;import org.apache.lucene.queries.function.ValueSource;import org.apache.lucene.queries.function.valuesource.QueryValueSource;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;import org.apache.solr.common.SolrException;import org.apache.solr.common.params.CommonParams;diff --git a/solr/core/src/java/org/apache/solr/search/SolrQueryParser.java b/solr/core/src/java/org/apache/solr/search/SolrQueryParser.javaindex 80db3314c7d..94c98bc21b4 100644--- a/solr/core/src/java/org/apache/solr/search/SolrQueryParser.java+++ b/solr/core/src/java/org/apache/solr/search/SolrQueryParser.java@@ -22,8 +22,8 @@ import java.util.Map;import java.util.Map.Entry;import org.apache.lucene.index.Term;-import org.apache.lucene.queryParser.ParseException;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.ParseException;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.*;import org.apache.lucene.util.ToStringUtils;import org.apache.lucene.util.Version;diff --git a/solr/core/src/java/org/apache/solr/search/SpatialFilterQParser.java b/solr/core/src/java/org/apache/solr/search/SpatialFilterQParser.javaindex c97a4dc3d5c..05b749e81c2 100644--- a/solr/core/src/java/org/apache/solr/search/SpatialFilterQParser.java+++ b/solr/core/src/java/org/apache/solr/search/SpatialFilterQParser.java@@ -17,7 +17,7 @@ package org.apache.solr.search;*/-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;import org.apache.lucene.spatial.geometry.DistanceUnits;import org.apache.lucene.spatial.DistanceUtils;diff --git a/solr/core/src/java/org/apache/solr/search/TermQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/TermQParserPlugin.javaindex 39ce3d537fa..4670a38ec04 100644--- a/solr/core/src/java/org/apache/solr/search/TermQParserPlugin.java+++ b/solr/core/src/java/org/apache/solr/search/TermQParserPlugin.java@@ -17,7 +17,7 @@package org.apache.solr.search;import org.apache.lucene.index.Term;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;import org.apache.lucene.search.TermQuery;import org.apache.lucene.util.BytesRef;diff --git a/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java b/solr/core/src/java/org/apache/solr/search/ValueSourceParser.javaindex 8999ac8b7dc..a74976401d6 100755--- a/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java+++ b/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java@@ -25,7 +25,7 @@ import org.apache.lucene.queries.function.docvalues.BoolDocValues;import org.apache.lucene.queries.function.docvalues.DoubleDocValues;import org.apache.lucene.queries.function.docvalues.LongDocValues;import org.apache.lucene.queries.function.valuesource.*;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.Query;import org.apache.lucene.search.IndexSearcher;import org.apache.lucene.search.TermQuery;diff --git a/solr/core/src/java/org/apache/solr/search/function/distance/HaversineConstFunction.java b/solr/core/src/java/org/apache/solr/search/function/distance/HaversineConstFunction.javaindex dba15ddeb20..b2aa2758229 100755--- a/solr/core/src/java/org/apache/solr/search/function/distance/HaversineConstFunction.java+++ b/solr/core/src/java/org/apache/solr/search/function/distance/HaversineConstFunction.java@@ -24,7 +24,7 @@ import org.apache.lucene.queries.function.valuesource.ConstNumberSource;import org.apache.lucene.queries.function.valuesource.DoubleConstValueSource;import org.apache.lucene.queries.function.valuesource.MultiValueSource;import org.apache.lucene.queries.function.valuesource.VectorValueSource;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.IndexSearcher;import org.apache.lucene.spatial.DistanceUtils;import org.apache.lucene.spatial.tier.InvalidGeoException;diff --git a/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java b/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.javaindex afe45586c29..d2efaef4314 100644--- a/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java+++ b/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java@@ -23,7 +23,7 @@ package org.apache.solr.update;import org.apache.lucene.index.IndexReader;import org.apache.lucene.index.IndexWriter;import org.apache.lucene.index.Term;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.search.BooleanClause;import org.apache.lucene.search.BooleanQuery;import org.apache.lucene.search.Query;diff --git a/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java b/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.javaindex 80b5892dd97..9cd4ac39f28 100644--- a/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java+++ b/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java@@ -18,8 +18,8 @@package org.apache.solr.util;import org.apache.lucene.document.Document;-import org.apache.lucene.queryParser.ParseException;-import org.apache.lucene.queryParser.QueryParser;+import org.apache.lucene.queryparser.classic.ParseException;+import org.apache.lucene.queryparser.classic.QueryParser;import org.apache.lucene.search.*;import org.apache.lucene.search.BooleanClause.Occur;import org.apache.solr.common.SolrDocument;diff --git a/solr/core/src/test/org/apache/solr/core/DummyValueSourceParser.java b/solr/core/src/test/org/apache/solr/core/DummyValueSourceParser.javaindex 4e714dd79b6..5939e479135 100644--- a/solr/core/src/test/org/apache/solr/core/DummyValueSourceParser.java+++ b/solr/core/src/test/org/apache/solr/core/DummyValueSourceParser.java@@ -19,7 +19,7 @@ package org.apache.solr.core;import org.apache.lucene.queries.function.DocValues;import org.apache.lucene.queries.function.ValueSource;import org.apache.lucene.queries.function.valuesource.SimpleFloatFunction;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.solr.common.util.NamedList;import org.apache.solr.search.FunctionQParser;import org.apache.solr.search.ValueSourceParser;diff --git a/solr/core/src/test/org/apache/solr/core/TestArbitraryIndexDir.java b/solr/core/src/test/org/apache/solr/core/TestArbitraryIndexDir.javaindex 104c5edeedd..12590a7f436 100644--- a/solr/core/src/test/org/apache/solr/core/TestArbitraryIndexDir.java+++ b/solr/core/src/test/org/apache/solr/core/TestArbitraryIndexDir.java@@ -28,7 +28,7 @@ import org.apache.lucene.document.Document;import org.apache.lucene.document.Field;import org.apache.lucene.index.IndexWriter;import org.apache.lucene.index.IndexWriterConfig;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.lucene.store.Directory;import org.apache.lucene.util.Version;import org.apache.solr.common.SolrException;@@ -77,7 +77,7 @@ public class TestArbitraryIndexDir extends AbstractSolrTestCase{}@Test- public void testLoadNewIndexDir() throws IOException, ParserConfigurationException, SAXException, ParseException{+ public void testLoadNewIndexDir() throws IOException, ParserConfigurationException, SAXException, ParseException {//add a doc in original index dirassertU(adoc("id", String.valueOf(1),"name", "name"+String.valueOf(1)));diff --git a/solr/core/src/test/org/apache/solr/search/FooQParserPlugin.java b/solr/core/src/test/org/apache/solr/search/FooQParserPlugin.javaindex b58006fc2a3..36fe30bd551 100755--- a/solr/core/src/test/org/apache/solr/search/FooQParserPlugin.java+++ b/solr/core/src/test/org/apache/solr/search/FooQParserPlugin.java@@ -17,12 +17,12 @@package org.apache.solr.search;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.solr.common.params.SolrParams;import org.apache.solr.common.util.NamedList;import org.apache.solr.request.SolrQueryRequest;import org.apache.lucene.search.Query;import org.apache.lucene.search.TermQuery;-import org.apache.lucene.queryParser.ParseException;import org.apache.lucene.index.Term;diff --git a/solr/core/src/test/org/apache/solr/search/function/NvlValueSourceParser.java b/solr/core/src/test/org/apache/solr/search/function/NvlValueSourceParser.javaindex 726c548a7c6..d17d1b519f4 100755--- a/solr/core/src/test/org/apache/solr/search/function/NvlValueSourceParser.java+++ b/solr/core/src/test/org/apache/solr/search/function/NvlValueSourceParser.java@@ -20,7 +20,7 @@ package org.apache.solr.search.function;import org.apache.lucene.queries.function.DocValues;import org.apache.lucene.queries.function.ValueSource;import org.apache.lucene.queries.function.valuesource.SimpleFloatFunction;-import org.apache.lucene.queryParser.ParseException;+import org.apache.lucene.queryparser.classic.ParseException;import org.apache.solr.common.util.NamedList;import org.apache.solr.search.FunctionQParser;import org.apache.solr.search.ValueSourceParser;