LUCENE-3381: Sandboxed remaining contrib queries

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1159846 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Christopher John Male 2011-08-20 04:57:58 +00:00
parent 306b2ef2cc
commit 993ce74121
50 changed files with 138 additions and 181 deletions

View File

@ -14,8 +14,8 @@
<classpathentry kind="src" path="lucene/contrib/memory/src/test"/> <classpathentry kind="src" path="lucene/contrib/memory/src/test"/>
<classpathentry kind="src" path="lucene/contrib/misc/src/java"/> <classpathentry kind="src" path="lucene/contrib/misc/src/java"/>
<classpathentry kind="src" path="lucene/contrib/misc/src/test"/> <classpathentry kind="src" path="lucene/contrib/misc/src/test"/>
<classpathentry kind="src" path="lucene/contrib/queries/src/java"/> <classpathentry kind="src" path="lucene/contrib/sandbox/src/java"/>
<classpathentry kind="src" path="lucene/contrib/queries/src/test"/> <classpathentry kind="src" path="lucene/contrib/sandbox/src/test"/>
<classpathentry kind="src" path="lucene/contrib/spatial/src/java"/> <classpathentry kind="src" path="lucene/contrib/spatial/src/java"/>
<classpathentry kind="src" path="lucene/contrib/spatial/src/test"/> <classpathentry kind="src" path="lucene/contrib/spatial/src/test"/>
<classpathentry kind="src" path="lucene/contrib/xml-query-parser/src/java"/> <classpathentry kind="src" path="lucene/contrib/xml-query-parser/src/java"/>

View File

@ -9,8 +9,8 @@
<module filepath="$PROJECT_DIR$/lucene/contrib/instantiated/instantiated.iml" /> <module filepath="$PROJECT_DIR$/lucene/contrib/instantiated/instantiated.iml" />
<module filepath="$PROJECT_DIR$/lucene/contrib/memory/memory.iml" /> <module filepath="$PROJECT_DIR$/lucene/contrib/memory/memory.iml" />
<module filepath="$PROJECT_DIR$/lucene/contrib/misc/misc.iml" /> <module filepath="$PROJECT_DIR$/lucene/contrib/misc/misc.iml" />
<module filepath="$PROJECT_DIR$/lucene/contrib/queries/queries-contrib.iml" />
<module filepath="$PROJECT_DIR$/lucene/contrib/spatial/spatial.iml" /> <module filepath="$PROJECT_DIR$/lucene/contrib/spatial/spatial.iml" />
<module filepath="$PROJECT_DIR$/lucene/contrib/sandbox/sandbox.iml" />
<module filepath="$PROJECT_DIR$/lucene/contrib/xml-query-parser/xml-query-parser.iml" /> <module filepath="$PROJECT_DIR$/lucene/contrib/xml-query-parser/xml-query-parser.iml" />
<module filepath="$PROJECT_DIR$/modules/analysis/common/analysis-common.iml" /> <module filepath="$PROJECT_DIR$/modules/analysis/common/analysis-common.iml" />
<module filepath="$PROJECT_DIR$/modules/analysis/icu/icu.iml" /> <module filepath="$PROJECT_DIR$/modules/analysis/icu/icu.iml" />

View File

