diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 48aa462e1f9..80225613043 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -6,6 +6,9 @@ http://s.apache.org/luceneversions ======================= Lucene 7.0.0 ======================= (No Changes) +======================= Lucene 6.1.0 ======================= +(No Changes) + ======================= Lucene 6.0.0 ======================= System Requirements @@ -113,6 +116,9 @@ API Changes comparator in ArrayUtil by Java 8's Comparator#naturalOrder(). (Mike McCandless, Uwe Schindler, Robert Muir) +* LUCENE-7060: Update Spatial4j to 0.6. The package com.spatial4j.core + is now org.locationtech.spatial4j. (David Smiley) + Optimizations * LUCENE-6891: Use prefix coding when writing points in diff --git a/lucene/benchmark/conf/spatial.alg b/lucene/benchmark/conf/spatial.alg index 93f10efc774..0ee637f510f 100644 --- a/lucene/benchmark/conf/spatial.alg +++ b/lucene/benchmark/conf/spatial.alg @@ -23,7 +23,7 @@ ### Spatial Context, Grid, Strategy config doc.maker=org.apache.lucene.benchmark.byTask.feeds.SpatialDocMaker # SpatialContext: see SpatialContextFactory.makeSpatialContext -#spatial.spatialContextFactory=com.spatial4j.core.context.jts.JtsSpatialContextFactory +#spatial.spatialContextFactory=org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory #spatial.geo=true #spatial.distCalculator=haversine #spatial.worldBounds=... diff --git a/lucene/benchmark/ivy.xml b/lucene/benchmark/ivy.xml index ec02b6ab4ff..23c208cb3ed 100644 --- a/lucene/benchmark/ivy.xml +++ b/lucene/benchmark/ivy.xml @@ -26,7 +26,7 @@ - + diff --git a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialDocMaker.java b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialDocMaker.java index b7f04d1da3b..b466e964cc9 100644 --- a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialDocMaker.java +++ b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialDocMaker.java @@ -23,10 +23,10 @@ import java.util.Map; import java.util.Random; import java.util.Set; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.context.SpatialContextFactory; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.context.SpatialContextFactory; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.benchmark.byTask.utils.Config; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; diff --git a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialFileQueryMaker.java b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialFileQueryMaker.java index c99de3db071..b6b8f50b10e 100644 --- a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialFileQueryMaker.java +++ b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialFileQueryMaker.java @@ -21,7 +21,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Properties; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.benchmark.byTask.utils.Config; import org.apache.lucene.queries.function.FunctionQuery; import org.apache.lucene.queries.function.ValueSource; @@ -34,7 +34,7 @@ import org.apache.lucene.spatial.query.SpatialOperation; /** * Reads spatial data from the body field docs from an internally created {@link LineDocSource}. - * It's parsed by {@link com.spatial4j.core.context.SpatialContext#readShapeFromWkt(String)} (String)} and then + * It's parsed by {@link org.locationtech.spatial4j.context.SpatialContext#readShapeFromWkt(String)} (String)} and then * further manipulated via a configurable {@link SpatialDocMaker.ShapeConverter}. When using point * data, it's likely you'll want to configure the shape converter so that the query shapes actually * cover a region. The queries are all created and cached in advance. This query maker works in diff --git a/lucene/core/src/java/org/apache/lucene/util/Version.java b/lucene/core/src/java/org/apache/lucene/util/Version.java index 48662e960ab..d8873ccf65f 100644 --- a/lucene/core/src/java/org/apache/lucene/util/Version.java +++ b/lucene/core/src/java/org/apache/lucene/util/Version.java @@ -41,6 +41,13 @@ public final class Version { @Deprecated public static final Version LUCENE_6_0_0 = new Version(6, 0, 0); + /** + * Match settings and bugs in Lucene's 6.1.0 release. + * @deprecated Use latest + */ + @Deprecated + public static final Version LUCENE_6_1_0 = new Version(6, 1, 0); + /** * Match settings and bugs in Lucene's 7.0.0 release. */ diff --git a/lucene/ivy-versions.properties b/lucene/ivy-versions.properties index 2d630a2a6a6..d5ef256337d 100644 --- a/lucene/ivy-versions.properties +++ b/lucene/ivy-versions.properties @@ -41,7 +41,6 @@ com.google.inject.guice.version = 3.0 /com.googlecode.mp4parser/isoparser = 1.0.2 /com.ibm.icu/icu4j = 56.1 /com.pff/java-libpst = 0.8.1 -/com.spatial4j/spatial4j = 0.5 com.sun.jersey.version = 1.9 /com.sun.jersey.contribs/jersey-guice = ${com.sun.jersey.version} @@ -268,6 +267,8 @@ org.kitesdk.kite-morphlines.version = 1.1.0 /org.kitesdk/kite-morphlines-tika-decompress = ${org.kitesdk.kite-morphlines.version} /org.kitesdk/kite-morphlines-twitter = ${org.kitesdk.kite-morphlines.version} +/org.locationtech.spatial4j/spatial4j = 0.6 + /org.mockito/mockito-core = 1.9.5 org.mortbay.jetty.version = 6.1.26 diff --git a/lucene/licenses/spatial4j-0.5-tests.jar.sha1 b/lucene/licenses/spatial4j-0.5-tests.jar.sha1 deleted file mode 100644 index 0c514f8835e..00000000000 --- a/lucene/licenses/spatial4j-0.5-tests.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -bdcdf20a723516a233b5bcc0ca7d4decaa88b6ed diff --git a/lucene/licenses/spatial4j-0.5.jar.sha1 b/lucene/licenses/spatial4j-0.5.jar.sha1 deleted file mode 100644 index c81a76cbe91..00000000000 --- a/lucene/licenses/spatial4j-0.5.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -6e16edaf6b1ba76db7f08c2f3723fce3b358ecc3 diff --git a/lucene/licenses/spatial4j-0.6-tests.jar.sha1 b/lucene/licenses/spatial4j-0.6-tests.jar.sha1 new file mode 100644 index 00000000000..0fd8404f238 --- /dev/null +++ b/lucene/licenses/spatial4j-0.6-tests.jar.sha1 @@ -0,0 +1 @@ +0624ae8b9e43265822e0d79b481e34917fec1eba diff --git a/lucene/licenses/spatial4j-0.6.jar.sha1 b/lucene/licenses/spatial4j-0.6.jar.sha1 new file mode 100644 index 00000000000..56c02ad3016 --- /dev/null +++ b/lucene/licenses/spatial4j-0.6.jar.sha1 @@ -0,0 +1 @@ +21b15310bddcfd8c72611c180f20cf23279809a3 diff --git a/lucene/licenses/spatial4j-NOTICE.txt b/lucene/licenses/spatial4j-NOTICE.txt index d7d48d185c6..779b8df7e91 100644 --- a/lucene/licenses/spatial4j-NOTICE.txt +++ b/lucene/licenses/spatial4j-NOTICE.txt @@ -1,5 +1,133 @@ -Spatial4j -Copyright 2012-2014 The Apache Software Foundation +# about.md file -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). +## About This Content + +May 22, 2015 + +### License + +The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the +Content is provided to you under the terms and conditions of the Apache License, Version 2.0. A copy of the Apache +License, Version 2.0 is available at +[http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) + +If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another +party ("Redistributor") and different terms and conditions may apply to your use of any object code in the Content. +Check the Redistributor’s license that was provided with the Content. If no such license exists, contact the +Redistributor. Unless otherwise indicated below, the terms and conditions of the Apache License, Version 2.0 still apply +to any source code in the Content and such source code may be obtained at +[http://www.eclipse.org](http://www.eclipse.org). + +# notice.md file + +Note: the below Eclipse user agreement is standard. It says "Unless otherwise indicated, "... before referring to the +EPL. We indicate above that all content is licensed under the ASLv2 license. -- David Smiley + +## Eclipse Foundation Software User Agreement + +April 9, 2014 + +### Usage Of Content + +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE +PROJECTS (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR +THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE +THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE +AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT +AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY +NOT USE THE CONTENT. + +### Applicable Licenses + +Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and +conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is provided with this Content and is +also available at [http://www.eclipse.org/legal/epl-v10.html](http://www.eclipse.org/legal/epl-v10.html). For purposes +of the EPL, "Program" will mean the Content. + +Content includes, but is not limited to, source code, object code, documentation and other files maintained in the +Eclipse Foundation source code repository ("Repository") in software modules ("Modules") and made available as +downloadable archives ("Downloads"). + +* Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. + Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features"). +* Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins". +* A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged + as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list + of the names and version numbers of the Plug-ins and/or Fragments associated with that Feature. +* Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may + contain a list of the names and version numbers of Included Features. + +The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). +The terms and conditions governing Features and Included Features should be contained in files named "license.html" +("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module including, but +not limited to the following locations: + +* The top-level (root) directory +* Plug-in and Fragment directories +* Inside Plug-ins and Fragments packaged as JARs +* Sub-directories of the directory named "src" of certain Plug-ins +* Feature directories + +Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined +below), you must agree to a license ("Feature Update License") during the installation process. If the Feature contains +Included Features, the Feature Update License should either provide you with the terms and conditions governing the +Included Features or inform you where you can locate them. Feature Update Licenses may be found in the "license" +property of files named "feature.properties" found within a Feature. Such Abouts, Feature Licenses, and Feature Update +Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the +associated Content in that directory. + +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR +TERMS AND CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO): + +* Eclipse Distribution License Version 1.0 (available at + [http://www.eclipse.org/licenses/edl-v1.0.html](http://www.eclipse.org/licenses/edl-v10.html)) +* Common Public License Version 1.0 (available at + [http://www.eclipse.org/legal/cpl-v10.html](http://www.eclipse.org/legal/cpl-v10.html)) +* Apache Software License 1.1 (available at + [http://www.apache.org/licenses/LICENSE](http://www.apache.org/licenses/LICENSE)) +* Apache Software License 2.0 (available at + [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)) +* Mozilla Public License Version 1.1 (available at + [http://www.mozilla.org/MPL/MPL-1.1.html](http://www.mozilla.org/MPL/MPL-1.1.html)) + +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature +License, or Feature Update License is provided, please contact the Eclipse Foundation to determine what terms and +conditions govern that particular Content. + +### Use of Provisioning Technology + +The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and +the Eclipse Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, +documentation, information and/or other materials (collectively "Installable Software"). This capability is provided +with the intent of allowing such users to install, extend and update Eclipse-based products. Information about packaging +Installable Software is available at +[http://eclipse.org/equinox/p2/repository_packaging.html](http://eclipse.org/equinox/p2/repository_packaging.html) +("Specification"). + +You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for +enabling the applicable license agreements relating to the Installable Software to be presented to, and accepted by, the +users of the Provisioning Technology in accordance with the Specification. By using Provisioning Technology in such a +manner and making it available in accordance with the Specification, you further acknowledge your agreement to, and the +acquisition of all necessary rights to permit the following: + +1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology on a + machine ("Target Machine") with the intent of installing, extending or updating the functionality of an + Eclipse-based product. +2. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion + thereof to be accessed and copied to the Target Machine. +3. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the + Installable Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed + from the Target Machine in accordance with the Specification. Such Installable Software Agreement must inform the + user of the terms and conditions that govern the Installable Software and must solicit acceptance by the end user in + the manner prescribed in such Installable Software Agreement. Upon such indication of agreement by the user, the + provisioning Technology will complete installation of the Installable Software. + +### Cryptography + +Content may contain encryption software. The country in which you are currently may have restrictions on the import, +possession, and use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, +please check the country's laws, regulations and policies concerning the import, possession, or use, and re-export of +encryption software, to see if this is permitted. + +Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, +or both. \ No newline at end of file diff --git a/lucene/spatial-extras/ivy.xml b/lucene/spatial-extras/ivy.xml index 4fef30ec538..448776f0b3a 100644 --- a/lucene/spatial-extras/ivy.xml +++ b/lucene/spatial-extras/ivy.xml @@ -23,9 +23,9 @@ - + - + diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/SpatialStrategy.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/SpatialStrategy.java index f433c111e0c..d980ba9b302 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/SpatialStrategy.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/SpatialStrategy.java @@ -16,10 +16,10 @@ */ package org.apache.lucene.spatial; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.document.Field; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.valuesource.ReciprocalFloatFunction; @@ -100,7 +100,7 @@ public abstract class SpatialStrategy { public abstract Field[] createIndexableFields(Shape shape); /** - * See {@link #makeDistanceValueSource(com.spatial4j.core.shape.Point, double)} called with + * See {@link #makeDistanceValueSource(org.locationtech.spatial4j.shape.Point, double)} called with * a multiplier of 1.0 (i.e. units of degrees). */ public ValueSource makeDistanceValueSource(Point queryPoint) { @@ -127,7 +127,7 @@ public abstract class SpatialStrategy { /** * Returns a ValueSource with values ranging from 1 to 0, depending inversely - * on the distance from {@link #makeDistanceValueSource(com.spatial4j.core.shape.Point,double)}. + * on the distance from {@link #makeDistanceValueSource(org.locationtech.spatial4j.shape.Point,double)}. * The formula is {@code c/(d + c)} where 'd' is the distance and 'c' is * one tenth the distance to the farthest edge from the center. Thus the * scores will be 1 for indexed points at the center of the query shape and as diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxOverlapRatioValueSource.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxOverlapRatioValueSource.java index 9d0afe13dec..101f373c350 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxOverlapRatioValueSource.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxOverlapRatioValueSource.java @@ -21,7 +21,7 @@ import java.util.concurrent.atomic.AtomicReference; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.search.Explanation; -import com.spatial4j.core.shape.Rectangle; +import org.locationtech.spatial4j.shape.Rectangle; /** * The algorithm is implemented as envelope on envelope (rect on rect) overlays rather than diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxSimilarityValueSource.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxSimilarityValueSource.java index 15cd646173d..1d8b4b0c6f9 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxSimilarityValueSource.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxSimilarityValueSource.java @@ -27,12 +27,12 @@ import org.apache.lucene.queries.function.docvalues.DoubleDocValues; import org.apache.lucene.search.Explanation; import org.apache.lucene.search.IndexSearcher; -import com.spatial4j.core.shape.Rectangle; +import org.locationtech.spatial4j.shape.Rectangle; /** * A base class for calculating a spatial relevance rank per document from a provided * {@link ValueSource} in which {@link FunctionValues#objectVal(int)} returns a {@link - * com.spatial4j.core.shape.Rectangle}. + * org.locationtech.spatial4j.shape.Rectangle}. *

