Apache Solr open-source search software
LUCENE-8621: Refactor LatLonShape, XYShape, and all query and utility classes from sandbox to core
Nicholas Knizeaad849bf87ab
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex 2f1c2e7babb..4a9a023e534 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -99,6 +99,8 @@ API Changes* LUCENE-8369: Remove obsolete spatial module. (Nick Knize, David Smiley)+* LUCENE-8621: Refactor LatLonShape, XYShape, and all query and utility classes to core. (Nick Knize)+New Features---------------------diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonShape.java b/lucene/core/src/java/org/apache/lucene/document/LatLonShape.javasimilarity index 99%rename from lucene/sandbox/src/java/org/apache/lucene/document/LatLonShape.javarename to lucene/core/src/java/org/apache/lucene/document/LatLonShape.javaindex 8bcb49f2404..d20f7cff3a5 100644--- a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonShape.java+++ b/lucene/core/src/java/org/apache/lucene/document/LatLonShape.java@@ -52,8 +52,6 @@ import static org.apache.lucene.geo.GeoEncodingUtils.encodeLongitude;* and 8.381903171539307E-8 for longitude).* @see PointValues* @see LatLonDocValuesField- *- * @lucene.experimental*/public class LatLonShape {diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonShapeBoundingBoxQuery.java b/lucene/core/src/java/org/apache/lucene/document/LatLonShapeBoundingBoxQuery.javasimilarity index 99%rename from lucene/sandbox/src/java/org/apache/lucene/document/LatLonShapeBoundingBoxQuery.javarename to lucene/core/src/java/org/apache/lucene/document/LatLonShapeBoundingBoxQuery.javaindex 71f909a781c..e3578164ac4 100644--- a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonShapeBoundingBoxQuery.java+++ b/lucene/core/src/java/org/apache/lucene/document/LatLonShapeBoundingBoxQuery.java@@ -27,8 +27,6 @@ import org.apache.lucene.index.PointValues.Relation;** <p>The field must be indexed using* {@link org.apache.lucene.document.LatLonShape#createIndexableFields} added per document.- *- * @lucene.experimental**/final class LatLonShapeBoundingBoxQuery extends ShapeQuery {final Rectangle rectangle;diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonShapeLineQuery.java b/lucene/core/src/java/org/apache/lucene/document/LatLonShapeLineQuery.javasimilarity index 99%rename from lucene/sandbox/src/java/org/apache/lucene/document/LatLonShapeLineQuery.javarename to lucene/core/src/java/org/apache/lucene/document/LatLonShapeLineQuery.javaindex b8756361118..f92339eb858 100644--- a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonShapeLineQuery.java+++ b/lucene/core/src/java/org/apache/lucene/document/LatLonShapeLineQuery.java@@ -41,8 +41,6 @@ import org.apache.lucene.util.NumericUtils;* </ul>* <p>The field must be indexed using* {@link org.apache.lucene.document.LatLonShape#createIndexableFields} added per document.- *- * @lucene.experimental**/final class LatLonShapeLineQuery extends ShapeQuery {final Line[] lines;diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonShapePointQuery.java b/lucene/core/src/java/org/apache/lucene/document/LatLonShapePointQuery.javasimilarity index 99%rename from lucene/sandbox/src/java/org/apache/lucene/document/LatLonShapePointQuery.javarename to lucene/core/src/java/org/apache/lucene/document/LatLonShapePointQuery.javaindex 8c55ec6c9a2..3fef111b2db 100644--- a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonShapePointQuery.java+++ b/lucene/core/src/java/org/apache/lucene/document/LatLonShapePointQuery.java@@ -29,8 +29,6 @@ import org.apache.lucene.util.NumericUtils;** <p>The field must be indexed using* {@link LatLonShape#createIndexableFields} added per document.- *- * @lucene.experimental**/final class LatLonShapePointQuery extends ShapeQuery {final Component2D point2D;diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonShapePolygonQuery.java b/lucene/core/src/java/org/apache/lucene/document/LatLonShapePolygonQuery.javasimilarity index 99%rename from lucene/sandbox/src/java/org/apache/lucene/document/LatLonShapePolygonQuery.javarename to lucene/core/src/java/org/apache/lucene/document/LatLonShapePolygonQuery.javaindex 38eee1d410b..8ca4c26883a 100644--- a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonShapePolygonQuery.java+++ b/lucene/core/src/java/org/apache/lucene/document/LatLonShapePolygonQuery.java@@ -36,8 +36,6 @@ import org.apache.lucene.util.NumericUtils;** <p>The field must be indexed using* {@link org.apache.lucene.document.LatLonShape#createIndexableFields} added per document.- *- * @lucene.experimental**/final class LatLonShapePolygonQuery extends ShapeQuery {final Polygon[] polygons;diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/ShapeField.java b/lucene/core/src/java/org/apache/lucene/document/ShapeField.javasimilarity index 93%rename from lucene/sandbox/src/java/org/apache/lucene/document/ShapeField.javarename to lucene/core/src/java/org/apache/lucene/document/ShapeField.javaindex 258ccc7659f..724feb86ae2 100644--- a/lucene/sandbox/src/java/org/apache/lucene/document/ShapeField.java+++ b/lucene/core/src/java/org/apache/lucene/document/ShapeField.java@@ -36,8 +36,6 @@ import org.apache.lucene.util.NumericUtils;* This class defines the static methods for encoding the three vertices of a tessellated triangles as a seven dimension point.* The coordinates are converted from double precision values into 32 bit integers so they are sortable at index time.* <p>- *- * @lucene.experimental*/public final class ShapeField {/** vertex coordinates are encoded as 4 byte integers */@@ -59,13 +57,13 @@ public final class ShapeField {*/public static class Triangle extends Field {- // constructor for points and lines+ /** constructor for points and lines */Triangle(String name, int aXencoded, int aYencoded, int bXencoded, int bYencoded, int cXencoded, int cYencoded) {super(name, TYPE);setTriangleValue(aXencoded, aYencoded, true, bXencoded, bYencoded, true, cXencoded, cYencoded, true);}-+ /** xtor from a given Tessellated Triangle object */Triangle(String name, Tessellator.Triangle t) {super(name, TYPE);setTriangleValue(t.getEncodedX(0), t.getEncodedY(0), t.isEdgefromPolygon(0),@@ -89,7 +87,14 @@ public final class ShapeField {/** Query Relation Types **/public enum QueryRelation {- INTERSECTS, WITHIN, DISJOINT, CONTAINS+ /** used for INTERSECT Queries */+ INTERSECTS,+ /** used for WITHIN Queries */+ WITHIN,+ /** used for DISJOINT Queries */+ DISJOINT,+ /** used for CONTAINS Queries */+ CONTAINS}private static final int MINY_MINX_MAXY_MAXX_Y_X = 0;@@ -345,11 +350,26 @@ public final class ShapeField {* Represents a encoded triangle using {@link ShapeField#decodeTriangle(byte[], DecodedTriangle)}.*/public static class DecodedTriangle {- //Triangle vertices- public int aX, aY, bX, bY, cX, cY;- //Represent if edges belongs to original shape- public boolean ab, bc, ca;+ /** x coordinate, vertex one */+ public int aX;+ /** y coordinate, vertex one */+ public int aY;+ /** x coordinate, vertex two */+ public int bX;+ /** y coordinate, vertex two */+ public int bY;+ /** x coordinate, vertex three */+ public int cX;+ /** y coordinate, vertex three */+ public int cY;+ /** represent if edge ab belongs to original shape */+ public boolean ab;+ /** represent if edge bc belongs to original shape */+ public boolean bc;+ /** represent if edge ca belongs to original shape */+ public boolean ca;+ /** default xtor */public DecodedTriangle() {}diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/ShapeQuery.java b/lucene/core/src/java/org/apache/lucene/document/ShapeQuery.javasimilarity index 99%rename from lucene/sandbox/src/java/org/apache/lucene/document/ShapeQuery.javarename to lucene/core/src/java/org/apache/lucene/document/ShapeQuery.javaindex 3d456385f34..a4e4ce4ad84 100644--- a/lucene/sandbox/src/java/org/apache/lucene/document/ShapeQuery.java+++ b/lucene/core/src/java/org/apache/lucene/document/ShapeQuery.java@@ -56,8 +56,6 @@ import org.apache.lucene.util.FixedBitSet;* <li>{@link XYShape#newPolygonQuery newPolygonQuery()} for matching cartesian shapes that have some {@link QueryRelation} with a polygon.* </ul>* <p>- *- * @lucene.experimental**/abstract class ShapeQuery extends Query {/** field name */@@ -203,6 +201,7 @@ abstract class ShapeQuery extends Query {return sameClassAs(o) && equalsTo(o);}+ /** class specific equals check */protected boolean equalsTo(Object o) {return Objects.equals(field, ((ShapeQuery)o).field) && this.queryRelation == ((ShapeQuery)o).queryRelation;}diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/XYShape.java b/lucene/core/src/java/org/apache/lucene/document/XYShape.javasimilarity index 99%rename from lucene/sandbox/src/java/org/apache/lucene/document/XYShape.javarename to lucene/core/src/java/org/apache/lucene/document/XYShape.javaindex 395c7f8dab8..387d04853e5 100644--- a/lucene/sandbox/src/java/org/apache/lucene/document/XYShape.java+++ b/lucene/core/src/java/org/apache/lucene/document/XYShape.java@@ -48,8 +48,6 @@ import static org.apache.lucene.geo.XYEncodingUtils.encode;* original {@code double} values.* @see PointValues* @see LatLonDocValuesField- *- * @lucene.experimental*/public class XYShape {diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/XYShapeBoundingBoxQuery.java b/lucene/core/src/java/org/apache/lucene/document/XYShapeBoundingBoxQuery.javasimilarity index 82%rename from lucene/sandbox/src/java/org/apache/lucene/document/XYShapeBoundingBoxQuery.javarename to lucene/core/src/java/org/apache/lucene/document/XYShapeBoundingBoxQuery.javaindex f1d9f82ca16..7f977b9d8e6 100644--- a/lucene/sandbox/src/java/org/apache/lucene/document/XYShapeBoundingBoxQuery.java+++ b/lucene/core/src/java/org/apache/lucene/document/XYShapeBoundingBoxQuery.java@@ -20,7 +20,7 @@ import org.apache.lucene.document.ShapeField.QueryRelation;import org.apache.lucene.geo.Component2D;import org.apache.lucene.geo.XYRectangle;import org.apache.lucene.geo.XYRectangle2D;-import org.apache.lucene.index.PointValues;+import org.apache.lucene.index.PointValues.Relation;import org.apache.lucene.util.NumericUtils;import static org.apache.lucene.geo.XYEncodingUtils.decode;@@ -30,14 +30,12 @@ import static org.apache.lucene.geo.XYEncodingUtils.decode;** <p>The field must be indexed using* {@link org.apache.lucene.document.XYShape#createIndexableFields} added per document.- *- * @lucene.experimental**/public class XYShapeBoundingBoxQuery extends ShapeQuery {final Component2D rectangle2D;final private XYRectangle rectangle;-+ /** construct a Bounding Box Query over cartesian geometries from the given ranges */public XYShapeBoundingBoxQuery(String field, QueryRelation queryRelation, double minX, double maxX, double minY, double maxY) {super(field, queryRelation);this.rectangle = new XYRectangle(minX, maxX, minY, maxY);@@ -45,32 +43,32 @@ public class XYShapeBoundingBoxQuery extends ShapeQuery {}@Override- protected PointValues.Relation relateRangeBBoxToQuery(int minXOffset, int minYOffset, byte[] minTriangle,+ protected Relation relateRangeBBoxToQuery(int minXOffset, int minYOffset, byte[] minTriangle,int maxXOffset, int maxYOffset, byte[] maxTriangle) {double minY = decode(NumericUtils.sortableBytesToInt(minTriangle, minYOffset));double minX = decode(NumericUtils.sortableBytesToInt(minTriangle, minXOffset));double maxY = decode(NumericUtils.sortableBytesToInt(maxTriangle, maxYOffset));double maxX = decode(NumericUtils.sortableBytesToInt(maxTriangle, maxXOffset));// check internal node against query- PointValues.Relation rel = rectangle2D.relate(minX, maxX, minY, maxY);+ Relation rel = rectangle2D.relate(minX, maxX, minY, maxY);// TODO: Check if this really helps- if (queryRelation == QueryRelation.INTERSECTS && rel == PointValues.Relation.CELL_CROSSES_QUERY) {+ if (queryRelation == QueryRelation.INTERSECTS && rel == Relation.CELL_CROSSES_QUERY) {// for intersects we can restrict the conditions by using the inner boxdouble innerMaxY = decode(NumericUtils.sortableBytesToInt(maxTriangle, minYOffset));- if (rectangle2D.relate(minX, maxX, minY, innerMaxY) == PointValues.Relation.CELL_INSIDE_QUERY) {- return PointValues.Relation.CELL_INSIDE_QUERY;+ if (rectangle2D.relate(minX, maxX, minY, innerMaxY) == Relation.CELL_INSIDE_QUERY) {+ return Relation.CELL_INSIDE_QUERY;}double innerMaX = decode(NumericUtils.sortableBytesToInt(maxTriangle, minXOffset));- if (rectangle2D.relate(minX, innerMaX, minY, maxY) == PointValues.Relation.CELL_INSIDE_QUERY) {- return PointValues.Relation.CELL_INSIDE_QUERY;+ if (rectangle2D.relate(minX, innerMaX, minY, maxY) == Relation.CELL_INSIDE_QUERY) {+ return Relation.CELL_INSIDE_QUERY;}double innerMinY = decode(NumericUtils.sortableBytesToInt(minTriangle, maxYOffset));- if (rectangle2D.relate(minX, maxX, innerMinY, maxY) == PointValues.Relation.CELL_INSIDE_QUERY) {- return PointValues.Relation.CELL_INSIDE_QUERY;+ if (rectangle2D.relate(minX, maxX, innerMinY, maxY) == Relation.CELL_INSIDE_QUERY) {+ return Relation.CELL_INSIDE_QUERY;}double innerMinX = decode(NumericUtils.sortableBytesToInt(minTriangle, maxXOffset));- if (rectangle2D.relate(innerMinX, maxX, minY, maxY) == PointValues.Relation.CELL_INSIDE_QUERY) {- return PointValues.Relation.CELL_INSIDE_QUERY;+ if (rectangle2D.relate(innerMinX, maxX, minY, maxY) == Relation.CELL_INSIDE_QUERY) {+ return Relation.CELL_INSIDE_QUERY;}}return rel;@@ -90,9 +88,9 @@ public class XYShapeBoundingBoxQuery extends ShapeQuery {double cX = decode(scratchTriangle.cX);switch (queryRelation) {- case INTERSECTS: return rectangle2D.relateTriangle(aX, aY, bX, bY, cX, cY) != PointValues.Relation.CELL_OUTSIDE_QUERY;+ case INTERSECTS: return rectangle2D.relateTriangle(aX, aY, bX, bY, cX, cY) != Relation.CELL_OUTSIDE_QUERY;case WITHIN: return rectangle2D.contains(aX, aY) && rectangle2D.contains(bX, bY) && rectangle2D.contains(cX, cY);- case DISJOINT: return rectangle2D.relateTriangle(aX, aY, bX, bY, cX, cY) == PointValues.Relation.CELL_OUTSIDE_QUERY;+ case DISJOINT: return rectangle2D.relateTriangle(aX, aY, bX, bY, cX, cY) == Relation.CELL_OUTSIDE_QUERY;default: throw new IllegalArgumentException("Unsupported query type :[" + queryRelation + "]");}}diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/XYShapeLineQuery.java b/lucene/core/src/java/org/apache/lucene/document/XYShapeLineQuery.javasimilarity index 98%rename from lucene/sandbox/src/java/org/apache/lucene/document/XYShapeLineQuery.javarename to lucene/core/src/java/org/apache/lucene/document/XYShapeLineQuery.javaindex 0fd9750dd0c..1a61bddfed4 100644--- a/lucene/sandbox/src/java/org/apache/lucene/document/XYShapeLineQuery.java+++ b/lucene/core/src/java/org/apache/lucene/document/XYShapeLineQuery.java@@ -41,13 +41,12 @@ import static org.apache.lucene.geo.XYEncodingUtils.decode;* </ul>* <p>The field must be indexed using* {@link org.apache.lucene.document.XYShape#createIndexableFields} added per document.- *- * @lucene.experimental**/final class XYShapeLineQuery extends ShapeQuery {final XYLine[] lines;final private Component2D line2D;+ /** construct a Line Query over cartesian geometries from the given line objects */public XYShapeLineQuery(String field, QueryRelation queryRelation, XYLine... lines) {super(field, queryRelation);/** line queries do not support within relations, only intersects and disjoint */diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/XYShapePointQuery.java b/lucene/core/src/java/org/apache/lucene/document/XYShapePointQuery.javasimilarity index 97%rename from lucene/sandbox/src/java/org/apache/lucene/document/XYShapePointQuery.javarename to lucene/core/src/java/org/apache/lucene/document/XYShapePointQuery.javaindex 10bf296b350..dee78692b5e 100644--- a/lucene/sandbox/src/java/org/apache/lucene/document/XYShapePointQuery.java+++ b/lucene/core/src/java/org/apache/lucene/document/XYShapePointQuery.java@@ -31,13 +31,12 @@ import static org.apache.lucene.geo.XYEncodingUtils.decode;** <p>The field must be indexed using* {@link XYShape#createIndexableFields} added per document.- *- * @lucene.experimental**/final class XYShapePointQuery extends ShapeQuery {final Component2D point2D;final float[][] points;+ /** construct a Point or MultiPoint Query over cartesian geometries from the given point values */public XYShapePointQuery(String field, ShapeField.QueryRelation queryRelation, float[][] points) {super(field, queryRelation);this.points = points;diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/XYShapePolygonQuery.java b/lucene/core/src/java/org/apache/lucene/document/XYShapePolygonQuery.javasimilarity index 99%rename from lucene/sandbox/src/java/org/apache/lucene/document/XYShapePolygonQuery.javarename to lucene/core/src/java/org/apache/lucene/document/XYShapePolygonQuery.javaindex 47fba09f434..11639c04ac3 100644--- a/lucene/sandbox/src/java/org/apache/lucene/document/XYShapePolygonQuery.java+++ b/lucene/core/src/java/org/apache/lucene/document/XYShapePolygonQuery.java@@ -33,8 +33,6 @@ import static org.apache.lucene.geo.XYEncodingUtils.decode;** <p>The field must be indexed using* {@link org.apache.lucene.document.XYShape#createIndexableFields} added per document.- *- * @lucene.experimental**/final class XYShapePolygonQuery extends ShapeQuery {final XYPolygon[] polygons;diff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/Line.java b/lucene/core/src/java/org/apache/lucene/geo/Line.javasimilarity index 99%rename from lucene/sandbox/src/java/org/apache/lucene/geo/Line.javarename to lucene/core/src/java/org/apache/lucene/geo/Line.javaindex 3c28607218c..290c9933c64 100644--- a/lucene/sandbox/src/java/org/apache/lucene/geo/Line.java+++ b/lucene/core/src/java/org/apache/lucene/geo/Line.java@@ -27,7 +27,6 @@ import java.util.Arrays;* <li>All latitude/longitude values must be in decimal degrees.* <li>For more advanced GeoSpatial indexing and query operations see the {@code spatial-extras} module* </ol>- * @lucene.experimental*/public class Line {/** array of latitude coordinates */diff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/Line2D.java b/lucene/core/src/java/org/apache/lucene/geo/Line2D.javasimilarity index 100%rename from lucene/sandbox/src/java/org/apache/lucene/geo/Line2D.javarename to lucene/core/src/java/org/apache/lucene/geo/Line2D.javadiff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/Point2D.java b/lucene/core/src/java/org/apache/lucene/geo/Point2D.javasimilarity index 100%rename from lucene/sandbox/src/java/org/apache/lucene/geo/Point2D.javarename to lucene/core/src/java/org/apache/lucene/geo/Point2D.javadiff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/Rectangle2D.java b/lucene/core/src/java/org/apache/lucene/geo/Rectangle2D.javasimilarity index 100%rename from lucene/sandbox/src/java/org/apache/lucene/geo/Rectangle2D.javarename to lucene/core/src/java/org/apache/lucene/geo/Rectangle2D.javadiff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/SimpleWKTShapeParser.java b/lucene/core/src/java/org/apache/lucene/geo/SimpleWKTShapeParser.javasimilarity index 100%rename from lucene/sandbox/src/java/org/apache/lucene/geo/SimpleWKTShapeParser.javarename to lucene/core/src/java/org/apache/lucene/geo/SimpleWKTShapeParser.javadiff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/Tessellator.java b/lucene/core/src/java/org/apache/lucene/geo/Tessellator.javasimilarity index 99%rename from lucene/sandbox/src/java/org/apache/lucene/geo/Tessellator.javarename to lucene/core/src/java/org/apache/lucene/geo/Tessellator.javaindex bd9547575f4..12695d8dcb1 100644--- a/lucene/sandbox/src/java/org/apache/lucene/geo/Tessellator.java+++ b/lucene/core/src/java/org/apache/lucene/geo/Tessellator.java@@ -66,7 +66,7 @@ import static org.apache.lucene.geo.GeoUtils.orient;* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF* THIS SOFTWARE.*- * @lucene.experimental+ * @lucene.internal*/final public class Tessellator {// this is a dumb heuristic to control whether we cut over to sorted morton valuesdiff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/XYEncodingUtils.java b/lucene/core/src/java/org/apache/lucene/geo/XYEncodingUtils.javasimilarity index 99%rename from lucene/sandbox/src/java/org/apache/lucene/geo/XYEncodingUtils.javarename to lucene/core/src/java/org/apache/lucene/geo/XYEncodingUtils.javaindex 025504fd1e8..b2c1d011314 100644--- a/lucene/sandbox/src/java/org/apache/lucene/geo/XYEncodingUtils.java+++ b/lucene/core/src/java/org/apache/lucene/geo/XYEncodingUtils.java@@ -22,7 +22,7 @@ import org.apache.lucene.util.NumericUtils;/*** reusable cartesian geometry encoding methods*- * @lucene.experimental+ * @lucene.internal*/public final class XYEncodingUtils {diff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/XYLine.java b/lucene/core/src/java/org/apache/lucene/geo/XYLine.javasimilarity index 99%rename from lucene/sandbox/src/java/org/apache/lucene/geo/XYLine.javarename to lucene/core/src/java/org/apache/lucene/geo/XYLine.javaindex 9ece6594c3d..02b957ad025 100644--- a/lucene/sandbox/src/java/org/apache/lucene/geo/XYLine.java+++ b/lucene/core/src/java/org/apache/lucene/geo/XYLine.java@@ -21,8 +21,6 @@ import java.util.Arrays;/*** Represents a line in cartesian space. You can construct the Line directly with {@code double[]}, {@code double[]} x, y arrays* coordinates.- *- * @lucene.experimental*/public class XYLine {/** array of x coordinates */diff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/XYPolygon.java b/lucene/core/src/java/org/apache/lucene/geo/XYPolygon.javasimilarity index 99%rename from lucene/sandbox/src/java/org/apache/lucene/geo/XYPolygon.javarename to lucene/core/src/java/org/apache/lucene/geo/XYPolygon.javaindex 585283d1a70..f44fe9c12c8 100644--- a/lucene/sandbox/src/java/org/apache/lucene/geo/XYPolygon.java+++ b/lucene/core/src/java/org/apache/lucene/geo/XYPolygon.java@@ -21,8 +21,6 @@ import java.util.Arrays;/*** Represents a polygon in cartesian space. You can construct the Polygon directly with {@code double[]}, {@code double[]} x, y arrays* coordinates.- *- * @lucene.experimental*/public class XYPolygon {private final double[] x;diff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/XYPolygon2D.java b/lucene/core/src/java/org/apache/lucene/geo/XYPolygon2D.javasimilarity index 100%rename from lucene/sandbox/src/java/org/apache/lucene/geo/XYPolygon2D.javarename to lucene/core/src/java/org/apache/lucene/geo/XYPolygon2D.javadiff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/XYRectangle.java b/lucene/core/src/java/org/apache/lucene/geo/XYRectangle.javasimilarity index 100%rename from lucene/sandbox/src/java/org/apache/lucene/geo/XYRectangle.javarename to lucene/core/src/java/org/apache/lucene/geo/XYRectangle.javadiff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/XYRectangle2D.java b/lucene/core/src/java/org/apache/lucene/geo/XYRectangle2D.javasimilarity index 100%rename from lucene/sandbox/src/java/org/apache/lucene/geo/XYRectangle2D.javarename to lucene/core/src/java/org/apache/lucene/geo/XYRectangle2D.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/BaseLatLonShapeTestCase.java b/lucene/core/src/test/org/apache/lucene/document/BaseLatLonShapeTestCase.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/BaseLatLonShapeTestCase.javarename to lucene/core/src/test/org/apache/lucene/document/BaseLatLonShapeTestCase.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/BaseShapeEncodingTestCase.java b/lucene/core/src/test/org/apache/lucene/document/BaseShapeEncodingTestCase.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/BaseShapeEncodingTestCase.javarename to lucene/core/src/test/org/apache/lucene/document/BaseShapeEncodingTestCase.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/BaseShapeTestCase.java b/lucene/core/src/test/org/apache/lucene/document/BaseShapeTestCase.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/BaseShapeTestCase.javarename to lucene/core/src/test/org/apache/lucene/document/BaseShapeTestCase.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/BaseXYShapeTestCase.java b/lucene/core/src/test/org/apache/lucene/document/BaseXYShapeTestCase.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/BaseXYShapeTestCase.javarename to lucene/core/src/test/org/apache/lucene/document/BaseXYShapeTestCase.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonLineShapeQueries.java b/lucene/core/src/test/org/apache/lucene/document/TestLatLonLineShapeQueries.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonLineShapeQueries.javarename to lucene/core/src/test/org/apache/lucene/document/TestLatLonLineShapeQueries.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonMultiLineShapeQueries.java b/lucene/core/src/test/org/apache/lucene/document/TestLatLonMultiLineShapeQueries.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonMultiLineShapeQueries.javarename to lucene/core/src/test/org/apache/lucene/document/TestLatLonMultiLineShapeQueries.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonMultiPointShapeQueries.java b/lucene/core/src/test/org/apache/lucene/document/TestLatLonMultiPointShapeQueries.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonMultiPointShapeQueries.javarename to lucene/core/src/test/org/apache/lucene/document/TestLatLonMultiPointShapeQueries.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonMultiPolygonShapeQueries.java b/lucene/core/src/test/org/apache/lucene/document/TestLatLonMultiPolygonShapeQueries.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonMultiPolygonShapeQueries.javarename to lucene/core/src/test/org/apache/lucene/document/TestLatLonMultiPolygonShapeQueries.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonPointShapeQueries.java b/lucene/core/src/test/org/apache/lucene/document/TestLatLonPointShapeQueries.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonPointShapeQueries.javarename to lucene/core/src/test/org/apache/lucene/document/TestLatLonPointShapeQueries.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonPolygonShapeQueries.java b/lucene/core/src/test/org/apache/lucene/document/TestLatLonPolygonShapeQueries.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonPolygonShapeQueries.javarename to lucene/core/src/test/org/apache/lucene/document/TestLatLonPolygonShapeQueries.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonShape.java b/lucene/core/src/test/org/apache/lucene/document/TestLatLonShape.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonShape.javarename to lucene/core/src/test/org/apache/lucene/document/TestLatLonShape.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonShapeEncoding.java b/lucene/core/src/test/org/apache/lucene/document/TestLatLonShapeEncoding.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonShapeEncoding.javarename to lucene/core/src/test/org/apache/lucene/document/TestLatLonShapeEncoding.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestXYLineShapeQueries.java b/lucene/core/src/test/org/apache/lucene/document/TestXYLineShapeQueries.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestXYLineShapeQueries.javarename to lucene/core/src/test/org/apache/lucene/document/TestXYLineShapeQueries.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestXYMultiLineShapeQueries.java b/lucene/core/src/test/org/apache/lucene/document/TestXYMultiLineShapeQueries.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestXYMultiLineShapeQueries.javarename to lucene/core/src/test/org/apache/lucene/document/TestXYMultiLineShapeQueries.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestXYMultiPointShapeQueries.java b/lucene/core/src/test/org/apache/lucene/document/TestXYMultiPointShapeQueries.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestXYMultiPointShapeQueries.javarename to lucene/core/src/test/org/apache/lucene/document/TestXYMultiPointShapeQueries.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestXYMultiPolygonShapeQueries.java b/lucene/core/src/test/org/apache/lucene/document/TestXYMultiPolygonShapeQueries.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestXYMultiPolygonShapeQueries.javarename to lucene/core/src/test/org/apache/lucene/document/TestXYMultiPolygonShapeQueries.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestXYPointShapeQueries.java b/lucene/core/src/test/org/apache/lucene/document/TestXYPointShapeQueries.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestXYPointShapeQueries.javarename to lucene/core/src/test/org/apache/lucene/document/TestXYPointShapeQueries.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestXYPolygonShapeQueries.java b/lucene/core/src/test/org/apache/lucene/document/TestXYPolygonShapeQueries.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestXYPolygonShapeQueries.javarename to lucene/core/src/test/org/apache/lucene/document/TestXYPolygonShapeQueries.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestXYShape.java b/lucene/core/src/test/org/apache/lucene/document/TestXYShape.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestXYShape.javarename to lucene/core/src/test/org/apache/lucene/document/TestXYShape.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestXYShapeEncoding.java b/lucene/core/src/test/org/apache/lucene/document/TestXYShapeEncoding.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/document/TestXYShapeEncoding.javarename to lucene/core/src/test/org/apache/lucene/document/TestXYShapeEncoding.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/geo/ShapeTestUtil.java b/lucene/core/src/test/org/apache/lucene/geo/ShapeTestUtil.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/geo/ShapeTestUtil.javarename to lucene/core/src/test/org/apache/lucene/geo/ShapeTestUtil.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/geo/TestLine2D.java b/lucene/core/src/test/org/apache/lucene/geo/TestLine2D.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/geo/TestLine2D.javarename to lucene/core/src/test/org/apache/lucene/geo/TestLine2D.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/geo/TestPoint2D.java b/lucene/core/src/test/org/apache/lucene/geo/TestPoint2D.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/geo/TestPoint2D.javarename to lucene/core/src/test/org/apache/lucene/geo/TestPoint2D.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/geo/TestRectangle2D.java b/lucene/core/src/test/org/apache/lucene/geo/TestRectangle2D.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/geo/TestRectangle2D.javarename to lucene/core/src/test/org/apache/lucene/geo/TestRectangle2D.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/geo/TestSimpleWKTShapeParsing.java b/lucene/core/src/test/org/apache/lucene/geo/TestSimpleWKTShapeParsing.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/geo/TestSimpleWKTShapeParsing.javarename to lucene/core/src/test/org/apache/lucene/geo/TestSimpleWKTShapeParsing.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/geo/TestTessellator.java b/lucene/core/src/test/org/apache/lucene/geo/TestTessellator.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/geo/TestTessellator.javarename to lucene/core/src/test/org/apache/lucene/geo/TestTessellator.javadiff --git a/lucene/sandbox/src/test/org/apache/lucene/geo/TestXYRectangle2D.java b/lucene/core/src/test/org/apache/lucene/geo/TestXYRectangle2D.javasimilarity index 100%rename from lucene/sandbox/src/test/org/apache/lucene/geo/TestXYRectangle2D.javarename to lucene/core/src/test/org/apache/lucene/geo/TestXYRectangle2D.javadiff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/package.html b/lucene/sandbox/src/java/org/apache/lucene/geo/package.htmldeleted file mode 100644index e9859bd1c0d..00000000000--- a/lucene/sandbox/src/java/org/apache/lucene/geo/package.html+++ /dev/null@@ -1,31 +0,0 @@-<!--- Licensed to the Apache Software Foundation (ASF) under one or more- contributor license agreements. See the NOTICE file distributed with- this work for additional information regarding copyright ownership.- The ASF licenses this file to You under the Apache License, Version 2.0- (the "License"); you may not use this file except in compliance with- the License. You may obtain a copy of the License at-- http://www.apache.org/licenses/LICENSE-2.0-- Unless required by applicable law or agreed to in writing, software- distributed under the License is distributed on an "AS IS" BASIS,- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- See the License for the specific language governing permissions and- limitations under the License.- -->--<!doctype html public "-//w3c//dtd html 4.0 transitional//en">-<!-- not a package-info.java, because we already defined this package in core/ -->--<html>-<head>- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">-</head>-<body>-This package contains geo utility classes:-<ul>- <li>{@link org.apache.lucene.geo.Tessellator Tessellator} for decomposing shapes into a triangular mesh</li>-</ul>-</body>-</html>