From 993ce74121d049c2a72a9048a45d819777717e55 Mon Sep 17 00:00:00 2001 From: Christopher John Male Date: Sat, 20 Aug 2011 04:57:58 +0000 Subject: [PATCH] LUCENE-3381: Sandboxed remaining contrib queries git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1159846 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/eclipse/dot.classpath | 4 +-- dev-tools/idea/.idea/modules.xml | 2 +- dev-tools/idea/.idea/workspace.xml | 20 +++++------ .../contrib/highlighter/highlighter.iml | 1 - .../sandbox.iml} | 6 ++-- .../idea/lucene/contrib/spatial/spatial.iml | 1 - .../xml-query-parser/xml-query-parser.iml | 2 +- dev-tools/idea/solr/solr.iml | 1 - .../contrib/highlighter/pom.xml.template | 5 --- .../maven/lucene/contrib/pom.xml.template | 2 +- .../{queries => sandbox}/pom.xml.template | 20 ++++------- .../lucene/contrib/spatial/pom.xml.template | 5 --- .../contrib/xml-query-parser/pom.xml.template | 4 +-- dev-tools/maven/solr/core/pom.xml.template | 5 --- lucene/build.xml | 4 +-- lucene/contrib/contrib-build.xml | 22 ++++++------ lucene/contrib/highlighter/build.xml | 3 +- .../search/highlight/HighlighterTest.java | 5 ++- lucene/contrib/queries/README.txt | 23 ------------ lucene/contrib/queries/build.xml | 36 ------------------- lucene/contrib/queries/src/java/overview.html | 26 -------------- lucene/contrib/sandbox/build.xml | 35 ++++++++++++++++++ .../lib/jakarta-regexp-1.4.jar | 0 .../lib/jakarta-regexp-LICENSE-ASL.txt | 0 .../lib/jakarta-regexp-NOTICE.txt | 0 .../sandbox}/queries/DuplicateFilter.java | 2 +- .../sandbox/queries}/FuzzyLikeThisQuery.java | 3 +- .../SlowCollatedStringComparator.java | 4 ++- .../queries}/SlowCollatedTermRangeFilter.java | 3 +- .../queries}/SlowCollatedTermRangeQuery.java | 2 +- .../SlowCollatedTermRangeTermsEnum.java | 3 +- .../regex/JakartaRegexpCapabilities.java | 2 +- .../regex/JavaUtilRegexCapabilities.java | 2 +- .../queries}/regex/RegexCapabilities.java | 2 +- .../sandbox/queries}/regex/RegexQuery.java | 2 +- .../queries}/regex/RegexQueryCapable.java | 2 +- .../queries}/regex/RegexTermsEnum.java | 2 +- .../sandbox/queries}/regex/package.html | 0 lucene/contrib/sandbox/src/java/overview.html | 26 ++++++++++++++ .../sandbox}/queries/DuplicateFilterTest.java | 2 +- .../queries}/FuzzyLikeThisQueryTest.java | 6 +++- .../queries}/TestSlowCollationMethods.java | 3 +- .../regex/TestJakartaRegexpCapabilities.java | 2 +- .../queries}/regex/TestRegexQuery.java | 2 +- .../queries}/regex/TestSpanRegexQuery.java | 2 +- lucene/contrib/spatial/build.xml | 3 +- lucene/contrib/xml-query-parser/build.xml | 4 +-- .../builders/DuplicateFilterBuilder.java | 2 +- .../builders/FuzzyLikeThisQueryBuilder.java | 2 +- solr/common-build.xml | 4 +-- 50 files changed, 138 insertions(+), 181 deletions(-) rename dev-tools/idea/lucene/contrib/{queries/queries-contrib.iml => sandbox/sandbox.iml} (81%) rename dev-tools/maven/lucene/contrib/{queries => sandbox}/pom.xml.template (84%) delete mode 100644 lucene/contrib/queries/README.txt delete mode 100644 lucene/contrib/queries/build.xml delete mode 100644 lucene/contrib/queries/src/java/overview.html create mode 100644 lucene/contrib/sandbox/build.xml rename lucene/contrib/{queries => sandbox}/lib/jakarta-regexp-1.4.jar (100%) rename lucene/contrib/{queries => sandbox}/lib/jakarta-regexp-LICENSE-ASL.txt (100%) rename lucene/contrib/{queries => sandbox}/lib/jakarta-regexp-NOTICE.txt (100%) rename {modules/queries/src/java/org/apache/lucene => lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox}/queries/DuplicateFilter.java (99%) rename lucene/contrib/{queries/src/java/org/apache/lucene/search => sandbox/src/java/org/apache/lucene/sandbox/queries}/FuzzyLikeThisQuery.java (99%) rename lucene/contrib/{queries/src/java/org/apache/lucene/search => sandbox/src/java/org/apache/lucene/sandbox/queries}/SlowCollatedStringComparator.java (96%) rename lucene/contrib/{queries/src/java/org/apache/lucene/search => sandbox/src/java/org/apache/lucene/sandbox/queries}/SlowCollatedTermRangeFilter.java (96%) rename lucene/contrib/{queries/src/java/org/apache/lucene/search => sandbox/src/java/org/apache/lucene/sandbox/queries}/SlowCollatedTermRangeQuery.java (99%) rename lucene/contrib/{queries/src/java/org/apache/lucene/search => sandbox/src/java/org/apache/lucene/sandbox/queries}/SlowCollatedTermRangeTermsEnum.java (97%) rename lucene/contrib/{queries/src/java/org/apache/lucene/search => sandbox/src/java/org/apache/lucene/sandbox/queries}/regex/JakartaRegexpCapabilities.java (99%) rename lucene/contrib/{queries/src/java/org/apache/lucene/search => sandbox/src/java/org/apache/lucene/sandbox/queries}/regex/JavaUtilRegexCapabilities.java (98%) rename lucene/contrib/{queries/src/java/org/apache/lucene/search => sandbox/src/java/org/apache/lucene/sandbox/queries}/regex/RegexCapabilities.java (97%) rename lucene/contrib/{queries/src/java/org/apache/lucene/search => sandbox/src/java/org/apache/lucene/sandbox/queries}/regex/RegexQuery.java (98%) rename lucene/contrib/{queries/src/java/org/apache/lucene/search => sandbox/src/java/org/apache/lucene/sandbox/queries}/regex/RegexQueryCapable.java (95%) rename lucene/contrib/{queries/src/java/org/apache/lucene/search => sandbox/src/java/org/apache/lucene/sandbox/queries}/regex/RegexTermsEnum.java (97%) rename lucene/contrib/{queries/src/java/org/apache/lucene/search => sandbox/src/java/org/apache/lucene/sandbox/queries}/regex/package.html (100%) create mode 100644 lucene/contrib/sandbox/src/java/overview.html rename {modules/queries/src/test/org/apache/lucene => lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox}/queries/DuplicateFilterTest.java (99%) rename lucene/contrib/{queries/src/test/org/apache/lucene/search => sandbox/src/test/org/apache/lucene/sandbox/queries}/FuzzyLikeThisQueryTest.java (96%) rename lucene/contrib/{queries/src/test/org/apache/lucene/search => sandbox/src/test/org/apache/lucene/sandbox/queries}/TestSlowCollationMethods.java (98%) rename lucene/contrib/{queries/src/test/org/apache/lucene/search => sandbox/src/test/org/apache/lucene/sandbox/queries}/regex/TestJakartaRegexpCapabilities.java (97%) rename lucene/contrib/{queries/src/test/org/apache/lucene/search => sandbox/src/test/org/apache/lucene/sandbox/queries}/regex/TestRegexQuery.java (99%) rename lucene/contrib/{queries/src/test/org/apache/lucene/search => sandbox/src/test/org/apache/lucene/sandbox/queries}/regex/TestSpanRegexQuery.java (98%) diff --git a/dev-tools/eclipse/dot.classpath b/dev-tools/eclipse/dot.classpath index 3957ff95b16..0a7a61bd8d5 100644 --- a/dev-tools/eclipse/dot.classpath +++ b/dev-tools/eclipse/dot.classpath @@ -14,8 +14,8 @@ - - + + diff --git a/dev-tools/idea/.idea/modules.xml b/dev-tools/idea/.idea/modules.xml index 44203dcee47..94dcb9871cf 100644 --- a/dev-tools/idea/.idea/modules.xml +++ b/dev-tools/idea/.idea/modules.xml @@ -9,8 +9,8 @@ - + diff --git a/dev-tools/idea/.idea/workspace.xml b/dev-tools/idea/.idea/workspace.xml index 6d1619cd75e..e181d3194ef 100644 --- a/dev-tools/idea/.idea/workspace.xml +++ b/dev-tools/idea/.idea/workspace.xml @@ -127,13 +127,6 @@ - - - - + + + + + diff --git a/dev-tools/idea/lucene/contrib/spatial/spatial.iml b/dev-tools/idea/lucene/contrib/spatial/spatial.iml index 6838f0c0742..cb782655425 100644 --- a/dev-tools/idea/lucene/contrib/spatial/spatial.iml +++ b/dev-tools/idea/lucene/contrib/spatial/spatial.iml @@ -11,7 +11,6 @@ - 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.iml index 8daaab04c25..5e20f9dcc54 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 @@ -11,8 +11,8 @@ - + diff --git a/dev-tools/idea/solr/solr.iml b/dev-tools/idea/solr/solr.iml index 25f67625f43..9ffb7aadf74 100644 --- a/dev-tools/idea/solr/solr.iml +++ b/dev-tools/idea/solr/solr.iml @@ -24,7 +24,6 @@ - diff --git a/dev-tools/maven/lucene/contrib/highlighter/pom.xml.template b/dev-tools/maven/lucene/contrib/highlighter/pom.xml.template index 2fd403be3e3..e4c3e76b284 100644 --- a/dev-tools/maven/lucene/contrib/highlighter/pom.xml.template +++ b/dev-tools/maven/lucene/contrib/highlighter/pom.xml.template @@ -54,11 +54,6 @@ lucene-memory ${project.version} - - ${project.groupId} - lucene-queries-contrib - ${project.version} - junit junit diff --git a/dev-tools/maven/lucene/contrib/pom.xml.template b/dev-tools/maven/lucene/contrib/pom.xml.template index b138041f227..c4e82c7c83d 100644 --- a/dev-tools/maven/lucene/contrib/pom.xml.template +++ b/dev-tools/maven/lucene/contrib/pom.xml.template @@ -36,7 +36,7 @@ instantiated memory misc - queries + sandbox spatial xml-query-parser diff --git a/dev-tools/maven/lucene/contrib/queries/pom.xml.template b/dev-tools/maven/lucene/contrib/sandbox/pom.xml.template similarity index 84% rename from dev-tools/maven/lucene/contrib/queries/pom.xml.template rename to dev-tools/maven/lucene/contrib/sandbox/pom.xml.template index 5901d441050..a490a28903c 100644 --- a/dev-tools/maven/lucene/contrib/queries/pom.xml.template +++ b/dev-tools/maven/lucene/contrib/sandbox/pom.xml.template @@ -9,9 +9,9 @@ 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 @@ -27,15 +27,13 @@ ../../pom.xml org.apache.lucene - lucene-queries-contrib + lucene-sandbox jar - Lucene Queries Contrib - - Queries - various query object exotica not in core - + Lucene Sandbox + Lucene Sandbox - lucene/contrib/queries - ../../build/contrib/queries + lucene/contrib/sandbox + ../../build/contrib/sandbox @@ -49,10 +47,6 @@ ${project.version} test - - jakarta-regexp - jakarta-regexp - junit junit diff --git a/dev-tools/maven/lucene/contrib/spatial/pom.xml.template b/dev-tools/maven/lucene/contrib/spatial/pom.xml.template index 1fd90b44c7d..1b822d7c935 100644 --- a/dev-tools/maven/lucene/contrib/spatial/pom.xml.template +++ b/dev-tools/maven/lucene/contrib/spatial/pom.xml.template @@ -47,11 +47,6 @@ ${project.version} test - - ${project.groupId} - lucene-queries-contrib - ${project.version} - ${project.groupId} lucene-queries 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.template index 7361a1b4f9e..40c64ff69a1 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 @@ -49,12 +49,12 @@ ${project.groupId} - lucene-queries-contrib + lucene-queries ${project.version} ${project.groupId} - lucene-queries + lucene-sandbox ${project.version} diff --git a/dev-tools/maven/solr/core/pom.xml.template b/dev-tools/maven/solr/core/pom.xml.template index 7ef0f03b102..c967e54c1bc 100644 --- a/dev-tools/maven/solr/core/pom.xml.template +++ b/dev-tools/maven/solr/core/pom.xml.template @@ -76,11 +76,6 @@ lucene-misc ${project.version} - - org.apache.lucene - lucene-queries-contrib - ${project.version} - org.apache.lucene lucene-queryparser diff --git a/lucene/build.xml b/lucene/build.xml index 4fec4ec1342..a096d9906a8 100644 --- a/lucene/build.xml +++ b/lucene/build.xml @@ -255,7 +255,7 @@ - + @@ -272,7 +272,7 @@ - + diff --git a/lucene/contrib/contrib-build.xml b/lucene/contrib/contrib-build.xml index 9bc7cb17cc4..83b03fa0fd5 100644 --- a/lucene/contrib/contrib-build.xml +++ b/lucene/contrib/contrib-build.xml @@ -240,17 +240,6 @@ - - - - - - - - - - - @@ -262,6 +251,17 @@ + + + + + + + + + + + diff --git a/lucene/contrib/highlighter/build.xml b/lucene/contrib/highlighter/build.xml index 789d1fff742..935d2076dec 100644 --- a/lucene/contrib/highlighter/build.xml +++ b/lucene/contrib/highlighter/build.xml @@ -27,9 +27,8 @@ - - + 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.java index 85ef9ba790f..09a02146af2 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 @@ -55,7 +55,6 @@ import org.apache.lucene.index.IndexWriterConfig.OpenMode; import org.apache.lucene.search.*; import org.apache.lucene.search.BooleanClause.Occur; 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.store.Directory; import org.apache.lucene.util.BytesRef; @@ -337,7 +336,7 @@ public class HighlighterTest extends BaseTokenStreamTestCase implements Formatte } public void testSpanRegexQuery() throws Exception { - query = new SpanOrQuery(new SpanMultiTermQueryWrapper(new RegexQuery(new Term(FIELD_NAME, "ken.*")))); + query = new SpanOrQuery(new SpanMultiTermQueryWrapper(new RegexpQuery(new Term(FIELD_NAME, "ken.*")))); searcher = new IndexSearcher(ramDir, true); hits = searcher.search(query, 100); int maxNumFragmentsRequired = 2; @@ -361,7 +360,7 @@ public class HighlighterTest extends BaseTokenStreamTestCase implements Formatte } 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); hits = searcher.search(query, 100); int maxNumFragmentsRequired = 2; diff --git a/lucene/contrib/queries/README.txt b/lucene/contrib/queries/README.txt deleted file mode 100644 index 817969f7a37..00000000000 --- a/lucene/contrib/queries/README.txt +++ /dev/null @@ -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 diff --git a/lucene/contrib/queries/build.xml b/lucene/contrib/queries/build.xml deleted file mode 100644 index d5cd287175b..00000000000 --- a/lucene/contrib/queries/build.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - Queries - various query object exotica not in core - - - - - - - - - - diff --git a/lucene/contrib/queries/src/java/overview.html b/lucene/contrib/queries/src/java/overview.html deleted file mode 100644 index 88e166f049a..00000000000 --- a/lucene/contrib/queries/src/java/overview.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - miscellaneous - - - - miscellaneous - - \ No newline at end of file diff --git a/lucene/contrib/sandbox/build.xml b/lucene/contrib/sandbox/build.xml new file mode 100644 index 00000000000..a934ff06635 --- /dev/null +++ b/lucene/contrib/sandbox/build.xml @@ -0,0 +1,35 @@ + + + + + + Sandbox for odd contrib code + + + + + + + + + + + diff --git a/lucene/contrib/queries/lib/jakarta-regexp-1.4.jar b/lucene/contrib/sandbox/lib/jakarta-regexp-1.4.jar similarity index 100% rename from lucene/contrib/queries/lib/jakarta-regexp-1.4.jar rename to lucene/contrib/sandbox/lib/jakarta-regexp-1.4.jar diff --git a/lucene/contrib/queries/lib/jakarta-regexp-LICENSE-ASL.txt b/lucene/contrib/sandbox/lib/jakarta-regexp-LICENSE-ASL.txt similarity index 100% rename from lucene/contrib/queries/lib/jakarta-regexp-LICENSE-ASL.txt rename to lucene/contrib/sandbox/lib/jakarta-regexp-LICENSE-ASL.txt diff --git a/lucene/contrib/queries/lib/jakarta-regexp-NOTICE.txt b/lucene/contrib/sandbox/lib/jakarta-regexp-NOTICE.txt similarity index 100% rename from lucene/contrib/queries/lib/jakarta-regexp-NOTICE.txt rename to lucene/contrib/sandbox/lib/jakarta-regexp-NOTICE.txt diff --git a/modules/queries/src/java/org/apache/lucene/queries/DuplicateFilter.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/DuplicateFilter.java similarity index 99% rename from modules/queries/src/java/org/apache/lucene/queries/DuplicateFilter.java rename to lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/DuplicateFilter.java index 33305ef1073..3704918f77b 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/DuplicateFilter.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/DuplicateFilter.java @@ -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 * contributor license agreements. See the NOTICE file distributed with diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/FuzzyLikeThisQuery.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/FuzzyLikeThisQuery.java similarity index 99% rename from lucene/contrib/queries/src/java/org/apache/lucene/search/FuzzyLikeThisQuery.java rename to lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/FuzzyLikeThisQuery.java index 2a0099b01eb..c6909cd9b99 100644 --- a/lucene/contrib/queries/src/java/org/apache/lucene/search/FuzzyLikeThisQuery.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/FuzzyLikeThisQuery.java @@ -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 @@ -30,6 +30,7 @@ import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.MultiFields; import org.apache.lucene.index.Term; +import org.apache.lucene.search.*; import org.apache.lucene.util.AttributeSource; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.PriorityQueue; diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/SlowCollatedStringComparator.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedStringComparator.java similarity index 96% rename from lucene/contrib/queries/src/java/org/apache/lucene/search/SlowCollatedStringComparator.java rename to lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedStringComparator.java index c6664a57093..5f377b2e6a1 100644 --- a/lucene/contrib/queries/src/java/org/apache/lucene/search/SlowCollatedStringComparator.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedStringComparator.java @@ -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 @@ -21,7 +21,9 @@ import java.io.IOException; import java.text.Collator; 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.FieldComparator; import org.apache.lucene.util.BytesRef; /** Sorts by a field's value using the given Collator diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/SlowCollatedTermRangeFilter.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedTermRangeFilter.java similarity index 96% rename from lucene/contrib/queries/src/java/org/apache/lucene/search/SlowCollatedTermRangeFilter.java rename to lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedTermRangeFilter.java index 2d67d0b1102..2674d98e0b2 100644 --- a/lucene/contrib/queries/src/java/org/apache/lucene/search/SlowCollatedTermRangeFilter.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedTermRangeFilter.java @@ -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 @@ -19,6 +19,7 @@ package org.apache.lucene.search; import java.text.Collator; +import org.apache.lucene.search.MultiTermQueryWrapperFilter; import org.apache.lucene.search.NumericRangeFilter; // javadoc import org.apache.lucene.search.FieldCacheRangeFilter; // javadoc diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/SlowCollatedTermRangeQuery.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedTermRangeQuery.java similarity index 99% rename from lucene/contrib/queries/src/java/org/apache/lucene/search/SlowCollatedTermRangeQuery.java rename to lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedTermRangeQuery.java index 59db72bbe8b..0488e5e0340 100644 --- a/lucene/contrib/queries/src/java/org/apache/lucene/search/SlowCollatedTermRangeQuery.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedTermRangeQuery.java @@ -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 diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/SlowCollatedTermRangeTermsEnum.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedTermRangeTermsEnum.java similarity index 97% rename from lucene/contrib/queries/src/java/org/apache/lucene/search/SlowCollatedTermRangeTermsEnum.java rename to lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedTermRangeTermsEnum.java index accd2cde690..f299ff73290 100644 --- a/lucene/contrib/queries/src/java/org/apache/lucene/search/SlowCollatedTermRangeTermsEnum.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedTermRangeTermsEnum.java @@ -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 @@ -21,6 +21,7 @@ import java.io.IOException; import java.text.Collator; import org.apache.lucene.index.TermsEnum; +import org.apache.lucene.search.FilteredTermsEnum; import org.apache.lucene.util.BytesRef; /** diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/JakartaRegexpCapabilities.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/JakartaRegexpCapabilities.java similarity index 99% rename from lucene/contrib/queries/src/java/org/apache/lucene/search/regex/JakartaRegexpCapabilities.java rename to lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/JakartaRegexpCapabilities.java index a7ee39c093f..d2acb4ef1e4 100644 --- a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/JakartaRegexpCapabilities.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/JakartaRegexpCapabilities.java @@ -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 diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/JavaUtilRegexCapabilities.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/JavaUtilRegexCapabilities.java similarity index 98% rename from lucene/contrib/queries/src/java/org/apache/lucene/search/regex/JavaUtilRegexCapabilities.java rename to lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/JavaUtilRegexCapabilities.java index 2843ef7855f..d0893615dd7 100644 --- a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/JavaUtilRegexCapabilities.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/JavaUtilRegexCapabilities.java @@ -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 diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexCapabilities.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/RegexCapabilities.java similarity index 97% rename from lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexCapabilities.java rename to lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/RegexCapabilities.java index c14053c0db3..9337ae26cef 100644 --- a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexCapabilities.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/RegexCapabilities.java @@ -1,4 +1,4 @@ -package org.apache.lucene.search.regex; +package org.apache.lucene.sandbox.queries.regex; import org.apache.lucene.util.BytesRef; diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexQuery.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/RegexQuery.java similarity index 98% rename from lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexQuery.java rename to lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/RegexQuery.java index 65e1a2f54af..47706941c84 100644 --- a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexQuery.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/RegexQuery.java @@ -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 diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexQueryCapable.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/RegexQueryCapable.java similarity index 95% rename from lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexQueryCapable.java rename to lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/RegexQueryCapable.java index 4d8b3d1766b..efb2ddc2242 100644 --- a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexQueryCapable.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/RegexQueryCapable.java @@ -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 diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexTermsEnum.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/RegexTermsEnum.java similarity index 97% rename from lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexTermsEnum.java rename to lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/RegexTermsEnum.java index 8fb771b8011..e67f94d2269 100644 --- a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexTermsEnum.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/RegexTermsEnum.java @@ -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 diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/package.html b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/package.html similarity index 100% rename from lucene/contrib/queries/src/java/org/apache/lucene/search/regex/package.html rename to lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/regex/package.html diff --git a/lucene/contrib/sandbox/src/java/overview.html b/lucene/contrib/sandbox/src/java/overview.html new file mode 100644 index 00000000000..5b5aac22901 --- /dev/null +++ b/lucene/contrib/sandbox/src/java/overview.html @@ -0,0 +1,26 @@ + + + + + Sandbox + + + + Sandbox + + diff --git a/modules/queries/src/test/org/apache/lucene/queries/DuplicateFilterTest.java b/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/DuplicateFilterTest.java similarity index 99% rename from modules/queries/src/test/org/apache/lucene/queries/DuplicateFilterTest.java rename to lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/DuplicateFilterTest.java index 5e31593371c..07a58fe554c 100644 --- a/modules/queries/src/test/org/apache/lucene/queries/DuplicateFilterTest.java +++ b/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/DuplicateFilterTest.java @@ -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 diff --git a/lucene/contrib/queries/src/test/org/apache/lucene/search/FuzzyLikeThisQueryTest.java b/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/FuzzyLikeThisQueryTest.java similarity index 96% rename from lucene/contrib/queries/src/test/org/apache/lucene/search/FuzzyLikeThisQueryTest.java rename to lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/FuzzyLikeThisQueryTest.java index 9e40cb0e3cf..6b6e5783e0e 100644 --- a/lucene/contrib/queries/src/test/org/apache/lucene/search/FuzzyLikeThisQueryTest.java +++ b/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/FuzzyLikeThisQueryTest.java @@ -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 @@ -24,6 +24,10 @@ import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.RandomIndexWriter; 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.util.LuceneTestCase; diff --git a/lucene/contrib/queries/src/test/org/apache/lucene/search/TestSlowCollationMethods.java b/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/TestSlowCollationMethods.java similarity index 98% rename from lucene/contrib/queries/src/test/org/apache/lucene/search/TestSlowCollationMethods.java rename to lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/TestSlowCollationMethods.java index 529a3b9a190..51c3d215ba6 100644 --- a/lucene/contrib/queries/src/test/org/apache/lucene/search/TestSlowCollationMethods.java +++ b/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/TestSlowCollationMethods.java @@ -1,4 +1,4 @@ -package org.apache.lucene.search; +package org.apache.lucene.sandbox.queries; import java.io.IOException; import java.text.Collator; @@ -8,6 +8,7 @@ import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.RandomIndexWriter; +import org.apache.lucene.search.*; import org.apache.lucene.search.BooleanClause.Occur; import org.apache.lucene.store.Directory; import org.apache.lucene.util.LuceneTestCase; diff --git a/lucene/contrib/queries/src/test/org/apache/lucene/search/regex/TestJakartaRegexpCapabilities.java b/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/regex/TestJakartaRegexpCapabilities.java similarity index 97% rename from lucene/contrib/queries/src/test/org/apache/lucene/search/regex/TestJakartaRegexpCapabilities.java rename to lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/regex/TestJakartaRegexpCapabilities.java index fc3610bda81..0d40c73c960 100644 --- a/lucene/contrib/queries/src/test/org/apache/lucene/search/regex/TestJakartaRegexpCapabilities.java +++ b/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/regex/TestJakartaRegexpCapabilities.java @@ -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 diff --git a/lucene/contrib/queries/src/test/org/apache/lucene/search/regex/TestRegexQuery.java b/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/regex/TestRegexQuery.java similarity index 99% rename from lucene/contrib/queries/src/test/org/apache/lucene/search/regex/TestRegexQuery.java rename to lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/regex/TestRegexQuery.java index 1e7d1559d69..7b25e0486b5 100644 --- a/lucene/contrib/queries/src/test/org/apache/lucene/search/regex/TestRegexQuery.java +++ b/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/regex/TestRegexQuery.java @@ -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 diff --git a/lucene/contrib/queries/src/test/org/apache/lucene/search/regex/TestSpanRegexQuery.java b/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/regex/TestSpanRegexQuery.java similarity index 98% rename from lucene/contrib/queries/src/test/org/apache/lucene/search/regex/TestSpanRegexQuery.java rename to lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/regex/TestSpanRegexQuery.java index ae7ad5f202c..85a7116f7b4 100644 --- a/lucene/contrib/queries/src/test/org/apache/lucene/search/regex/TestSpanRegexQuery.java +++ b/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/regex/TestSpanRegexQuery.java @@ -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 diff --git a/lucene/contrib/spatial/build.xml b/lucene/contrib/spatial/build.xml index 466146d7149..37ca1fa49b1 100644 --- a/lucene/contrib/spatial/build.xml +++ b/lucene/contrib/spatial/build.xml @@ -26,10 +26,9 @@ - - + diff --git a/lucene/contrib/xml-query-parser/build.xml b/lucene/contrib/xml-query-parser/build.xml index c1bea22fb6f..ccd67dbb88b 100644 --- a/lucene/contrib/xml-query-parser/build.xml +++ b/lucene/contrib/xml-query-parser/build.xml @@ -26,11 +26,11 @@ - + - + diff --git a/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/DuplicateFilterBuilder.java b/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/DuplicateFilterBuilder.java index e2442356467..18926821462 100644 --- a/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/DuplicateFilterBuilder.java +++ b/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/DuplicateFilterBuilder.java @@ -3,7 +3,7 @@ */ 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.xmlparser.DOMUtils; import org.apache.lucene.xmlparser.FilterBuilder; diff --git a/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/FuzzyLikeThisQueryBuilder.java b/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/FuzzyLikeThisQueryBuilder.java index 027893ec05c..775b7306061 100644 --- a/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/FuzzyLikeThisQueryBuilder.java +++ b/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/FuzzyLikeThisQueryBuilder.java @@ -1,7 +1,7 @@ package org.apache.lucene.xmlparser.builders; 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.Query; import org.apache.lucene.xmlparser.DOMUtils; diff --git a/solr/common-build.xml b/solr/common-build.xml index 8023c87badd..59d00751a32 100644 --- a/solr/common-build.xml +++ b/solr/common-build.xml @@ -84,7 +84,6 @@ - @@ -171,7 +170,7 @@ + jar-misc, jar-spatial, jar-grouping, jar-queries, jar-queryparser"> @@ -192,7 +191,6 @@ -