@ -127,13 +127,6 @@
<option name="VM_PARAMETERS" value="-ea -DtempDir=temp" /> <option name="VM_PARAMETERS" value="-ea -DtempDir=temp" />
<option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option> <option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
</configuration> </configuration>
<configuration default="false" name="queries contrib" type="JUnit" factoryName="JUnit">
<module name="queries-contrib" />
<option name="TEST_OBJECT" value="package" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/lucene/build/contrib/queries" />
<option name="VM_PARAMETERS" value="-ea -DtempDir=temp" />
<option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
</configuration>
<configuration default="false" name="queries module" type="JUnit" factoryName="JUnit"> <configuration default="false" name="queries module" type="JUnit" factoryName="JUnit">
<module name="queries" /> <module name="queries" />
<option name="TEST_OBJECT" value="package" /> <option name="TEST_OBJECT" value="package" />
@ -148,6 +141,13 @@
<option name="VM_PARAMETERS" value="-ea -DtempDir=temp" /> <option name="VM_PARAMETERS" value="-ea -DtempDir=temp" />
<option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option> <option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
</configuration> </configuration>
<configuration default="false" name="sandbox contrib" type="JUnit" factoryName="JUnit">
<module name="sandbox" />
<option name="TEST_OBJECT" value="package" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/lucene/build/contrib/sandbox" />
<option name="VM_PARAMETERS" value="-ea -DtempDir=temp" />
<option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
</configuration>
<configuration default="false" name="smartcn analysis module" type="JUnit" factoryName="JUnit"> <configuration default="false" name="smartcn analysis module" type="JUnit" factoryName="JUnit">
<module name="smartcn" /> <module name="smartcn" />
<option name="TEST_OBJECT" value="package" /> <option name="TEST_OBJECT" value="package" />
@ -216,9 +216,9 @@
<item index="15" class="java.lang.String" itemvalue="JUnit.misc contrib" /> <item index="15" class="java.lang.String" itemvalue="JUnit.misc contrib" />
<item index="16" class="java.lang.String" itemvalue="JUnit.morfologik analysis module" /> <item index="16" class="java.lang.String" itemvalue="JUnit.morfologik analysis module" />
<item index="17" class="java.lang.String" itemvalue="JUnit.phonetic analysis module" /> <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="18" class="java.lang.String" itemvalue="JUnit.queries module" />
<item index="19" class="java.lang.String" itemvalue="JUnit.queries module" /> <item index="19" class="java.lang.String" itemvalue="JUnit.queryparser module" />
<item index="20" class="java.lang.String" itemvalue="JUnit.queryparser module" /> <item index="20" class="java.lang.String" itemvalue="JUnit.sandbox contrib" />
<item index="21" class="java.lang.String" itemvalue="JUnit.smartcn analysis module" /> <item index="21" class="java.lang.String" itemvalue="JUnit.smartcn analysis module" />
<item index="22" class="java.lang.String" itemvalue="JUnit.solr" /> <item index="22" class="java.lang.String" itemvalue="JUnit.solr" />
<item index="23" class="java.lang.String" itemvalue="JUnit.spatial contrib" /> <item index="23" class="java.lang.String" itemvalue="JUnit.spatial contrib" />

View File

@ -12,7 +12,6 @@
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="TEST" name="JUnit" level="project" /> <orderEntry type="library" scope="TEST" name="JUnit" level="project" />
<orderEntry type="module" module-name="memory" /> <orderEntry type="module" module-name="memory" />
<orderEntry type="module" module-name="queries-contrib" />
<orderEntry type="module" module-name="misc" /> <orderEntry type="module" module-name="misc" />
<orderEntry type="module" module-name="lucene" /> <orderEntry type="module" module-name="lucene" />
</component> </component>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4"> <module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false"> <component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/../../build/contrib/queries/classes/java" /> <output url="file://$MODULE_DIR$/../../build/contrib/sandbox/classes/java" />
<output-test url="file://$MODULE_DIR$/../../build/contrib/queries/classes/test" /> <output-test url="file://$MODULE_DIR$/../../build/contrib/sandbox/classes/test" />
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
@ -20,7 +20,7 @@
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="library" scope="TEST" name="JUnit" level="project" /> <orderEntry type="library" scope="TEST" name="JUnit" level="project" />
<orderEntry type="module" module-name="misc" />
<orderEntry type="module" module-name="lucene" /> <orderEntry type="module" module-name="lucene" />
</component> </component>
</module> </module>

View File

@ -11,7 +11,6 @@
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="TEST" name="JUnit" level="project" /> <orderEntry type="library" scope="TEST" name="JUnit" level="project" />
<orderEntry type="module" module-name="queries-contrib" />
<orderEntry type="module" module-name="misc" /> <orderEntry type="module" module-name="misc" />
<orderEntry type="module" module-name="lucene" /> <orderEntry type="module" module-name="lucene" />
<orderEntry type="module" module-name="queries" /> <orderEntry type="module" module-name="queries" />

