From 4ba7bcb20f84d2ea0550e39d5c5b55aa8c01059f Mon Sep 17 00:00:00 2001 From: iverase Date: Mon, 9 Nov 2020 07:30:13 +0100 Subject: [PATCH] Repackage some classes in the Spatial plugin --- .../java/org/elasticsearch/xpack/spatial/SpatialPlugin.java | 2 +- .../{ => plain}/AbstractAtomicGeoShapeShapeFieldData.java | 4 +++- .../{ => plain}/AbstractLatLonShapeIndexFieldData.java | 4 +++- .../{ => plain}/LatLonShapeDVAtomicShapeFieldData.java | 4 +++- .../index/mapper/GeoShapeWithDocValuesFieldMapper.java | 2 +- .../aggregations/metrics/GeoShapeCentroidAggregator.java | 2 +- .../aggregations/metrics/GeoShapeCentroidAggregatorTests.java | 2 +- 7 files changed, 13 insertions(+), 7 deletions(-) rename x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/{ => plain}/AbstractAtomicGeoShapeShapeFieldData.java (87%) rename x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/{ => plain}/AbstractLatLonShapeIndexFieldData.java (95%) rename x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/{ => plain}/LatLonShapeDVAtomicShapeFieldData.java (92%) rename x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/{ => search}/aggregations/metrics/GeoShapeCentroidAggregator.java (99%) rename x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/{ => search}/aggregations/metrics/GeoShapeCentroidAggregatorTests.java (99%) diff --git a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/SpatialPlugin.java b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/SpatialPlugin.java index 940afdc458400..1f5564eab3991 100644 --- a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/SpatialPlugin.java +++ b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/SpatialPlugin.java @@ -32,7 +32,7 @@ import org.elasticsearch.xpack.spatial.action.SpatialInfoTransportAction; import org.elasticsearch.xpack.spatial.action.SpatialStatsTransportAction; import org.elasticsearch.xpack.spatial.action.SpatialUsageTransportAction; -import org.elasticsearch.xpack.spatial.aggregations.metrics.GeoShapeCentroidAggregator; +import org.elasticsearch.xpack.spatial.search.aggregations.metrics.GeoShapeCentroidAggregator; import org.elasticsearch.xpack.spatial.index.mapper.GeoShapeWithDocValuesFieldMapper; import org.elasticsearch.xpack.spatial.index.mapper.PointFieldMapper; import org.elasticsearch.xpack.spatial.index.mapper.ShapeFieldMapper; diff --git a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/AbstractAtomicGeoShapeShapeFieldData.java b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/plain/AbstractAtomicGeoShapeShapeFieldData.java similarity index 87% rename from x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/AbstractAtomicGeoShapeShapeFieldData.java rename to x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/plain/AbstractAtomicGeoShapeShapeFieldData.java index 32185760bd84c..262b03c2c7d0a 100644 --- a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/AbstractAtomicGeoShapeShapeFieldData.java +++ b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/plain/AbstractAtomicGeoShapeShapeFieldData.java @@ -4,11 +4,13 @@ * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.spatial.index.fielddata; +package org.elasticsearch.xpack.spatial.index.fielddata.plain; import org.apache.lucene.util.Accountable; import org.elasticsearch.index.fielddata.ScriptDocValues; import org.elasticsearch.index.fielddata.SortedBinaryDocValues; +import org.elasticsearch.xpack.spatial.index.fielddata.GeoShapeValues; +import org.elasticsearch.xpack.spatial.index.fielddata.LeafGeoShapeFieldData; import java.util.Collection; import java.util.Collections; diff --git a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/AbstractLatLonShapeIndexFieldData.java b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/plain/AbstractLatLonShapeIndexFieldData.java similarity index 95% rename from x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/AbstractLatLonShapeIndexFieldData.java rename to x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/plain/AbstractLatLonShapeIndexFieldData.java index 0dc41abfdf8de..df642588ca51c 100644 --- a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/AbstractLatLonShapeIndexFieldData.java +++ b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/plain/AbstractLatLonShapeIndexFieldData.java @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.spatial.index.fielddata; +package org.elasticsearch.xpack.spatial.index.fielddata.plain; import org.apache.lucene.index.DocValuesType; import org.apache.lucene.index.FieldInfo; @@ -21,6 +21,8 @@ import org.elasticsearch.search.aggregations.support.ValuesSourceType; import org.elasticsearch.search.sort.BucketedSort; import org.elasticsearch.search.sort.SortOrder; +import org.elasticsearch.xpack.spatial.index.fielddata.IndexGeoShapeFieldData; +import org.elasticsearch.xpack.spatial.index.fielddata.LeafGeoShapeFieldData; public abstract class AbstractLatLonShapeIndexFieldData implements IndexGeoShapeFieldData { protected final String fieldName; diff --git a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/LatLonShapeDVAtomicShapeFieldData.java b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/plain/LatLonShapeDVAtomicShapeFieldData.java similarity index 92% rename from x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/LatLonShapeDVAtomicShapeFieldData.java rename to x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/plain/LatLonShapeDVAtomicShapeFieldData.java index a1eed2faa24b8..97820a2025870 100644 --- a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/LatLonShapeDVAtomicShapeFieldData.java +++ b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/fielddata/plain/LatLonShapeDVAtomicShapeFieldData.java @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.spatial.index.fielddata; +package org.elasticsearch.xpack.spatial.index.fielddata.plain; import org.apache.lucene.index.BinaryDocValues; import org.apache.lucene.index.DocValues; @@ -12,6 +12,8 @@ import org.apache.lucene.util.Accountable; import org.apache.lucene.util.BytesRef; import org.elasticsearch.search.aggregations.support.ValuesSourceType; +import org.elasticsearch.xpack.spatial.index.fielddata.GeoShapeValues; +import org.elasticsearch.xpack.spatial.index.fielddata.GeometryDocValueReader; import org.elasticsearch.xpack.spatial.search.aggregations.support.GeoShapeValuesSourceType; import java.io.IOException; diff --git a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapper.java b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapper.java index 1f7627968a3e2..5199b9ba9482c 100644 --- a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapper.java +++ b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapper.java @@ -29,7 +29,7 @@ import org.elasticsearch.index.query.QueryShardContext; import org.elasticsearch.index.query.VectorGeoShapeQueryProcessor; import org.elasticsearch.search.lookup.SearchLookup; -import org.elasticsearch.xpack.spatial.index.fielddata.AbstractLatLonShapeIndexFieldData; +import org.elasticsearch.xpack.spatial.index.fielddata.plain.AbstractLatLonShapeIndexFieldData; import org.elasticsearch.xpack.spatial.search.aggregations.support.GeoShapeValuesSourceType; import java.util.Arrays; diff --git a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/aggregations/metrics/GeoShapeCentroidAggregator.java b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/search/aggregations/metrics/GeoShapeCentroidAggregator.java similarity index 99% rename from x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/aggregations/metrics/GeoShapeCentroidAggregator.java rename to x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/search/aggregations/metrics/GeoShapeCentroidAggregator.java index 8455fa4153f4c..8c6783c2b2394 100644 --- a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/aggregations/metrics/GeoShapeCentroidAggregator.java +++ b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/search/aggregations/metrics/GeoShapeCentroidAggregator.java @@ -5,7 +5,7 @@ */ -package org.elasticsearch.xpack.spatial.aggregations.metrics; +package org.elasticsearch.xpack.spatial.search.aggregations.metrics; import org.apache.lucene.index.LeafReaderContext; import org.elasticsearch.common.geo.GeoPoint; diff --git a/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/aggregations/metrics/GeoShapeCentroidAggregatorTests.java b/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/search/aggregations/metrics/GeoShapeCentroidAggregatorTests.java similarity index 99% rename from x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/aggregations/metrics/GeoShapeCentroidAggregatorTests.java rename to x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/search/aggregations/metrics/GeoShapeCentroidAggregatorTests.java index 132af642a62e7..eda3cf5ab4a2b 100644 --- a/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/aggregations/metrics/GeoShapeCentroidAggregatorTests.java +++ b/x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/search/aggregations/metrics/GeoShapeCentroidAggregatorTests.java @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.spatial.aggregations.metrics; +package org.elasticsearch.xpack.spatial.search.aggregations.metrics; import org.apache.lucene.document.Document; import org.apache.lucene.document.LatLonDocValuesField;