* Implementers: remember to implement equals and hashCode if you have * fields! diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java index 9565cbf21e4..5cc6788a63b 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java @@ -16,10 +16,10 @@ */ package org.apache.lucene.spatial.bbox; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.document.LegacyDoubleField; import org.apache.lucene.document.Field; import org.apache.lucene.document.FieldType; @@ -64,7 +64,7 @@ import org.apache.lucene.util.LegacyNumericUtils; * and a boolean to mark a dateline cross. Depending on the particular {@link * SpatialOperation}s, there are a variety of {@link org.apache.lucene.search.LegacyNumericRangeQuery}s to be * done. - * The {@link #makeOverlapRatioValueSource(com.spatial4j.core.shape.Rectangle, double)} + * The {@link #makeOverlapRatioValueSource(org.locationtech.spatial4j.shape.Rectangle, double)} * works by calculating the query bbox overlap percentage against the indexed * shape overlap percentage. The indexed shape's coordinates are retrieved from * {@link org.apache.lucene.index.LeafReader#getNumericDocValues}. diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxValueSource.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxValueSource.java index 5d954074d32..2bfbfd933a3 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxValueSource.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxValueSource.java @@ -16,7 +16,7 @@ */ package org.apache.lucene.spatial.bbox; -import com.spatial4j.core.shape.Rectangle; +import org.locationtech.spatial4j.shape.Rectangle; import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.DocValues; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/CompositeSpatialStrategy.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/CompositeSpatialStrategy.java index 7dc2dfaa05a..de5bb612d41 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/CompositeSpatialStrategy.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/CompositeSpatialStrategy.java @@ -20,8 +20,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.document.Field; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.search.Query; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/IntersectsRPTVerifyQuery.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/IntersectsRPTVerifyQuery.java index a963b6eac6b..f60bfeeaa13 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/IntersectsRPTVerifyQuery.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/IntersectsRPTVerifyQuery.java @@ -19,8 +19,8 @@ package org.apache.lucene.spatial.composite; import java.io.IOException; import java.util.Map; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.queries.function.FunctionValues; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/AbstractPrefixTreeQuery.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/AbstractPrefixTreeQuery.java index 127e6891588..bcf486777ed 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/AbstractPrefixTreeQuery.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/AbstractPrefixTreeQuery.java @@ -18,7 +18,7 @@ package org.apache.lucene.spatial.prefix; import java.io.IOException; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.PostingsEnum; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/AbstractVisitingPrefixTreeQuery.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/AbstractVisitingPrefixTreeQuery.java index 2237ca9dbf0..8ccee99c40c 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/AbstractVisitingPrefixTreeQuery.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/AbstractVisitingPrefixTreeQuery.java @@ -19,8 +19,8 @@ package org.apache.lucene.spatial.prefix; import java.io.IOException; import java.util.Iterator; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.search.DocIdSet; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/ContainsPrefixTreeQuery.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/ContainsPrefixTreeQuery.java index 00463784ebc..b0864f67cd3 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/ContainsPrefixTreeQuery.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/ContainsPrefixTreeQuery.java @@ -19,8 +19,8 @@ package org.apache.lucene.spatial.prefix; import java.io.IOException; import java.util.Arrays; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.PostingsEnum; import org.apache.lucene.index.TermsEnum; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/HeatmapFacetCounter.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/HeatmapFacetCounter.java index c6700cdef59..adee2be9cec 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/HeatmapFacetCounter.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/HeatmapFacetCounter.java @@ -20,11 +20,11 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; import org.apache.lucene.index.IndexReaderContext; import org.apache.lucene.spatial.prefix.tree.Cell; import org.apache.lucene.spatial.prefix.tree.CellIterator; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/IntersectsPrefixTreeQuery.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/IntersectsPrefixTreeQuery.java index ccb0f89ba17..89129a1c3fd 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/IntersectsPrefixTreeQuery.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/IntersectsPrefixTreeQuery.java @@ -18,8 +18,8 @@ package org.apache.lucene.spatial.prefix; import java.io.IOException; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.search.DocIdSet; import org.apache.lucene.spatial.prefix.tree.Cell; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/NumberRangePrefixTreeStrategy.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/NumberRangePrefixTreeStrategy.java index 8001c82afc2..c727c0da075 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/NumberRangePrefixTreeStrategy.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/NumberRangePrefixTreeStrategy.java @@ -23,8 +23,8 @@ import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.index.IndexReaderContext; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.spatial.prefix.tree.Cell; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/PointPrefixTreeFieldCacheProvider.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/PointPrefixTreeFieldCacheProvider.java index 165c4188544..f44ca447409 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/PointPrefixTreeFieldCacheProvider.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/PointPrefixTreeFieldCacheProvider.java @@ -16,7 +16,7 @@ */ package org.apache.lucene.spatial.prefix; -import com.spatial4j.core.shape.Point; +import org.locationtech.spatial4j.shape.Point; import org.apache.lucene.spatial.prefix.tree.Cell; import org.apache.lucene.spatial.prefix.tree.SpatialPrefixTree; import org.apache.lucene.spatial.util.ShapeFieldCacheProvider; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/PrefixTreeFacetCounter.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/PrefixTreeFacetCounter.java index 173c30eb853..b3b82db35c6 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/PrefixTreeFacetCounter.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/PrefixTreeFacetCounter.java @@ -18,7 +18,7 @@ package org.apache.lucene.spatial.prefix; import java.io.IOException; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.index.IndexReaderContext; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.PostingsEnum; @@ -37,9 +37,9 @@ import org.apache.lucene.util.Bits; * of double-counting the document in the facet results. Since each shape is independently turned into grid cells at * a resolution chosen by the shape's size, it's possible they will be indexed at different resolutions. This means * the document could be present in BOTH the postings for a cell in both its prefix and leaf variants. To avoid this, - * use a single valued field with a {@link com.spatial4j.core.shape.ShapeCollection} (or WKT equivalent). Or + * use a single valued field with a {@link org.locationtech.spatial4j.shape.ShapeCollection} (or WKT equivalent). Or * calculate a suitable level/distErr to index both and call - * {@link org.apache.lucene.spatial.prefix.PrefixTreeStrategy#createIndexableFields(com.spatial4j.core.shape.Shape, int)} + * {@link org.apache.lucene.spatial.prefix.PrefixTreeStrategy#createIndexableFields(org.locationtech.spatial4j.shape.Shape, int)} * with the same value for all shapes for a given document/field. * * @lucene.experimental diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java index 608879be4ee..e9f43fd43bd 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java @@ -21,8 +21,8 @@ import java.util.Iterator; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.document.Field; import org.apache.lucene.document.FieldType; import org.apache.lucene.index.IndexOptions; @@ -47,7 +47,7 @@ import org.apache.lucene.util.Bits; *

  • Can index any shape; however only {@link RecursivePrefixTreeStrategy} * can effectively search non-point shapes.
  • *
  • Can index a variable number of shapes per field value. This strategy - * can do it via multiple calls to {@link #createIndexableFields(com.spatial4j.core.shape.Shape)} + * can do it via multiple calls to {@link #createIndexableFields(org.locationtech.spatial4j.shape.Shape)} * for a document or by giving it some sort of Shape aggregate (e.g. JTS * WKT MultiPoint). The shape's boundary is approximated to a grid precision. *
  • @@ -56,7 +56,7 @@ import org.apache.lucene.util.Bits; *
  • Only {@link org.apache.lucene.spatial.query.SpatialOperation#Intersects} * is supported. If only points are indexed then this is effectively equivalent * to IsWithin.
  • - *
  • The strategy supports {@link #makeDistanceValueSource(com.spatial4j.core.shape.Point,double)} + *
  • The strategy supports {@link #makeDistanceValueSource(org.locationtech.spatial4j.shape.Point,double)} * even for multi-valued data, so long as the indexed data is all points; the * behavior is undefined otherwise. However, it will likely be removed in * the future in lieu of using another strategy with a more scalable @@ -93,7 +93,7 @@ public abstract class PrefixTreeStrategy extends SpatialStrategy { } /** - * A memory hint used by {@link #makeDistanceValueSource(com.spatial4j.core.shape.Point)} + * A memory hint used by {@link #makeDistanceValueSource(org.locationtech.spatial4j.shape.Point)} * for how big the initial size of each Document's array should be. The * default is 2. Set this to slightly more than the default expected number * of points per document. diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/RecursivePrefixTreeStrategy.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/RecursivePrefixTreeStrategy.java index 68b04499d9c..d3d16263b9c 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/RecursivePrefixTreeStrategy.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/RecursivePrefixTreeStrategy.java @@ -20,8 +20,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.search.Query; import org.apache.lucene.spatial.prefix.tree.Cell; import org.apache.lucene.spatial.prefix.tree.CellIterator; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/TermQueryPrefixTreeStrategy.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/TermQueryPrefixTreeStrategy.java index a74786bc7e5..0273466aa2b 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/TermQueryPrefixTreeStrategy.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/TermQueryPrefixTreeStrategy.java @@ -19,8 +19,8 @@ package org.apache.lucene.spatial.prefix; import java.util.ArrayList; import java.util.List; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.queries.TermsQuery; import org.apache.lucene.search.Query; import org.apache.lucene.spatial.prefix.tree.Cell; @@ -35,7 +35,7 @@ import org.apache.lucene.util.BytesRefBuilder; /** * A basic implementation of {@link PrefixTreeStrategy} using a large * {@link TermsQuery} of all the cells from - * {@link SpatialPrefixTree#getTreeCellIterator(com.spatial4j.core.shape.Shape, int)}. + * {@link SpatialPrefixTree#getTreeCellIterator(org.locationtech.spatial4j.shape.Shape, int)}. * It only supports the search of indexed Point shapes. *

    * The precision of query shapes (distErrPct) is an important factor in using diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/WithinPrefixTreeQuery.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/WithinPrefixTreeQuery.java index cf0d11bd054..f595f0e4639 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/WithinPrefixTreeQuery.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/WithinPrefixTreeQuery.java @@ -18,13 +18,13 @@ package org.apache.lucene.spatial.prefix; import java.io.IOException; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.shape.Circle; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.shape.Circle; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.search.DocIdSet; import org.apache.lucene.spatial.prefix.tree.Cell; @@ -58,7 +58,7 @@ public class WithinPrefixTreeQuery extends AbstractVisitingPrefixTreeQuery { private final Shape bufferedQueryShape;//if null then the whole world /** - * See {@link AbstractVisitingPrefixTreeQuery#AbstractVisitingPrefixTreeQuery(com.spatial4j.core.shape.Shape, String, org.apache.lucene.spatial.prefix.tree.SpatialPrefixTree, int, int)}. + * See {@link AbstractVisitingPrefixTreeQuery#AbstractVisitingPrefixTreeQuery(org.locationtech.spatial4j.shape.Shape, String, org.apache.lucene.spatial.prefix.tree.SpatialPrefixTree, int, int)}. * {@code queryBuffer} is the (minimum) distance beyond the query shape edge * where non-matching documents are looked for so they can be excluded. If * -1 is used then the whole world is examined (a good default for correctness). diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/Cell.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/Cell.java index fe3846d1605..f4bc45856e7 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/Cell.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/Cell.java @@ -16,14 +16,14 @@ */ package org.apache.lucene.spatial.prefix.tree; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; import org.apache.lucene.util.BytesRef; /** * Represents a grid cell. Cell instances are generally very transient and may be re-used * internally. To get an instance, you could start with {@link SpatialPrefixTree#getWorldCell()}. - * And from there you could either traverse down the tree with {@link #getNextLevelCells(com.spatial4j.core.shape.Shape)}, + * And from there you could either traverse down the tree with {@link #getNextLevelCells(org.locationtech.spatial4j.shape.Shape)}, * or you could read an indexed term via {@link SpatialPrefixTree#readCell(org.apache.lucene.util.BytesRef,Cell)}. * When a cell is read from a term, it is comprised of just the base bytes plus optionally a leaf flag. * diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/DateRangePrefixTree.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/DateRangePrefixTree.java index 13281f3134f..afdde71c0a7 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/DateRangePrefixTree.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/DateRangePrefixTree.java @@ -24,7 +24,7 @@ import java.util.GregorianCalendar; import java.util.Locale; import java.util.TimeZone; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Shape; /** * A PrefixTree for date ranges in which the levels of the tree occur at natural periods of time (e.g. years, diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/FilterCellIterator.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/FilterCellIterator.java index e4f50e05d67..ef170071876 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/FilterCellIterator.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/FilterCellIterator.java @@ -16,8 +16,8 @@ */ package org.apache.lucene.spatial.prefix.tree; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; import java.util.Iterator; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/GeohashPrefixTree.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/GeohashPrefixTree.java index fa4e98745ec..237d26a5f9f 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/GeohashPrefixTree.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/GeohashPrefixTree.java @@ -20,11 +20,11 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.io.GeohashUtils; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.io.GeohashUtils; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.util.BytesRef; /** diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/LegacyCell.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/LegacyCell.java index 27c56a76395..d978d3c8481 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/LegacyCell.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/LegacyCell.java @@ -18,9 +18,9 @@ package org.apache.lucene.spatial.prefix.tree; import java.util.Collection; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.StringHelper; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/LegacyPrefixTree.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/LegacyPrefixTree.java index 672c2fe04c7..1a3afcc8740 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/LegacyPrefixTree.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/LegacyPrefixTree.java @@ -18,10 +18,10 @@ package org.apache.lucene.spatial.prefix.tree; import java.util.Arrays; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.util.BytesRef; /** The base for the original two SPT's: Geohash and Quad. Don't subclass this for new SPTs. diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/NumberRangePrefixTree.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/NumberRangePrefixTree.java index 40e80bcc7d7..72b689bc018 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/NumberRangePrefixTree.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/NumberRangePrefixTree.java @@ -18,13 +18,13 @@ package org.apache.lucene.spatial.prefix.tree; import java.text.ParseException; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.context.SpatialContextFactory; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; -import com.spatial4j.core.shape.impl.RectangleImpl; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.context.SpatialContextFactory; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; +import org.locationtech.spatial4j.shape.impl.RectangleImpl; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.StringHelper; @@ -47,7 +47,7 @@ import org.apache.lucene.util.StringHelper; * * * Unlike "normal" spatial components in this module, this special-purpose one only works with {@link Shape}s - * created by the methods on this class, not from any {@link com.spatial4j.core.context.SpatialContext}. + * created by the methods on this class, not from any {@link org.locationtech.spatial4j.context.SpatialContext}. * * @see org.apache.lucene.spatial.prefix.NumberRangePrefixTreeStrategy * @see LUCENE-5648 diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/PackedQuadPrefixTree.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/PackedQuadPrefixTree.java index 6fe2bffea6f..b86a6d116ff 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/PackedQuadPrefixTree.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/PackedQuadPrefixTree.java @@ -21,12 +21,12 @@ import java.util.Collection; import java.util.List; import java.util.NoSuchElementException; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; -import com.spatial4j.core.shape.impl.RectangleImpl; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; +import org.locationtech.spatial4j.shape.impl.RectangleImpl; import org.apache.lucene.util.BytesRef; /** diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/QuadPrefixTree.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/QuadPrefixTree.java index 48dac871423..3242e7e623f 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/QuadPrefixTree.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/QuadPrefixTree.java @@ -24,11 +24,11 @@ import java.util.Collection; import java.util.List; import java.util.Locale; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; import org.apache.lucene.util.BytesRef; /** diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTree.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTree.java index 8ead954d66c..ae2fe83d20e 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTree.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTree.java @@ -16,8 +16,8 @@ */ package org.apache.lucene.spatial.prefix.tree; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.util.BytesRef; /** diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeFactory.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeFactory.java index b74dc93bded..67480d52ff8 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeFactory.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeFactory.java @@ -18,8 +18,8 @@ package org.apache.lucene.spatial.prefix.tree; import java.util.Map; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.distance.DistanceUtils; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.distance.DistanceUtils; /** * Abstract Factory for creating {@link SpatialPrefixTree} instances with useful diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/TreeCellIterator.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/TreeCellIterator.java index 3ec56aca3b8..39c8068d8f9 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/TreeCellIterator.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/TreeCellIterator.java @@ -16,8 +16,8 @@ */ package org.apache.lucene.spatial.prefix.tree; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Shape; /** * Navigates a {@link org.apache.lucene.spatial.prefix.tree.SpatialPrefixTree} from a given cell (typically the world diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialArgs.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialArgs.java index 0503072cd28..37a5503e16a 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialArgs.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialArgs.java @@ -16,10 +16,10 @@ */ package org.apache.lucene.spatial.query; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; /** * Principally holds the query {@link Shape} and the {@link SpatialOperation}. @@ -120,8 +120,8 @@ public class SpatialArgs { * inflates the size of the shape but should not shrink it. * * @return 0 to 0.5 - * @see #calcDistanceFromErrPct(com.spatial4j.core.shape.Shape, double, - * com.spatial4j.core.context.SpatialContext) + * @see #calcDistanceFromErrPct(org.locationtech.spatial4j.shape.Shape, double, + * org.locationtech.spatial4j.context.SpatialContext) */ public Double getDistErrPct() { return distErrPct; diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialArgsParser.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialArgsParser.java index 81612fff585..79ad7a94803 100644 --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialArgsParser.java +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialArgsParser.java @@ -16,9 +16,9 @@ */ package org.apache.lucene.spatial.query; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.exception.InvalidShapeException; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.exception.InvalidShapeException; +import org.locationtech.spatial4j.shape.Shape; import java.text.ParseException; import java.util.HashMap; @@ -29,8 +29,8 @@ import java.util.StringTokenizer; /** * Parses a string that usually looks like "OPERATION(SHAPE)" into a {@link SpatialArgs} * object. The set of operations supported are defined in {@link SpatialOperation}, such - * as "Intersects" being a common one. The shape portion is defined by WKT {@link com.spatial4j.core.io.WktShapeParser}, - * but it can be overridden/customized via {@link #parseShape(String, com.spatial4j.core.context.SpatialContext)}. + * as "Intersects" being a common one. The shape portion is defined by WKT {@link org.locationtech.spatial4j.io.WktShapeParser}, + * but it can be overridden/customized via {@link #parseShape(String, org.locationtech.spatial4j.context.SpatialContext)}. * There are some optional name-value pair parameters that follow the closing parenthesis. Example: *

      *   Intersects(ENVELOPE(-10,-8,22,20)) distErrPct=0.025
    diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialOperation.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialOperation.java
    index 7d750ac6ff9..1eeb4bc08d3 100644
    --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialOperation.java
    +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialOperation.java
    @@ -16,9 +16,9 @@
      */
     package org.apache.lucene.spatial.query;
     
    -import com.spatial4j.core.shape.Rectangle;
    -import com.spatial4j.core.shape.Shape;
    -import com.spatial4j.core.shape.SpatialRelation;
    +import org.locationtech.spatial4j.shape.Rectangle;
    +import org.locationtech.spatial4j.shape.Shape;
    +import org.locationtech.spatial4j.shape.SpatialRelation;
     
     import java.io.Serializable;
     import java.util.ArrayList;
    @@ -30,7 +30,7 @@ import java.util.Map;
     /**
      * A predicate that compares a stored geometry to a supplied geometry. It's enum-like. For more
      * explanation of each predicate, consider looking at the source implementation
    - * of {@link #evaluate(com.spatial4j.core.shape.Shape, com.spatial4j.core.shape.Shape)}. It's important
    + * of {@link #evaluate(org.locationtech.spatial4j.shape.Shape, org.locationtech.spatial4j.shape.Shape)}. It's important
      * to be aware that Lucene-spatial makes no distinction of shape boundaries, unlike many standardized
      * definitions. Nor does it make dimensional distinctions (e.g. line vs polygon).
      * You can lookup a predicate by "Covers" or "Contains", for example, and you will get the
    diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java
    index a6c575bc3f5..cf2c329205e 100644
    --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java
    +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java
    @@ -24,10 +24,10 @@ import java.io.FilterOutputStream;
     import java.io.IOException;
     import java.util.Map;
     
    -import com.spatial4j.core.context.SpatialContext;
    -import com.spatial4j.core.io.BinaryCodec;
    -import com.spatial4j.core.shape.Point;
    -import com.spatial4j.core.shape.Shape;
    +import org.locationtech.spatial4j.context.SpatialContext;
    +import org.locationtech.spatial4j.io.BinaryCodec;
    +import org.locationtech.spatial4j.shape.Point;
    +import org.locationtech.spatial4j.shape.Shape;
     import org.apache.lucene.document.BinaryDocValuesField;
     import org.apache.lucene.document.Field;
     import org.apache.lucene.index.BinaryDocValues;
    @@ -55,7 +55,7 @@ import org.apache.lucene.util.BytesRefBuilder;
      * SpatialStrategy that is approximated (like {@link org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy})
      * to add precision or eventually make more specific / advanced calculations on the per-document
      * geometry.
    - * The serialization uses Spatial4j's {@link com.spatial4j.core.io.BinaryCodec}.
    + * The serialization uses Spatial4j's {@link org.locationtech.spatial4j.io.BinaryCodec}.
      *
      * @lucene.experimental
      */
    diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/spatial4j/Geo3dShape.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/spatial4j/Geo3dShape.java
    index 7a3078a0bef..518fb32b4f1 100644
    --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/spatial4j/Geo3dShape.java
    +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/spatial4j/Geo3dShape.java
    @@ -16,13 +16,13 @@
      */
     package org.apache.lucene.spatial.spatial4j;
     
    -import com.spatial4j.core.context.SpatialContext;
    -import com.spatial4j.core.distance.DistanceUtils;
    -import com.spatial4j.core.shape.Point;
    -import com.spatial4j.core.shape.Rectangle;
    -import com.spatial4j.core.shape.Shape;
    -import com.spatial4j.core.shape.SpatialRelation;
    -import com.spatial4j.core.shape.impl.RectangleImpl;
    +import org.locationtech.spatial4j.context.SpatialContext;
    +import org.locationtech.spatial4j.distance.DistanceUtils;
    +import org.locationtech.spatial4j.shape.Point;
    +import org.locationtech.spatial4j.shape.Rectangle;
    +import org.locationtech.spatial4j.shape.Shape;
    +import org.locationtech.spatial4j.shape.SpatialRelation;
    +import org.locationtech.spatial4j.shape.impl.RectangleImpl;
     import org.apache.lucene.geo3d.LatLonBounds;
     import org.apache.lucene.geo3d.GeoArea;
     import org.apache.lucene.geo3d.GeoAreaFactory;
    diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/DistanceToShapeValueSource.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/DistanceToShapeValueSource.java
    index 57cad87f97b..7be24337d86 100644
    --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/DistanceToShapeValueSource.java
    +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/DistanceToShapeValueSource.java
    @@ -29,15 +29,15 @@ import org.apache.lucene.queries.function.docvalues.DoubleDocValues;
     import org.apache.lucene.search.Explanation;
     import org.apache.lucene.search.IndexSearcher;
     
    -import com.spatial4j.core.context.SpatialContext;
    -import com.spatial4j.core.distance.DistanceCalculator;
    -import com.spatial4j.core.shape.Point;
    -import com.spatial4j.core.shape.Shape;
    +import org.locationtech.spatial4j.context.SpatialContext;
    +import org.locationtech.spatial4j.distance.DistanceCalculator;
    +import org.locationtech.spatial4j.shape.Point;
    +import org.locationtech.spatial4j.shape.Shape;
     
     /**
      * The distance from a provided Point to a Point retrieved from a ValueSource via
      * {@link org.apache.lucene.queries.function.FunctionValues#objectVal(int)}. The distance
    - * is calculated via a {@link com.spatial4j.core.distance.DistanceCalculator}.
    + * is calculated via a {@link org.locationtech.spatial4j.distance.DistanceCalculator}.
      *
      * @lucene.experimental
      */
    diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeAreaValueSource.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeAreaValueSource.java
    index dd391d1fc96..257dc6778d2 100644
    --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeAreaValueSource.java
    +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeAreaValueSource.java
    @@ -22,8 +22,8 @@ import java.util.Arrays;
     import java.util.List;
     import java.util.Map;
     
    -import com.spatial4j.core.context.SpatialContext;
    -import com.spatial4j.core.shape.Shape;
    +import org.locationtech.spatial4j.context.SpatialContext;
    +import org.locationtech.spatial4j.shape.Shape;
     
     import org.apache.lucene.index.LeafReaderContext;
     import org.apache.lucene.queries.function.FunctionValues;
    @@ -36,7 +36,7 @@ import org.apache.lucene.search.IndexSearcher;
      * The area of a Shape retrieved from a ValueSource via
      * {@link org.apache.lucene.queries.function.FunctionValues#objectVal(int)}.
      *
    - * @see Shape#getArea(com.spatial4j.core.context.SpatialContext)
    + * @see Shape#getArea(org.locationtech.spatial4j.context.SpatialContext)
      *
      * @lucene.experimental
      */
    diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeFieldCache.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeFieldCache.java
    index 480369bcd82..e24cd683210 100644
    --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeFieldCache.java
    +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeFieldCache.java
    @@ -16,7 +16,7 @@
      */
     package org.apache.lucene.spatial.util;
     
    -import com.spatial4j.core.shape.Shape;
    +import org.locationtech.spatial4j.shape.Shape;
     
     import java.util.ArrayList;
     import java.util.List;
    diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeFieldCacheDistanceValueSource.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeFieldCacheDistanceValueSource.java
    index e4cb1463672..1ac84e8785c 100644
    --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeFieldCacheDistanceValueSource.java
    +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeFieldCacheDistanceValueSource.java
    @@ -16,9 +16,9 @@
      */
     package org.apache.lucene.spatial.util;
     
    -import com.spatial4j.core.context.SpatialContext;
    -import com.spatial4j.core.distance.DistanceCalculator;
    -import com.spatial4j.core.shape.Point;
    +import org.locationtech.spatial4j.context.SpatialContext;
    +import org.locationtech.spatial4j.distance.DistanceCalculator;
    +import org.locationtech.spatial4j.shape.Point;
     import org.apache.lucene.index.LeafReaderContext;
     import org.apache.lucene.queries.function.FunctionValues;
     import org.apache.lucene.queries.function.ValueSource;
    diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeFieldCacheProvider.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeFieldCacheProvider.java
    index 04c52f79a67..bca73ccf4dc 100644
    --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeFieldCacheProvider.java
    +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapeFieldCacheProvider.java
    @@ -16,7 +16,7 @@
      */
     package org.apache.lucene.spatial.util;
     
    -import com.spatial4j.core.shape.Shape;
    +import org.locationtech.spatial4j.shape.Shape;
     import org.apache.lucene.index.*;
     import org.apache.lucene.search.DocIdSetIterator;
     import org.apache.lucene.util.BytesRef;
    diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapePredicateValueSource.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapePredicateValueSource.java
    index b1dfaaaf569..08c1e43fbcc 100644
    --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapePredicateValueSource.java
    +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/util/ShapePredicateValueSource.java
    @@ -16,7 +16,7 @@
      */
     package org.apache.lucene.spatial.util;
     
    -import com.spatial4j.core.shape.Shape;
    +import org.locationtech.spatial4j.shape.Shape;
     
     import org.apache.lucene.index.LeafReaderContext;
     import org.apache.lucene.queries.function.FunctionValues;
    diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/vector/DistanceValueSource.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/vector/DistanceValueSource.java
    index d31fd594466..7cab3fe0a07 100644
    --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/vector/DistanceValueSource.java
    +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/vector/DistanceValueSource.java
    @@ -16,8 +16,8 @@
      */
     package org.apache.lucene.spatial.vector;
     
    -import com.spatial4j.core.distance.DistanceCalculator;
    -import com.spatial4j.core.shape.Point;
    +import org.locationtech.spatial4j.distance.DistanceCalculator;
    +import org.locationtech.spatial4j.shape.Point;
     import org.apache.lucene.index.LeafReader;
     import org.apache.lucene.index.LeafReaderContext;
     import org.apache.lucene.index.DocValues;
    diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/vector/PointVectorStrategy.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/vector/PointVectorStrategy.java
    index f572f82f3ca..f5f5f34121f 100644
    --- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/vector/PointVectorStrategy.java
    +++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/vector/PointVectorStrategy.java
    @@ -16,11 +16,11 @@
      */
     package org.apache.lucene.spatial.vector;
     
    -import com.spatial4j.core.context.SpatialContext;
    -import com.spatial4j.core.shape.Circle;
    -import com.spatial4j.core.shape.Point;
    -import com.spatial4j.core.shape.Rectangle;
    -import com.spatial4j.core.shape.Shape;
    +import org.locationtech.spatial4j.context.SpatialContext;
    +import org.locationtech.spatial4j.shape.Circle;
    +import org.locationtech.spatial4j.shape.Point;
    +import org.locationtech.spatial4j.shape.Rectangle;
    +import org.locationtech.spatial4j.shape.Shape;
     import org.apache.lucene.document.LegacyDoubleField;
     import org.apache.lucene.document.Field;
     import org.apache.lucene.document.FieldType;
    @@ -50,7 +50,7 @@ import org.apache.lucene.spatial.query.UnsupportedSpatialOperation;
      * org.apache.lucene.spatial.query.SpatialOperation#Intersects} and {@link
      * SpatialOperation#IsWithin} is supported.
  • *
  • Uses the FieldCache for - * {@link #makeDistanceValueSource(com.spatial4j.core.shape.Point)} and for + * {@link #makeDistanceValueSource(org.locationtech.spatial4j.shape.Point)} and for * searching with a Circle.
  • * * @@ -60,7 +60,7 @@ import org.apache.lucene.spatial.query.UnsupportedSpatialOperation; * This is a simple Strategy. Search works with {@link org.apache.lucene.search.LegacyNumericRangeQuery}s on * an x and y pair of fields. A Circle query does the same bbox query but adds a * ValueSource filter on - * {@link #makeDistanceValueSource(com.spatial4j.core.shape.Point)}. + * {@link #makeDistanceValueSource(org.locationtech.spatial4j.shape.Point)}. *

    * One performance shortcoming with this strategy is that a scenario involving * both a search using a Circle and sort will result in calculations for the @@ -106,7 +106,7 @@ public class PointVectorStrategy extends SpatialStrategy { throw new UnsupportedOperationException("Can only index Point, not " + shape); } - /** @see #createIndexableFields(com.spatial4j.core.shape.Shape) */ + /** @see #createIndexableFields(org.locationtech.spatial4j.shape.Shape) */ public Field[] createIndexableFields(Point point) { FieldType doubleFieldType = new FieldType(LegacyDoubleField.TYPE_NOT_STORED); doubleFieldType.setNumericPrecisionStep(precisionStep); diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java index 9a29677c6e7..16026790543 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java @@ -22,9 +22,9 @@ import java.util.Arrays; import java.util.List; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.document.FieldType; import org.apache.lucene.index.IndexOptions; import org.apache.lucene.spatial.bbox.BBoxStrategy; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/PortedSolr3Test.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/PortedSolr3Test.java index 8506c868dde..a081497c387 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/PortedSolr3Test.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/PortedSolr3Test.java @@ -22,10 +22,10 @@ import java.util.List; import java.util.Set; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.search.Query; import org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy; import org.apache.lucene.spatial.prefix.TermQueryPrefixTreeStrategy; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/QueryEqualsHashCodeTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/QueryEqualsHashCodeTest.java index b1a5e542fc5..5dbb8f837e8 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/QueryEqualsHashCodeTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/QueryEqualsHashCodeTest.java @@ -19,8 +19,8 @@ package org.apache.lucene.spatial; import java.util.ArrayList; import java.util.Collection; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.spatial.bbox.BBoxStrategy; import org.apache.lucene.spatial.composite.CompositeSpatialStrategy; import org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialArgsTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialArgsTest.java index 09b5d466626..094953a95db 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialArgsTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialArgsTest.java @@ -16,8 +16,8 @@ */ package org.apache.lucene.spatial; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.spatial.query.SpatialArgs; import org.junit.Test; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialExample.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialExample.java index 1bd715969c0..76e0200f26b 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialExample.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialExample.java @@ -18,10 +18,10 @@ package org.apache.lucene.spatial; import java.io.IOException; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.NumericDocValuesField; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestCase.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestCase.java index 94e5a8e68a7..529e98bc558 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestCase.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestCase.java @@ -24,10 +24,10 @@ import java.util.Map; import java.util.Random; import java.util.logging.Logger; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.MockAnalyzer; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestData.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestData.java index 27d47b33364..06a68ce72e9 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestData.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestData.java @@ -16,8 +16,8 @@ */ package org.apache.lucene.spatial; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Shape; import java.io.BufferedReader; import java.io.IOException; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestQuery.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestQuery.java index bac90cf45ca..47e9c120eec 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestQuery.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestQuery.java @@ -16,7 +16,7 @@ */ package org.apache.lucene.spatial; -import com.spatial4j.core.context.SpatialContext; +import org.locationtech.spatial4j.context.SpatialContext; import org.apache.lucene.spatial.query.SpatialArgs; import org.apache.lucene.spatial.query.SpatialArgsParser; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/StrategyTestCase.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/StrategyTestCase.java index 00e437b857d..df37d18d0e0 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/StrategyTestCase.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/StrategyTestCase.java @@ -29,8 +29,8 @@ import java.util.List; import java.util.Set; import java.util.logging.Logger; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.StoredField; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/TestTestFramework.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/TestTestFramework.java index d31fdf635bf..6af7467c2ca 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/TestTestFramework.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/TestTestFramework.java @@ -16,8 +16,8 @@ */ package org.apache.lucene.spatial; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Rectangle; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Rectangle; import org.apache.lucene.spatial.query.SpatialArgsParser; import org.apache.lucene.spatial.query.SpatialOperation; import org.apache.lucene.util.LuceneTestCase; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java index 6140996637e..20a7202ba33 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java @@ -19,12 +19,12 @@ package org.apache.lucene.spatial.bbox; import java.io.IOException; import com.carrotsearch.randomizedtesting.annotations.Repeat; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.context.SpatialContextFactory; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.impl.RectangleImpl; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.context.SpatialContextFactory; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.impl.RectangleImpl; import org.apache.lucene.document.FieldType; import org.apache.lucene.index.DocValuesType; import org.apache.lucene.index.IndexOptions; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/composite/CompositeStrategyTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/composite/CompositeStrategyTest.java index 8e1bb513c46..7d49e8b2e4c 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/composite/CompositeStrategyTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/composite/CompositeStrategyTest.java @@ -19,12 +19,12 @@ package org.apache.lucene.spatial.composite; import java.io.IOException; import com.carrotsearch.randomizedtesting.annotations.Repeat; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.context.SpatialContextFactory; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.impl.RectangleImpl; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.context.SpatialContextFactory; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.impl.RectangleImpl; import org.apache.lucene.spatial.prefix.RandomSpatialOpStrategyTestCase; import org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy; import org.apache.lucene.spatial.prefix.tree.GeohashPrefixTree; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/DateNRStrategyTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/DateNRStrategyTest.java index 7cd4723d5b6..33c8a330af9 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/DateNRStrategyTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/DateNRStrategyTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.Calendar; import com.carrotsearch.randomizedtesting.annotations.Repeat; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.spatial.prefix.tree.DateRangePrefixTree; import org.apache.lucene.spatial.prefix.tree.NumberRangePrefixTree.UnitNRShape; import org.apache.lucene.spatial.query.SpatialOperation; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java index 124af79041b..2de18cc3225 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java @@ -21,15 +21,15 @@ import java.util.ArrayList; import java.util.List; import com.carrotsearch.randomizedtesting.annotations.Repeat; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.context.SpatialContextFactory; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.shape.Circle; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; -import com.spatial4j.core.shape.impl.RectangleImpl; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.context.SpatialContextFactory; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.shape.Circle; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; +import org.locationtech.spatial4j.shape.impl.RectangleImpl; import org.apache.lucene.search.Query; import org.apache.lucene.search.TotalHitCountCollector; import org.apache.lucene.spatial.StrategyTestCase; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/JtsPolygonTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/JtsPolygonTest.java index 09fb3a9fd45..3f1684f58b5 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/JtsPolygonTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/JtsPolygonTest.java @@ -16,9 +16,9 @@ */ package org.apache.lucene.spatial.prefix; -import com.spatial4j.core.context.SpatialContextFactory; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContextFactory; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.Field.Store; @@ -45,7 +45,7 @@ public class JtsPolygonTest extends StrategyTestCase { try { HashMap args = new HashMap<>(); args.put("spatialContextFactory", - "com.spatial4j.core.context.jts.JtsSpatialContextFactory"); + "org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory"); ctx = SpatialContextFactory.makeSpatialContext(args, getClass().getClassLoader()); } catch (NoClassDefFoundError e) { assumeTrue("This test requires JTS jar: "+e, false); diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/NumberRangeFacetsTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/NumberRangeFacetsTest.java index 11e1d18701c..514c18e078b 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/NumberRangeFacetsTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/NumberRangeFacetsTest.java @@ -23,7 +23,7 @@ import java.util.Collections; import java.util.List; import com.carrotsearch.randomizedtesting.annotations.Repeat; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.queries.TermsQuery; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java index 8db131c84a6..c7e107cfba1 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java @@ -29,14 +29,14 @@ import java.util.Map; import java.util.Set; import com.carrotsearch.randomizedtesting.annotations.Repeat; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.context.SpatialContextFactory; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.ShapeCollection; -import com.spatial4j.core.shape.SpatialRelation; -import com.spatial4j.core.shape.impl.RectangleImpl; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.context.SpatialContextFactory; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.ShapeCollection; +import org.locationtech.spatial4j.shape.SpatialRelation; +import org.locationtech.spatial4j.shape.impl.RectangleImpl; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.StoredField; @@ -56,10 +56,10 @@ import org.junit.Test; import static com.carrotsearch.randomizedtesting.RandomizedTest.randomBoolean; import static com.carrotsearch.randomizedtesting.RandomizedTest.randomInt; import static com.carrotsearch.randomizedtesting.RandomizedTest.randomIntBetween; -import static com.spatial4j.core.shape.SpatialRelation.CONTAINS; -import static com.spatial4j.core.shape.SpatialRelation.DISJOINT; -import static com.spatial4j.core.shape.SpatialRelation.INTERSECTS; -import static com.spatial4j.core.shape.SpatialRelation.WITHIN; +import static org.locationtech.spatial4j.shape.SpatialRelation.CONTAINS; +import static org.locationtech.spatial4j.shape.SpatialRelation.DISJOINT; +import static org.locationtech.spatial4j.shape.SpatialRelation.INTERSECTS; +import static org.locationtech.spatial4j.shape.SpatialRelation.WITHIN; /** Randomized PrefixTree test that considers the fuzziness of the * results introduced by grid approximation. */ diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpStrategyTestCase.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpStrategyTestCase.java index 87f1071503c..22c58393f5f 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpStrategyTestCase.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpStrategyTestCase.java @@ -22,7 +22,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Set; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.search.Query; import org.apache.lucene.spatial.StrategyTestCase; import org.apache.lucene.spatial.query.SpatialArgs; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestRecursivePrefixTreeStrategy.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestRecursivePrefixTreeStrategy.java index a53d52dee7a..f852464ca19 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestRecursivePrefixTreeStrategy.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestRecursivePrefixTreeStrategy.java @@ -16,10 +16,10 @@ */ package org.apache.lucene.spatial.prefix; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.spatial.SpatialMatchConcern; import org.apache.lucene.spatial.StrategyTestCase; import org.apache.lucene.spatial.prefix.tree.GeohashPrefixTree; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestTermQueryPrefixGridStrategy.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestTermQueryPrefixGridStrategy.java index 1a912c04620..fc131c5d788 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestTermQueryPrefixGridStrategy.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestTermQueryPrefixGridStrategy.java @@ -16,8 +16,8 @@ */ package org.apache.lucene.spatial.prefix; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.StoredField; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/DateRangePrefixTreeTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/DateRangePrefixTreeTest.java index 74a989efb24..12e9744064b 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/DateRangePrefixTreeTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/DateRangePrefixTreeTest.java @@ -21,8 +21,8 @@ import java.util.Arrays; import java.util.Calendar; import java.util.GregorianCalendar; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; import org.apache.lucene.spatial.prefix.tree.NumberRangePrefixTree.UnitNRShape; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.LuceneTestCase; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeTest.java index 403b8d19637..8a3d79c3b29 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeTest.java @@ -16,10 +16,10 @@ */ package org.apache.lucene.spatial.prefix.tree; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.Field.Store; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/query/SpatialArgsParserTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/query/SpatialArgsParserTest.java index 93b95f3d524..9724c6519b2 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/query/SpatialArgsParserTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/query/SpatialArgsParserTest.java @@ -16,8 +16,8 @@ */ package org.apache.lucene.spatial.query; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Rectangle; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Rectangle; import org.apache.lucene.util.LuceneTestCase; import org.junit.Test; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/serialized/SerializedStrategyTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/serialized/SerializedStrategyTest.java index bed83393940..6a73d23d2f2 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/serialized/SerializedStrategyTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/serialized/SerializedStrategyTest.java @@ -18,7 +18,7 @@ package org.apache.lucene.spatial.serialized; import java.io.IOException; -import com.spatial4j.core.context.SpatialContext; +import org.locationtech.spatial4j.context.SpatialContext; import org.apache.lucene.spatial.SpatialMatchConcern; import org.apache.lucene.spatial.StrategyTestCase; import org.junit.Before; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dRptTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dRptTest.java index 8040a351ce2..d26bb29a597 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dRptTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dRptTest.java @@ -21,10 +21,10 @@ import java.util.ArrayList; import java.util.List; import com.carrotsearch.randomizedtesting.annotations.Repeat; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.spatial.composite.CompositeSpatialStrategy; import org.apache.lucene.spatial.prefix.RandomSpatialOpStrategyTestCase; import org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy; @@ -41,7 +41,7 @@ import org.apache.lucene.geo3d.GeoShape; import org.apache.lucene.geo3d.PlanetModel; import org.junit.Test; -import static com.spatial4j.core.distance.DistanceUtils.DEGREES_TO_RADIANS; +import static org.locationtech.spatial4j.distance.DistanceUtils.DEGREES_TO_RADIANS; public class Geo3dRptTest extends RandomSpatialOpStrategyTestCase { diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dShapeRectRelationTestCase.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dShapeRectRelationTestCase.java index 58b520db81c..134b8c75366 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dShapeRectRelationTestCase.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dShapeRectRelationTestCase.java @@ -19,12 +19,12 @@ package org.apache.lucene.spatial.spatial4j; import java.util.ArrayList; import java.util.List; -import com.spatial4j.core.TestLog; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.shape.Circle; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.RectIntersectionTestHelper; +import org.locationtech.spatial4j.TestLog; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.shape.Circle; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.RectIntersectionTestHelper; import org.apache.lucene.geo3d.LatLonBounds; import org.apache.lucene.geo3d.GeoBBox; import org.apache.lucene.geo3d.GeoBBoxFactory; @@ -37,7 +37,7 @@ import org.apache.lucene.geo3d.PlanetModel; import org.junit.Rule; import org.junit.Test; -import static com.spatial4j.core.distance.DistanceUtils.DEGREES_TO_RADIANS; +import static org.locationtech.spatial4j.distance.DistanceUtils.DEGREES_TO_RADIANS; public abstract class Geo3dShapeRectRelationTestCase extends RandomizedShapeTestCase { protected final static double RADIANS_PER_DEGREE = Math.PI/180.0; @@ -110,7 +110,6 @@ public abstract class Geo3dShapeRectRelationTestCase extends RandomizedShapeTest } } - @AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/LUCENE-6867") @Test public void testGeoCircleRect() { new Geo3dRectIntersectionTestHelper(ctx) { @@ -133,7 +132,6 @@ public abstract class Geo3dShapeRectRelationTestCase extends RandomizedShapeTest }.testRelateWithRectangle(); } - @AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/LUCENE-6867") @Test public void testGeoBBoxRect() { new Geo3dRectIntersectionTestHelper(ctx) { @@ -168,7 +166,6 @@ public abstract class Geo3dShapeRectRelationTestCase extends RandomizedShapeTest }.testRelateWithRectangle(); } - @AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/LUCENE-6867") @Test public void testGeoPolygonRect() { new Geo3dRectIntersectionTestHelper(ctx) { @@ -212,7 +209,6 @@ public abstract class Geo3dShapeRectRelationTestCase extends RandomizedShapeTest }.testRelateWithRectangle(); } - @AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/LUCENE-6867") @Test public void testGeoPathRect() { new Geo3dRectIntersectionTestHelper(ctx) { diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dShapeSphereModelRectRelationTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dShapeSphereModelRectRelationTest.java index aac0a0a0414..2d958231e6d 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dShapeSphereModelRectRelationTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dShapeSphereModelRectRelationTest.java @@ -19,7 +19,7 @@ package org.apache.lucene.spatial.spatial4j; import java.util.ArrayList; import java.util.List; -import com.spatial4j.core.shape.Rectangle; +import org.locationtech.spatial4j.shape.Rectangle; import org.apache.lucene.geo3d.GeoArea; import org.apache.lucene.geo3d.GeoBBox; import org.apache.lucene.geo3d.GeoBBoxFactory; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/RandomizedShapeTestCase.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/RandomizedShapeTestCase.java index 40d1b248a70..0c18f5d7dde 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/RandomizedShapeTestCase.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/RandomizedShapeTestCase.java @@ -16,17 +16,17 @@ */ package org.apache.lucene.spatial.spatial4j; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.shape.Circle; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.SpatialRelation; -import com.spatial4j.core.shape.impl.Range; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.shape.Circle; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.SpatialRelation; +import org.locationtech.spatial4j.shape.impl.Range; -import static com.spatial4j.core.shape.SpatialRelation.CONTAINS; -import static com.spatial4j.core.shape.SpatialRelation.WITHIN; +import static org.locationtech.spatial4j.shape.SpatialRelation.CONTAINS; +import static org.locationtech.spatial4j.shape.SpatialRelation.WITHIN; import org.apache.lucene.util.LuceneTestCase; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/geo3d/GeoPointTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/geo3d/GeoPointTest.java index 1d559da5835..444647404e5 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/geo3d/GeoPointTest.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/geo3d/GeoPointTest.java @@ -21,7 +21,7 @@ import org.apache.lucene.geo3d.PlanetModel; import org.apache.lucene.util.LuceneTestCase; import org.junit.Test; -import com.spatial4j.core.distance.DistanceUtils; +import org.locationtech.spatial4j.distance.DistanceUtils; import static com.carrotsearch.randomizedtesting.RandomizedTest.randomFloat; diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/vector/TestPointVectorStrategy.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/vector/TestPointVectorStrategy.java index d62a0a8231f..69f8c4da7ab 100644 --- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/vector/TestPointVectorStrategy.java +++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/vector/TestPointVectorStrategy.java @@ -16,9 +16,9 @@ */ package org.apache.lucene.spatial.vector; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Circle; -import com.spatial4j.core.shape.Point; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Circle; +import org.locationtech.spatial4j.shape.Point; import org.apache.lucene.search.Query; import org.apache.lucene.spatial.SpatialMatchConcern; import org.apache.lucene.spatial.StrategyTestCase; diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 4242112a383..1b9d8eb5c77 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -19,6 +19,9 @@ See the Quick Start guide at http://lucene.apache.org/solr/quickstart.html ================== 7.0.0 ================== (No Changes) +================== 6.1.0 ================== +(No Changes) + ================== 6.0.0 ================== Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release diff --git a/solr/core/ivy.xml b/solr/core/ivy.xml index 2936c5bb339..5f8706f0e43 100644 --- a/solr/core/ivy.xml +++ b/solr/core/ivy.xml @@ -36,7 +36,7 @@ - + diff --git a/solr/core/src/java/org/apache/solr/handler/component/SpatialHeatmapFacets.java b/solr/core/src/java/org/apache/solr/handler/component/SpatialHeatmapFacets.java index dc1b9afd54d..4ad882c8e99 100644 --- a/solr/core/src/java/org/apache/solr/handler/component/SpatialHeatmapFacets.java +++ b/solr/core/src/java/org/apache/solr/handler/component/SpatialHeatmapFacets.java @@ -32,8 +32,8 @@ import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.spatial.prefix.HeatmapFacetCounter; import org.apache.lucene.spatial.prefix.PrefixTreeStrategy; import org.apache.lucene.spatial.query.SpatialArgs; diff --git a/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java b/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java index 83fd44775f4..222f0b83eb6 100644 --- a/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java +++ b/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java @@ -57,12 +57,12 @@ import org.slf4j.LoggerFactory; import com.google.common.base.Throwables; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.context.SpatialContextFactory; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.context.SpatialContextFactory; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; /** * Abstract base class for Solr FieldTypes based on a Lucene 4 {@link SpatialStrategy}. diff --git a/solr/core/src/java/org/apache/solr/schema/AbstractSpatialPrefixTreeFieldType.java b/solr/core/src/java/org/apache/solr/schema/AbstractSpatialPrefixTreeFieldType.java index 164398b48dd..abf55f1bb62 100644 --- a/solr/core/src/java/org/apache/solr/schema/AbstractSpatialPrefixTreeFieldType.java +++ b/solr/core/src/java/org/apache/solr/schema/AbstractSpatialPrefixTreeFieldType.java @@ -31,7 +31,7 @@ import org.apache.lucene.spatial.prefix.tree.SpatialPrefixTreeFactory; import org.apache.lucene.spatial.query.SpatialArgsParser; import org.apache.solr.util.MapListener; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Shape; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/solr/core/src/java/org/apache/solr/schema/BBoxField.java b/solr/core/src/java/org/apache/solr/schema/BBoxField.java index 2f282c85549..f655e68ce06 100644 --- a/solr/core/src/java/org/apache/solr/schema/BBoxField.java +++ b/solr/core/src/java/org/apache/solr/schema/BBoxField.java @@ -22,7 +22,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import com.spatial4j.core.shape.Rectangle; +import org.locationtech.spatial4j.shape.Rectangle; import org.apache.lucene.index.DocValuesType; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.spatial.bbox.BBoxOverlapRatioValueSource; diff --git a/solr/core/src/java/org/apache/solr/schema/DateRangeField.java b/solr/core/src/java/org/apache/solr/schema/DateRangeField.java index 38b68005ce0..95b441a9ed1 100644 --- a/solr/core/src/java/org/apache/solr/schema/DateRangeField.java +++ b/solr/core/src/java/org/apache/solr/schema/DateRangeField.java @@ -22,7 +22,7 @@ import java.util.Date; import java.util.List; import java.util.Map; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.shape.Shape; import org.apache.lucene.index.IndexableField; import org.apache.lucene.search.Query; diff --git a/solr/core/src/java/org/apache/solr/schema/GeoHashField.java b/solr/core/src/java/org/apache/solr/schema/GeoHashField.java index 7deae5f9dde..2baf72e192b 100644 --- a/solr/core/src/java/org/apache/solr/schema/GeoHashField.java +++ b/solr/core/src/java/org/apache/solr/schema/GeoHashField.java @@ -18,10 +18,10 @@ package org.apache.solr.schema; import java.io.IOException; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.io.GeohashUtils; -import com.spatial4j.core.shape.Point; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.io.GeohashUtils; +import org.locationtech.spatial4j.shape.Point; import org.apache.lucene.index.IndexableField; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.valuesource.LiteralValueSource; diff --git a/solr/core/src/java/org/apache/solr/schema/LatLonType.java b/solr/core/src/java/org/apache/solr/schema/LatLonType.java index 8592c5aa058..c30729adb48 100644 --- a/solr/core/src/java/org/apache/solr/schema/LatLonType.java +++ b/solr/core/src/java/org/apache/solr/schema/LatLonType.java @@ -47,10 +47,10 @@ import org.apache.solr.search.QParser; import org.apache.solr.search.SpatialOptions; import org.apache.solr.util.SpatialUtils; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; /** diff --git a/solr/core/src/java/org/apache/solr/schema/PointType.java b/solr/core/src/java/org/apache/solr/schema/PointType.java index 93452318901..b2f15ab533e 100644 --- a/solr/core/src/java/org/apache/solr/schema/PointType.java +++ b/solr/core/src/java/org/apache/solr/schema/PointType.java @@ -21,7 +21,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import com.spatial4j.core.distance.DistanceUtils; +import org.locationtech.spatial4j.distance.DistanceUtils; import org.apache.lucene.document.FieldType; import org.apache.lucene.index.IndexableField; import org.apache.lucene.queries.function.ValueSource; diff --git a/solr/core/src/java/org/apache/solr/schema/RptWithGeometrySpatialField.java b/solr/core/src/java/org/apache/solr/schema/RptWithGeometrySpatialField.java index fe4cedc04c5..b633174f910 100644 --- a/solr/core/src/java/org/apache/solr/schema/RptWithGeometrySpatialField.java +++ b/solr/core/src/java/org/apache/solr/schema/RptWithGeometrySpatialField.java @@ -20,9 +20,9 @@ import java.io.IOException; import java.lang.ref.WeakReference; import java.util.Map; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.shape.Shape; -import com.spatial4j.core.shape.jts.JtsGeometry; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.shape.Shape; +import org.locationtech.spatial4j.shape.jts.JtsGeometry; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.queries.function.FunctionValues; diff --git a/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java b/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java index 2c05f33c3e8..0830267652a 100644 --- a/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java +++ b/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java @@ -16,7 +16,7 @@ */ package org.apache.solr.search; -import com.spatial4j.core.distance.DistanceUtils; +import org.locationtech.spatial4j.distance.DistanceUtils; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.Term; diff --git a/solr/core/src/java/org/apache/solr/search/function/distance/GeoDistValueSourceParser.java b/solr/core/src/java/org/apache/solr/search/function/distance/GeoDistValueSourceParser.java index 1f4ea34ff95..956550c3ac3 100644 --- a/solr/core/src/java/org/apache/solr/search/function/distance/GeoDistValueSourceParser.java +++ b/solr/core/src/java/org/apache/solr/search/function/distance/GeoDistValueSourceParser.java @@ -20,9 +20,9 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.shape.Point; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.shape.Point; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.valuesource.ConstNumberSource; import org.apache.lucene.queries.function.valuesource.DoubleConstValueSource; @@ -41,7 +41,7 @@ import org.apache.solr.util.SpatialUtils; /** * Parses "geodist" creating {@link HaversineConstFunction} or {@link HaversineFunction} - * or calling {@link SpatialStrategy#makeDistanceValueSource(com.spatial4j.core.shape.Point,double)}. + * or calling {@link SpatialStrategy#makeDistanceValueSource(org.locationtech.spatial4j.shape.Point,double)}. */ public class GeoDistValueSourceParser extends ValueSourceParser { diff --git a/solr/core/src/java/org/apache/solr/search/function/distance/GeohashFunction.java b/solr/core/src/java/org/apache/solr/search/function/distance/GeohashFunction.java index c4a7bd55705..b00f2fd861a 100644 --- a/solr/core/src/java/org/apache/solr/search/function/distance/GeohashFunction.java +++ b/solr/core/src/java/org/apache/solr/search/function/distance/GeohashFunction.java @@ -18,7 +18,7 @@ package org.apache.solr.search.function.distance; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; -import com.spatial4j.core.io.GeohashUtils; +import org.locationtech.spatial4j.io.GeohashUtils; import java.util.Map; import java.io.IOException; diff --git a/solr/core/src/java/org/apache/solr/search/function/distance/GeohashHaversineFunction.java b/solr/core/src/java/org/apache/solr/search/function/distance/GeohashHaversineFunction.java index 4dd49e48121..915db333678 100644 --- a/solr/core/src/java/org/apache/solr/search/function/distance/GeohashHaversineFunction.java +++ b/solr/core/src/java/org/apache/solr/search/function/distance/GeohashHaversineFunction.java @@ -15,11 +15,11 @@ * limitations under the License. */ package org.apache.solr.search.function.distance; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.distance.DistanceUtils; -import com.spatial4j.core.distance.GeodesicSphereDistCalc; -import com.spatial4j.core.io.GeohashUtils; -import com.spatial4j.core.shape.Point; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.distance.GeodesicSphereDistCalc; +import org.locationtech.spatial4j.io.GeohashUtils; +import org.locationtech.spatial4j.shape.Point; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; 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.java index f9ac062dda3..4b68f5cec70 100644 --- 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 @@ -15,7 +15,7 @@ * limitations under the License. */ package org.apache.solr.search.function.distance; -import com.spatial4j.core.distance.DistanceUtils; +import org.locationtech.spatial4j.distance.DistanceUtils; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; @@ -26,7 +26,7 @@ import org.apache.lucene.search.IndexSearcher; import java.io.IOException; import java.util.Map; -import static com.spatial4j.core.distance.DistanceUtils.DEGREES_TO_RADIANS; +import static org.locationtech.spatial4j.distance.DistanceUtils.DEGREES_TO_RADIANS; /** * Haversine function with one point constant diff --git a/solr/core/src/java/org/apache/solr/search/function/distance/HaversineFunction.java b/solr/core/src/java/org/apache/solr/search/function/distance/HaversineFunction.java index c0eb0442ed2..20ed5a733bb 100644 --- a/solr/core/src/java/org/apache/solr/search/function/distance/HaversineFunction.java +++ b/solr/core/src/java/org/apache/solr/search/function/distance/HaversineFunction.java @@ -21,7 +21,7 @@ import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.DoubleDocValues; import org.apache.lucene.queries.function.valuesource.MultiValueSource; import org.apache.lucene.search.IndexSearcher; -import com.spatial4j.core.distance.DistanceUtils; +import org.locationtech.spatial4j.distance.DistanceUtils; import org.apache.solr.common.SolrException; import java.io.IOException; diff --git a/solr/core/src/java/org/apache/solr/util/DistanceUnits.java b/solr/core/src/java/org/apache/solr/util/DistanceUnits.java index 63f43e4652f..a2163ac7430 100644 --- a/solr/core/src/java/org/apache/solr/util/DistanceUnits.java +++ b/solr/core/src/java/org/apache/solr/util/DistanceUnits.java @@ -21,7 +21,7 @@ import java.util.Map; import java.util.Set; import com.google.common.collect.ImmutableMap; -import com.spatial4j.core.distance.DistanceUtils; +import org.locationtech.spatial4j.distance.DistanceUtils; import org.apache.solr.schema.AbstractSpatialFieldType; /** diff --git a/solr/core/src/java/org/apache/solr/util/SpatialUtils.java b/solr/core/src/java/org/apache/solr/util/SpatialUtils.java index 1b05d01f5e9..9f6019cff33 100644 --- a/solr/core/src/java/org/apache/solr/util/SpatialUtils.java +++ b/solr/core/src/java/org/apache/solr/util/SpatialUtils.java @@ -18,11 +18,11 @@ package org.apache.solr.util; import java.text.ParseException; -import com.spatial4j.core.context.SpatialContext; -import com.spatial4j.core.exception.InvalidShapeException; -import com.spatial4j.core.shape.Point; -import com.spatial4j.core.shape.Rectangle; -import com.spatial4j.core.shape.Shape; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.exception.InvalidShapeException; +import org.locationtech.spatial4j.shape.Point; +import org.locationtech.spatial4j.shape.Rectangle; +import org.locationtech.spatial4j.shape.Shape; import org.apache.solr.common.SolrException; /** Utility methods pertaining to spatial. */ @@ -32,7 +32,7 @@ public class SpatialUtils { /** * Parses a 'geom' parameter (might also be used to parse shapes for indexing). {@code geomStr} can either be WKT or - * a rectangle-range syntax (see {@link #parseRectangle(String, com.spatial4j.core.context.SpatialContext)}. + * a rectangle-range syntax (see {@link #parseRectangle(String, org.locationtech.spatial4j.context.SpatialContext)}. */ public static Shape parseGeomSolrException(String geomStr, SpatialContext ctx) { if (geomStr.length() == 0) { @@ -100,7 +100,7 @@ public class SpatialUtils { return idx; } - /** Calls {@link #parsePoint(String, com.spatial4j.core.context.SpatialContext)} and wraps + /** Calls {@link #parsePoint(String, org.locationtech.spatial4j.context.SpatialContext)} and wraps * the exception with {@link org.apache.solr.common.SolrException} with a helpful message. */ public static Point parsePointSolrException(String externalVal, SpatialContext ctx) throws SolrException { try { @@ -116,7 +116,7 @@ public class SpatialUtils { /** * Parses {@code str} in the format of '[minPoint TO maxPoint]' where {@code minPoint} is the lower left corner * and maxPoint is the upper-right corner of the bounding box. Both corners may optionally be wrapped with a quote - * and then it's parsed via {@link #parsePoint(String, com.spatial4j.core.context.SpatialContext)}. + * and then it's parsed via {@link #parsePoint(String, org.locationtech.spatial4j.context.SpatialContext)}. * @param str Non-null; may *not* have leading or trailing spaces * @param ctx Non-null * @return the Rectangle @@ -140,7 +140,7 @@ public class SpatialUtils { } /** - * Calls {@link #parseRectangle(String, com.spatial4j.core.context.SpatialContext)} and wraps the exception with + * Calls {@link #parseRectangle(String, org.locationtech.spatial4j.context.SpatialContext)} and wraps the exception with * {@link org.apache.solr.common.SolrException} with a helpful message. */ public static Rectangle parseRectangeSolrException(String externalVal, SpatialContext ctx) throws SolrException { diff --git a/solr/core/src/test-files/solr/collection1/conf/schema_latest.xml b/solr/core/src/test-files/solr/collection1/conf/schema_latest.xml index 803d45eed77..ef82aa189b7 100644 --- a/solr/core/src/test-files/solr/collection1/conf/schema_latest.xml +++ b/solr/core/src/test-files/solr/collection1/conf/schema_latest.xml @@ -718,7 +718,7 @@ http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4 --> + geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers" />