View File

@ -11,8 +11,8 @@
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="TEST" name="JUnit" level="project" /> <orderEntry type="library" scope="TEST" name="JUnit" level="project" />
<orderEntry type="module" module-name="queries-contrib" />
<orderEntry type="module" module-name="misc" /> <orderEntry type="module" module-name="misc" />
<orderEntry type="module" module-name="sandbox" />
<orderEntry type="module" module-name="analysis-common" /> <orderEntry type="module" module-name="analysis-common" />
<orderEntry type="module" module-name="lucene" /> <orderEntry type="module" module-name="lucene" />
<orderEntry type="module" module-name="queryparser" /> <orderEntry type="module" module-name="queryparser" />

View File

@ -24,7 +24,6 @@
<orderEntry type="module" module-name="grouping" /> <orderEntry type="module" module-name="grouping" />
<orderEntry type="module" module-name="highlighter" /> <orderEntry type="module" module-name="highlighter" />
<orderEntry type="module" module-name="icu" /> <orderEntry type="module" module-name="icu" />
<orderEntry type="module" module-name="queries-contrib" />
<orderEntry type="module" module-name="queries" /> <orderEntry type="module" module-name="queries" />
<orderEntry type="module" module-name="misc" /> <orderEntry type="module" module-name="misc" />
<orderEntry type="module" module-name="phonetic" /> <orderEntry type="module" module-name="phonetic" />

View File

@ -54,11 +54,6 @@
<artifactId>lucene-memory</artifactId> <artifactId>lucene-memory</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>lucene-queries-contrib</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>

View File

@ -36,7 +36,7 @@
<module>instantiated</module> <module>instantiated</module>
<module>memory</module> <module>memory</module>
<module>misc</module> <module>misc</module>
<module>queries</module> <module>sandbox</module>
<module>spatial</module> <module>spatial</module>
<module>xml-query-parser</module> <module>xml-query-parser</module>
</modules> </modules>

View File

@ -9,9 +9,9 @@
to you under the Apache License, Version 2.0 (the to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@ -27,15 +27,13 @@
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-queries-contrib</artifactId> <artifactId>lucene-sandbox</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>Lucene Queries Contrib</name> <name>Lucene Sandbox</name>
<description> <description>Lucene Sandbox</description>
Queries - various query object exotica not in core
</description>
<properties> <properties>
<module-directory>lucene/contrib/queries</module-directory> <module-directory>lucene/contrib/sandbox</module-directory>
<build-directory>../../build/contrib/queries</build-directory> <build-directory>../../build/contrib/sandbox</build-directory>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
@ -49,10 +47,6 @@
<version>${project.version}</version> <version>${project.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>jakarta-regexp</groupId>
<artifactId>jakarta-regexp</artifactId>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>

View File

@ -47,11 +47,6 @@
<version>${project.version}</version> <version>${project.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>lucene-queries-contrib</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>lucene-queries</artifactId> <artifactId>lucene-queries</artifactId>

View File

@ -49,12 +49,12 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>lucene-queries-contrib</artifactId> <artifactId>lucene-queries</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>lucene-queries</artifactId> <artifactId>lucene-sandbox</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -76,11 +76,6 @@
<artifactId>lucene-misc</artifactId> <artifactId>lucene-misc</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queries-contrib</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId> <artifactId>lucene-queryparser</artifactId>

View File

@ -255,7 +255,7 @@
<packageset dir="contrib/instantiated/src/java"/> <packageset dir="contrib/instantiated/src/java"/>
<packageset dir="contrib/memory/src/java"/> <packageset dir="contrib/memory/src/java"/>
<packageset dir="contrib/misc/src/java"/> <packageset dir="contrib/misc/src/java"/>
<packageset dir="contrib/queries/src/java"/> <packageset dir="contrib/sandbox/src/java"/>
<packageset dir="contrib/spatial/src/java"/> <packageset dir="contrib/spatial/src/java"/>
<packageset dir="contrib/xml-query-parser/src/java"/> <packageset dir="contrib/xml-query-parser/src/java"/>
<!-- end alpha sort --> <!-- end alpha sort -->
@ -272,7 +272,7 @@
<group title="contrib: Instantiated" packages="org.apache.lucene.store.instantiated*"/> <group title="contrib: Instantiated" packages="org.apache.lucene.store.instantiated*"/>
<group title="contrib: Memory" packages="org.apache.lucene.index.memory*"/> <group title="contrib: Memory" packages="org.apache.lucene.index.memory*"/>
<group title="contrib: Misc " packages="org.apache.lucene.misc*"/> <group title="contrib: Misc " packages="org.apache.lucene.misc*"/>
<group title="contrib: Queries" packages="org.apache.lucene.search.similar*:org.apache.lucene.search.regex*:org.apache.regexp*"/> <group title="contrib: Sandbox" packages="org.apache.lucene.sandbox*"/>
<group title="contrib: Spatial" packages="org.apache.lucene.spatial*"/> <group title="contrib: Spatial" packages="org.apache.lucene.spatial*"/>
<group title="contrib: XML Query Parser" packages="org.apache.lucene.xmlparser*"/> <group title="contrib: XML Query Parser" packages="org.apache.lucene.xmlparser*"/>

View File

@ -240,17 +240,6 @@
<property name="queries.uptodate" value="true"/> <property name="queries.uptodate" value="true"/>
</target> </target>
<property name="queries-contrib.jar" value="${common.dir}/build/contrib/queries-contrib/lucene-queries-contrib-${version}.jar"/>
<target name="check-queries-contrib-uptodate" unless="queries-contrib.uptodate">
<contrib-uptodate name="queries-contrib" jarfile="${queries-contrib.jar}" contrib-src-name="queries" property="queries-contrib.uptodate"/>
</target>
<target name="jar-queries-contrib" unless="queries-contrib.uptodate" depends="check-queries-contrib-uptodate">
<ant dir="${common.dir}/contrib/queries" target="jar-core" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="queries-contrib.uptodate" value="true"/>
</target>
<property name="queryparser.jar" value="${common.dir}/../modules/queryparser/build/lucene-queryparser-${version}.jar"/> <property name="queryparser.jar" value="${common.dir}/../modules/queryparser/build/lucene-queryparser-${version}.jar"/>
<target name="check-queryparser-uptodate" unless="queryparser.uptodate"> <target name="check-queryparser-uptodate" unless="queryparser.uptodate">
<module-uptodate name="queryparser" jarfile="${queryparser.jar}" property="queryparser.uptodate"/> <module-uptodate name="queryparser" jarfile="${queryparser.jar}" property="queryparser.uptodate"/>
@ -262,6 +251,17 @@
<property name="queryparser.uptodate" value="true"/> <property name="queryparser.uptodate" value="true"/>
</target> </target>
<property name="sandbox.jar" value="${common.dir}/build/contrib/sandbox/lucene-sandbox-${version}.jar"/>
<target name="check-sandbox-uptodate" unless="sandbox.uptodate">
<contrib-uptodate name="sandbox" jarfile="${sandbox.jar}" property="sandbox.uptodate"/>
</target>
<target name="jar-sandbox" unless="sandbox.uptodate" depends="check-sandbox-uptodate">
<ant dir="${common.dir}/contrib/sandbox" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="sandbox.uptodate" value="true"/>
</target>
<property name="spatial.jar" value="${common.dir}/build/contrib/spatial/lucene-spatial-${version}.jar"/> <property name="spatial.jar" value="${common.dir}/build/contrib/spatial/lucene-spatial-${version}.jar"/>
<target name="check-spatial-uptodate" unless="spatial.uptodate"> <target name="check-spatial-uptodate" unless="spatial.uptodate">
<contrib-uptodate name="spatial" jarfile="${spatial.jar}" property="spatial.uptodate"/> <contrib-uptodate name="spatial" jarfile="${spatial.jar}" property="spatial.uptodate"/>

View File

@ -27,9 +27,8 @@
<path id="classpath"> <path id="classpath">
<pathelement path="${memory.jar}"/> <pathelement path="${memory.jar}"/>
<pathelement path="${queries-contrib.jar}"/>
<path refid="base.classpath"/> <path refid="base.classpath"/>
</path> </path>
<target name="compile-core" depends="jar-memory, jar-queries-contrib, common.compile-core" /> <target name="compile-core" depends="jar-memory, common.compile-core" />
</project> </project>

View File

@ -55,7 +55,6 @@ import org.apache.lucene.index.IndexWriterConfig.OpenMode;
import org.apache.lucene.search.*; import org.apache.lucene.search.*;
import org.apache.lucene.search.BooleanClause.Occur; import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.highlight.SynonymTokenizer.TestHighlightRunner; import org.apache.lucene.search.highlight.SynonymTokenizer.TestHighlightRunner;
import org.apache.lucene.search.regex.RegexQuery;
import org.apache.lucene.search.spans.*; import org.apache.lucene.search.spans.*;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
@ -337,7 +336,7 @@ public class HighlighterTest extends BaseTokenStreamTestCase implements Formatte
} }
public void testSpanRegexQuery() throws Exception { public void testSpanRegexQuery() throws Exception {
query = new SpanOrQuery(new SpanMultiTermQueryWrapper<RegexQuery>(new RegexQuery(new Term(FIELD_NAME, "ken.*")))); query = new SpanOrQuery(new SpanMultiTermQueryWrapper<RegexpQuery>(new RegexpQuery(new Term(FIELD_NAME, "ken.*"))));
searcher = new IndexSearcher(ramDir, true); searcher = new IndexSearcher(ramDir, true);
hits = searcher.search(query, 100); hits = searcher.search(query, 100);
int maxNumFragmentsRequired = 2; int maxNumFragmentsRequired = 2;
@ -361,7 +360,7 @@ public class HighlighterTest extends BaseTokenStreamTestCase implements Formatte
} }
public void testRegexQuery() throws Exception { public void testRegexQuery() throws Exception {
query = new RegexQuery(new Term(FIELD_NAME, "ken.*")); query = new RegexpQuery(new Term(FIELD_NAME, "ken.*"));
searcher = new IndexSearcher(ramDir, true); searcher = new IndexSearcher(ramDir, true);
hits = searcher.search(query, 100); hits = searcher.search(query, 100);
int maxNumFragmentsRequired = 2; int maxNumFragmentsRequired = 2;

View File

@ -1,23 +0,0 @@
This module contains a number of filter and query objects that add to core lucene.
==== The "MoreLikeThis" class from the "similarity" module has been copied into here.
If people are generally happy with this move then the similarity module can be deleted, or at least a
"Moved to queries module..." note left in its place.
==== FuzzyLikeThis - mixes the behaviour of FuzzyQuery and MoreLikeThis but with special consideration
of fuzzy scoring factors. This generally produces good results for queries where users may provide details in a number of
fields and have no knowledge of boolean query syntax and also want a degree of fuzzy matching. The query is fast because, like
MoreLikeThis, it optimizes the query to only the most distinguishing terms.
==== BoostingQuery - effectively demotes search results that match a given query.
Unlike the "NOT" clause, this still selects documents that contain undesirable terms,
but reduces the overall score of docs containing these terms.
==== TermsFilter - Unlike a RangeFilter this can be used for filtering on multiple terms that are not necessarily in
a sequence. An example might be a collection of primary keys from a database query result or perhaps
a choice of "category" labels picked by the end user.
==== RegexQuery - Implements the regular expression term search query.
Mark Harwood
25/02/2006

View File

@ -1,36 +0,0 @@
<?xml version="1.0"?>
<!--
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="queries-contrib" default="default">
<description>
Queries - various query object exotica not in core
</description>
<path id="additional.dependencies">
<fileset dir="lib" includes="*-oro-*.jar,*-regexp-*.jar"/>
</path>
<pathconvert property="project.classpath"
targetos="unix"
refid="additional.dependencies"
/>
<import file="../contrib-build.xml"/>
</project>

View File

@ -1,26 +0,0 @@
<!--
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>
miscellaneous
</title>
</head>
<body>
miscellaneous
</body>
</html>

View File

@ -0,0 +1,35 @@
<!--
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="sandbox" default="default">
<description>
Sandbox for odd contrib code
</description>
<path id="additional.dependencies">
<fileset dir="lib" includes="*-regexp-*.jar"/>
</path>
<pathconvert property="project.classpath"
targetos="unix"
refid="additional.dependencies"
/>
<import file="../contrib-build.xml"/>
</project>

View File

@ -1,4 +1,4 @@
package org.apache.lucene.queries; package org.apache.lucene.sandbox.queries;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search; package org.apache.lucene.sandbox.queries;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -30,6 +30,7 @@ import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.MultiFields; import org.apache.lucene.index.MultiFields;
import org.apache.lucene.index.Term; import org.apache.lucene.index.Term;
import org.apache.lucene.search.*;
import org.apache.lucene.util.AttributeSource; import org.apache.lucene.util.AttributeSource;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.PriorityQueue; import org.apache.lucene.util.PriorityQueue;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search; package org.apache.lucene.sandbox.queries;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -21,7 +21,9 @@ import java.io.IOException;
import java.text.Collator; import java.text.Collator;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.search.FieldCache;
import org.apache.lucene.search.FieldCache.DocTerms; import org.apache.lucene.search.FieldCache.DocTerms;
import org.apache.lucene.search.FieldComparator;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
/** Sorts by a field's value using the given Collator /** Sorts by a field's value using the given Collator

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search; package org.apache.lucene.sandbox.queries;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -19,6 +19,7 @@ package org.apache.lucene.search;
import java.text.Collator; import java.text.Collator;
import org.apache.lucene.search.MultiTermQueryWrapperFilter;
import org.apache.lucene.search.NumericRangeFilter; // javadoc import org.apache.lucene.search.NumericRangeFilter; // javadoc
import org.apache.lucene.search.FieldCacheRangeFilter; // javadoc import org.apache.lucene.search.FieldCacheRangeFilter; // javadoc

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search; package org.apache.lucene.sandbox.queries;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search; package org.apache.lucene.sandbox.queries;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -21,6 +21,7 @@ import java.io.IOException;
import java.text.Collator; import java.text.Collator;
import org.apache.lucene.index.TermsEnum; import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.search.FilteredTermsEnum;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
/** /**

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search.regex; package org.apache.lucene.sandbox.queries.regex;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search.regex; package org.apache.lucene.sandbox.queries.regex;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search.regex; package org.apache.lucene.sandbox.queries.regex;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search.regex; package org.apache.lucene.sandbox.queries.regex;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search.regex; package org.apache.lucene.sandbox.queries.regex;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search.regex; package org.apache.lucene.sandbox.queries.regex;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -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>
Sandbox
</title>
</head>
<body>
Sandbox
</body>
</html>

View File

@ -1,4 +1,4 @@
package org.apache.lucene.queries; package org.apache.lucene.sandbox.queries;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search; package org.apache.lucene.sandbox.queries;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -24,6 +24,10 @@ import org.apache.lucene.document.Field;
import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.index.Term; import org.apache.lucene.index.Term;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search; package org.apache.lucene.sandbox.queries;
import java.io.IOException; import java.io.IOException;
import java.text.Collator; import java.text.Collator;
@ -8,6 +8,7 @@ import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field; import org.apache.lucene.document.Field;
import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.search.*;
import org.apache.lucene.search.BooleanClause.Occur; import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search.regex; package org.apache.lucene.sandbox.queries.regex;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search.regex; package org.apache.lucene.sandbox.queries.regex;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search.regex; package org.apache.lucene.sandbox.queries.regex;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -26,10 +26,9 @@
<import file="../contrib-build.xml"/> <import file="../contrib-build.xml"/>
<path id="classpath"> <path id="classpath">
<pathelement path="${queries-contrib.jar}"/>
<pathelement path="${queries.jar}"/> <pathelement path="${queries.jar}"/>
<path refid="base.classpath"/> <path refid="base.classpath"/>
</path> </path>
<target name="compile-core" depends="jar-queries-contrib, jar-queries, common.compile-core" /> <target name="compile-core" depends="jar-queries, common.compile-core" />
</project> </project>

View File

@ -26,11 +26,11 @@
<import file="../contrib-build.xml"/> <import file="../contrib-build.xml"/>
<path id="classpath"> <path id="classpath">
<pathelement path="${queries-contrib.jar}"/>
<pathelement path="${queryparser.jar}"/> <pathelement path="${queryparser.jar}"/>
<pathelement path="${queries.jar}"/> <pathelement path="${queries.jar}"/>
<pathelement path="${sandbox.jar}"/>
<path refid="base.classpath"/> <path refid="base.classpath"/>
</path> </path>
<target name="compile-core" depends="jar-queries-contrib,jar-queryparser,jar-queries,common.compile-core" /> <target name="compile-core" depends="jar-sandbox,jar-queryparser,jar-queries,common.compile-core" />
</project> </project>

View File

@ -3,7 +3,7 @@
*/ */
package org.apache.lucene.xmlparser.builders; package org.apache.lucene.xmlparser.builders;
import org.apache.lucene.queries.DuplicateFilter; import org.apache.lucene.sandbox.queries.DuplicateFilter;
import org.apache.lucene.search.Filter; import org.apache.lucene.search.Filter;
import org.apache.lucene.xmlparser.DOMUtils; import org.apache.lucene.xmlparser.DOMUtils;
import org.apache.lucene.xmlparser.FilterBuilder; import org.apache.lucene.xmlparser.FilterBuilder;

View File

@ -1,7 +1,7 @@
package org.apache.lucene.xmlparser.builders; package org.apache.lucene.xmlparser.builders;
import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.search.FuzzyLikeThisQuery; import org.apache.lucene.sandbox.queries.FuzzyLikeThisQuery;
import org.apache.lucene.search.FuzzyQuery; import org.apache.lucene.search.FuzzyQuery;
import org.apache.lucene.search.Query; import org.apache.lucene.search.Query;
import org.apache.lucene.xmlparser.DOMUtils; import org.apache.lucene.xmlparser.DOMUtils;

View File

@ -84,7 +84,6 @@
<pathelement path="${highlighter.jar}"/> <pathelement path="${highlighter.jar}"/>
<pathelement path="${memory.jar}"/> <pathelement path="${memory.jar}"/>
<pathelement path="${misc.jar}"/> <pathelement path="${misc.jar}"/>
<pathelement path="${queries-contrib.jar}"/>
<pathelement path="${spatial.jar}"/> <pathelement path="${spatial.jar}"/>
<pathelement path="${suggest.jar}"/> <pathelement path="${suggest.jar}"/>
<pathelement path="${grouping.jar}"/> <pathelement path="${grouping.jar}"/>
@ -171,7 +170,7 @@
<target name="prep-lucene-jars" <target name="prep-lucene-jars"
depends="jar-lucene-core, jar-analyzers-phonetic, jar-suggest, jar-highlighter, jar-memory, depends="jar-lucene-core, jar-analyzers-phonetic, jar-suggest, jar-highlighter, jar-memory,
jar-misc, jar-queries-contrib, jar-spatial, jar-grouping, jar-queries, jar-queryparser"> jar-misc, jar-spatial, jar-grouping, jar-queries, jar-queryparser">
<property name="solr.deps.compiled" value="true"/> <property name="solr.deps.compiled" value="true"/>
</target> </target>
@ -192,7 +191,6 @@
<fileset file="${highlighter.jar}" /> <fileset file="${highlighter.jar}" />
<fileset file="${memory.jar}" /> <fileset file="${memory.jar}" />
<fileset file="${misc.jar}" /> <fileset file="${misc.jar}" />
<fileset file="${queries-contrib.jar}" />
<fileset file="${spatial.jar}" /> <fileset file="${spatial.jar}" />
</copy> </copy>
</sequential> </sequential>