You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2016/03/01 18:07:16 UTC

[33/50] [abbrv] lucene-solr git commit: LUCENE-7015: Refactor spatial module to spatial-extras

LUCENE-7015: Refactor spatial module to spatial-extras

Refactors non GeoPoint* classes from existing spatial module to a new spatial-extras module. dev-tools, build, and project files are updated to include new spatial-extras module.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/89db4950
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/89db4950
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/89db4950

Branch: refs/heads/jira/SOLR-445
Commit: 89db4950b9e2aee605d4313592466ad699ea7523
Parents: a9aec24
Author: nknize <nk...@apache.org>
Authored: Mon Feb 29 16:15:16 2016 -0600
Committer: nknize <nk...@apache.org>
Committed: Mon Feb 29 16:18:39 2016 -0600

----------------------------------------------------------------------
 dev-tools/idea/.idea/ant.xml                    |     1 +
 dev-tools/idea/.idea/modules.xml                |     1 +
 dev-tools/idea/.idea/workspace.xml              |    41 +-
 .../idea/lucene/benchmark/src/benchmark.iml     |     2 +-
 .../lucene/spatial-extras/spatial-extras.iml    |    32 +
 dev-tools/idea/lucene/spatial/spatial.iml       |    15 -
 dev-tools/idea/solr/core/src/java/solr-core.iml |     2 +-
 .../idea/solr/core/src/solr-core-tests.iml      |     2 +-
 dev-tools/maven/lucene/pom.xml.template         |     1 +
 .../lucene/spatial-extras/pom.xml.template      |    62 +
 dev-tools/maven/lucene/spatial/pom.xml.template |     2 +-
 dev-tools/scripts/smokeTestRelease.py           |     2 +-
 lucene/benchmark/build.xml                      |     8 +-
 lucene/build.xml                                |     3 +-
 lucene/module-build.xml                         |    22 +
 lucene/spatial-extras/build.xml                 |    57 +
 lucene/spatial-extras/ivy.xml                   |    36 +
 .../apache/lucene/spatial/SpatialStrategy.java  |   149 +
 .../bbox/BBoxOverlapRatioValueSource.java       |   251 +
 .../spatial/bbox/BBoxSimilarityValueSource.java |   117 +
 .../lucene/spatial/bbox/BBoxStrategy.java       |   588 +
 .../lucene/spatial/bbox/BBoxValueSource.java    |   115 +
 .../lucene/spatial/bbox/package-info.java       |    23 +
 .../composite/CompositeSpatialStrategy.java     |   144 +
 .../spatial/composite/CompositeVerifyQuery.java |   120 +
 .../composite/IntersectsRPTVerifyQuery.java     |   235 +
 .../lucene/spatial/composite/package-info.java  |    19 +
 .../org/apache/lucene/spatial/package-info.java |    21 +
 .../spatial/prefix/AbstractPrefixTreeQuery.java |   133 +
 .../prefix/AbstractVisitingPrefixTreeQuery.java |   380 +
 .../prefix/BytesRefIteratorTokenStream.java     |    72 +
 .../spatial/prefix/CellToBytesRefIterator.java  |    49 +
 .../spatial/prefix/ContainsPrefixTreeQuery.java |   362 +
 .../spatial/prefix/HeatmapFacetCounter.java     |   310 +
 .../prefix/IntersectsPrefixTreeQuery.java       |    95 +
 .../prefix/NumberRangePrefixTreeStrategy.java   |   199 +
 .../PointPrefixTreeFieldCacheProvider.java      |    48 +
 .../spatial/prefix/PrefixTreeFacetCounter.java  |   201 +
 .../spatial/prefix/PrefixTreeStrategy.java      |   208 +
 .../prefix/RecursivePrefixTreeStrategy.java     |   192 +
 .../prefix/TermQueryPrefixTreeStrategy.java     |   111 +
 .../spatial/prefix/WithinPrefixTreeQuery.java   |   232 +
 .../lucene/spatial/prefix/package-info.java     |    21 +
 .../apache/lucene/spatial/prefix/tree/Cell.java |   109 +
 .../spatial/prefix/tree/CellIterator.java       |    76 +
 .../prefix/tree/DateRangePrefixTree.java        |   444 +
 .../spatial/prefix/tree/FilterCellIterator.java |    61 +
 .../spatial/prefix/tree/GeohashPrefixTree.java  |   162 +
 .../lucene/spatial/prefix/tree/LegacyCell.java  |   242 +
 .../spatial/prefix/tree/LegacyPrefixTree.java   |    84 +
 .../prefix/tree/NumberRangePrefixTree.java      |   989 +
 .../prefix/tree/PackedQuadPrefixTree.java       |   459 +
 .../spatial/prefix/tree/QuadPrefixTree.java     |   308 +
 .../prefix/tree/SingletonCellIterator.java      |    36 +
 .../spatial/prefix/tree/SpatialPrefixTree.java  |   117 +
 .../prefix/tree/SpatialPrefixTreeFactory.java   |    99 +
 .../spatial/prefix/tree/TreeCellIterator.java   |    87 +
 .../spatial/prefix/tree/package-info.java       |    30 +
 .../lucene/spatial/query/SpatialArgs.java       |   148 +
 .../lucene/spatial/query/SpatialArgsParser.java |   146 +
 .../lucene/spatial/query/SpatialOperation.java  |   179 +
 .../query/UnsupportedSpatialOperation.java      |    28 +
 .../lucene/spatial/query/package-info.java      |    21 +
 .../serialized/SerializedDVStrategy.java        |   278 +
 .../lucene/spatial/serialized/package-info.java |    21 +
 .../lucene/spatial/spatial4j/Geo3dShape.java    |   185 +
 .../lucene/spatial/spatial4j/package-info.java  |    19 +
 .../spatial/util/CachingDoubleValueSource.java  |    93 +
 .../util/DistanceToShapeValueSource.java        |   122 +
 .../spatial/util/ShapeAreaValueSource.java      |   116 +
 .../lucene/spatial/util/ShapeFieldCache.java    |    54 +
 .../ShapeFieldCacheDistanceValueSource.java     |   112 +
 .../spatial/util/ShapeFieldCacheProvider.java   |    87 +
 .../spatial/util/ShapePredicateValueSource.java |   113 +
 .../lucene/spatial/util/package-info.java       |    21 +
 .../spatial/vector/DistanceValueSource.java     |   120 +
 .../spatial/vector/PointVectorStrategy.java     |   178 +
 .../lucene/spatial/vector/package-info.java     |    21 +
 lucene/spatial-extras/src/java/overview.html    |    67 +
 .../src/test-files/cities-Intersects-BBox.txt   |     3 +
 .../src/test-files/data/LUCENE-4464.txt         |     3 +
 .../src/test-files/data/countries-bbox.txt      |   249 +
 .../src/test-files/data/countries-poly.txt      |   249 +
 .../src/test-files/data/geonames-IE.txt         | 22929 +++++++++++++++++
 .../src/test-files/data/simple-bbox.txt         |     4 +
 .../src/test-files/data/states-bbox.txt         |    52 +
 .../src/test-files/data/states-poly.txt         |    52 +
 .../src/test-files/data/world-cities-points.txt |  2680 ++
 .../src/test-files/simple-Queries-BBox.txt      |     9 +
 .../src/test-files/states-Intersects-BBox.txt   |     3 +
 .../src/test-files/states-IsWithin-BBox.txt     |     4 +
 .../lucene/spatial/DistanceStrategyTest.java    |   135 +
 .../apache/lucene/spatial/PortedSolr3Test.java  |   167 +
 .../lucene/spatial/QueryEqualsHashCodeTest.java |   119 +
 .../apache/lucene/spatial/SpatialArgsTest.java  |    50 +
 .../apache/lucene/spatial/SpatialExample.java   |   200 +
 .../lucene/spatial/SpatialMatchConcern.java     |    31 +
 .../apache/lucene/spatial/SpatialTestCase.java  |   280 +
 .../apache/lucene/spatial/SpatialTestData.java  |    71 +
 .../apache/lucene/spatial/SpatialTestQuery.java |    96 +
 .../apache/lucene/spatial/StrategyTestCase.java |   252 +
 .../lucene/spatial/TestTestFramework.java       |    68 +
 .../lucene/spatial/bbox/TestBBoxStrategy.java   |   301 +
 .../composite/CompositeStrategyTest.java        |   142 +
 .../prefix/CellToBytesRefIterator50.java        |    44 +
 .../spatial/prefix/DateNRStrategyTest.java      |   143 +
 .../spatial/prefix/HeatmapFacetCounterTest.java |   252 +
 .../lucene/spatial/prefix/JtsPolygonTest.java   |   117 +
 .../spatial/prefix/NumberRangeFacetsTest.java   |   275 +
 .../RandomSpatialOpFuzzyPrefixTree50Test.java   |    31 +
 .../RandomSpatialOpFuzzyPrefixTreeTest.java     |   533 +
 .../prefix/RandomSpatialOpStrategyTestCase.java |   141 +
 .../prefix/TestRecursivePrefixTreeStrategy.java |   122 +
 .../prefix/TestTermQueryPrefixGridStrategy.java |    63 +
 .../prefix/tree/DateRangePrefixTreeTest.java    |   175 +
 .../prefix/tree/SpatialPrefixTreeTest.java      |   114 +
 .../spatial/query/SpatialArgsParserTest.java    |    77 +
 .../serialized/SerializedStrategyTest.java      |    66 +
 .../lucene/spatial/spatial4j/Geo3dRptTest.java  |   227 +
 .../Geo3dShapeRectRelationTestCase.java         |   262 +
 .../Geo3dShapeSphereModelRectRelationTest.java  |    72 +
 .../Geo3dShapeWGS84ModelRectRelationTest.java   |    94 +
 .../spatial4j/RandomizedShapeTestCase.java      |   288 +
 .../spatial/spatial4j/geo3d/GeoPointTest.java   |    80 +
 .../spatial/vector/TestPointVectorStrategy.java |    63 +
 lucene/spatial/build.xml                        |    30 -
 lucene/spatial/ivy.xml                          |    15 -
 .../apache/lucene/spatial/SpatialStrategy.java  |   149 -
 .../bbox/BBoxOverlapRatioValueSource.java       |   251 -
 .../spatial/bbox/BBoxSimilarityValueSource.java |   117 -
 .../lucene/spatial/bbox/BBoxStrategy.java       |   591 -
 .../lucene/spatial/bbox/BBoxValueSource.java    |   115 -
 .../lucene/spatial/bbox/package-info.java       |    23 -
 .../composite/CompositeSpatialStrategy.java     |   144 -
 .../spatial/composite/CompositeVerifyQuery.java |   121 -
 .../composite/IntersectsRPTVerifyQuery.java     |   235 -
 .../lucene/spatial/composite/package-info.java  |    19 -
 .../geopoint/search/GeoPointDistanceQuery.java  |     5 +
 .../search/GeoPointDistanceRangeQuery.java      |     6 +
 .../geopoint/search/GeoPointInBBoxQuery.java    |    10 +
 .../geopoint/search/GeoPointInPolygonQuery.java |     6 +
 .../spatial/prefix/AbstractPrefixTreeQuery.java |   133 -
 .../prefix/AbstractVisitingPrefixTreeQuery.java |   380 -
 .../prefix/BytesRefIteratorTokenStream.java     |    72 -
 .../spatial/prefix/CellToBytesRefIterator.java  |    49 -
 .../spatial/prefix/ContainsPrefixTreeQuery.java |   362 -
 .../spatial/prefix/HeatmapFacetCounter.java     |   310 -
 .../prefix/IntersectsPrefixTreeQuery.java       |    95 -
 .../prefix/NumberRangePrefixTreeStrategy.java   |   199 -
 .../PointPrefixTreeFieldCacheProvider.java      |    48 -
 .../spatial/prefix/PrefixTreeFacetCounter.java  |   201 -
 .../spatial/prefix/PrefixTreeStrategy.java      |   208 -
 .../prefix/RecursivePrefixTreeStrategy.java     |   196 -
 .../prefix/TermQueryPrefixTreeStrategy.java     |   111 -
 .../spatial/prefix/WithinPrefixTreeQuery.java   |   233 -
 .../lucene/spatial/prefix/package-info.java     |    21 -
 .../apache/lucene/spatial/prefix/tree/Cell.java |   109 -
 .../spatial/prefix/tree/CellIterator.java       |    76 -
 .../prefix/tree/DateRangePrefixTree.java        |   444 -
 .../spatial/prefix/tree/FilterCellIterator.java |    61 -
 .../spatial/prefix/tree/GeohashPrefixTree.java  |   162 -
 .../lucene/spatial/prefix/tree/LegacyCell.java  |   242 -
 .../spatial/prefix/tree/LegacyPrefixTree.java   |    84 -
 .../prefix/tree/NumberRangePrefixTree.java      |   989 -
 .../prefix/tree/PackedQuadPrefixTree.java       |   459 -
 .../spatial/prefix/tree/QuadPrefixTree.java     |   308 -
 .../prefix/tree/SingletonCellIterator.java      |    36 -
 .../spatial/prefix/tree/SpatialPrefixTree.java  |   117 -
 .../prefix/tree/SpatialPrefixTreeFactory.java   |    99 -
 .../spatial/prefix/tree/TreeCellIterator.java   |    87 -
 .../spatial/prefix/tree/package-info.java       |    30 -
 .../lucene/spatial/query/SpatialArgs.java       |   148 -
 .../lucene/spatial/query/SpatialArgsParser.java |   146 -
 .../lucene/spatial/query/SpatialOperation.java  |   179 -
 .../query/UnsupportedSpatialOperation.java      |    28 -
 .../lucene/spatial/query/package-info.java      |    21 -
 .../serialized/SerializedDVStrategy.java        |   278 -
 .../lucene/spatial/serialized/package-info.java |    21 -
 .../lucene/spatial/spatial4j/Geo3dShape.java    |   185 -
 .../lucene/spatial/spatial4j/package-info.java  |    19 -
 .../spatial/util/CachingDoubleValueSource.java  |    93 -
 .../util/DistanceToShapeValueSource.java        |   122 -
 .../lucene/spatial/util/GeoEncodingUtils.java   |    26 +-
 .../org/apache/lucene/spatial/util/GeoRect.java |     7 +
 .../lucene/spatial/util/GeoRelationUtils.java   |     4 +
 .../spatial/util/ShapeAreaValueSource.java      |   116 -
 .../lucene/spatial/util/ShapeFieldCache.java    |    54 -
 .../ShapeFieldCacheDistanceValueSource.java     |   112 -
 .../spatial/util/ShapeFieldCacheProvider.java   |    87 -
 .../spatial/util/ShapePredicateValueSource.java |   113 -
 .../spatial/vector/DistanceValueSource.java     |   120 -
 .../spatial/vector/PointVectorStrategy.java     |   182 -
 .../lucene/spatial/vector/package-info.java     |    21 -
 lucene/spatial/src/java/overview.html           |    50 +-
 .../src/test-files/cities-Intersects-BBox.txt   |     3 -
 .../spatial/src/test-files/data/LUCENE-4464.txt |     3 -
 .../src/test-files/data/countries-bbox.txt      |   249 -
 .../src/test-files/data/countries-poly.txt      |   249 -
 .../spatial/src/test-files/data/geonames-IE.txt | 22929 -----------------
 .../spatial/src/test-files/data/simple-bbox.txt |     5 -
 .../spatial/src/test-files/data/states-bbox.txt |    52 -
 .../spatial/src/test-files/data/states-poly.txt |    52 -
 .../src/test-files/data/world-cities-points.txt |  2680 --
 .../src/test-files/simple-Queries-BBox.txt      |     9 -
 .../src/test-files/states-Intersects-BBox.txt   |     3 -
 .../src/test-files/states-IsWithin-BBox.txt     |     4 -
 .../lucene/spatial/DistanceStrategyTest.java    |   135 -
 .../apache/lucene/spatial/PortedSolr3Test.java  |   167 -
 .../lucene/spatial/QueryEqualsHashCodeTest.java |   119 -
 .../apache/lucene/spatial/SpatialArgsTest.java  |    50 -
 .../apache/lucene/spatial/SpatialExample.java   |   200 -
 .../lucene/spatial/SpatialMatchConcern.java     |    31 -
 .../apache/lucene/spatial/SpatialTestCase.java  |   281 -
 .../apache/lucene/spatial/SpatialTestData.java  |    71 -
 .../apache/lucene/spatial/SpatialTestQuery.java |    96 -
 .../apache/lucene/spatial/StrategyTestCase.java |   252 -
 .../lucene/spatial/TestTestFramework.java       |    68 -
 .../lucene/spatial/bbox/TestBBoxStrategy.java   |   301 -
 .../composite/CompositeStrategyTest.java        |   142 -
 .../prefix/CellToBytesRefIterator50.java        |    44 -
 .../spatial/prefix/DateNRStrategyTest.java      |   143 -
 .../spatial/prefix/HeatmapFacetCounterTest.java |   252 -
 .../lucene/spatial/prefix/JtsPolygonTest.java   |   117 -
 .../spatial/prefix/NumberRangeFacetsTest.java   |   275 -
 .../RandomSpatialOpFuzzyPrefixTree50Test.java   |    31 -
 .../RandomSpatialOpFuzzyPrefixTreeTest.java     |   533 -
 .../prefix/RandomSpatialOpStrategyTestCase.java |   141 -
 .../prefix/TestRecursivePrefixTreeStrategy.java |   122 -
 .../prefix/TestTermQueryPrefixGridStrategy.java |    63 -
 .../prefix/tree/DateRangePrefixTreeTest.java    |   175 -
 .../prefix/tree/SpatialPrefixTreeTest.java      |   114 -
 .../spatial/query/SpatialArgsParserTest.java    |    77 -
 .../serialized/SerializedStrategyTest.java      |    66 -
 .../lucene/spatial/spatial4j/Geo3dRptTest.java  |   227 -
 .../Geo3dShapeRectRelationTestCase.java         |   264 -
 .../Geo3dShapeSphereModelRectRelationTest.java  |    72 -
 .../Geo3dShapeWGS84ModelRectRelationTest.java   |    95 -
 .../spatial4j/RandomizedShapeTestCase.java      |   289 -
 .../spatial/spatial4j/geo3d/GeoPointTest.java   |    82 -
 .../spatial/vector/TestPointVectorStrategy.java |    63 -
 solr/common-build.xml                           |     8 +-
 241 files changed, 41526 insertions(+), 41272 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/dev-tools/idea/.idea/ant.xml
----------------------------------------------------------------------
diff --git a/dev-tools/idea/.idea/ant.xml b/dev-tools/idea/.idea/ant.xml
index 2cd14fd..8d454ad 100644
--- a/dev-tools/idea/.idea/ant.xml
+++ b/dev-tools/idea/.idea/ant.xml
@@ -31,6 +31,7 @@
     <buildFile url="file://$PROJECT_DIR$/lucene/replicator/build.xml" />
     <buildFile url="file://$PROJECT_DIR$/lucene/sandbox/build.xml" />
     <buildFile url="file://$PROJECT_DIR$/lucene/spatial/build.xml" />
+    <buildFile url="file://$PROJECT_DIR$/lucene/spatial-extras/build.xml" />
     <buildFile url="file://$PROJECT_DIR$/lucene/suggest/build.xml" />
     <buildFile url="file://$PROJECT_DIR$/lucene/test-framework/build.xml" />
     <buildFile url="file://$PROJECT_DIR$/lucene/tools/build.xml" />

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/dev-tools/idea/.idea/modules.xml
----------------------------------------------------------------------
diff --git a/dev-tools/idea/.idea/modules.xml b/dev-tools/idea/.idea/modules.xml
index 4497f18..75da2f5 100644
--- a/dev-tools/idea/.idea/modules.xml
+++ b/dev-tools/idea/.idea/modules.xml
@@ -36,6 +36,7 @@
       <module group="Lucene/Other" filepath="$PROJECT_DIR$/lucene/replicator/replicator.iml" />
       <module group="Lucene/Other" filepath="$PROJECT_DIR$/lucene/sandbox/sandbox.iml" />
       <module group="Lucene/Other" filepath="$PROJECT_DIR$/lucene/spatial/spatial.iml" />
+      <module group="Lucene/Other" filepath="$PROJECT_DIR$/lucene/spatial-extras/spatial-extras.iml" />
       <module group="Lucene/Other" filepath="$PROJECT_DIR$/lucene/spatial3d/spatial3d.iml" />
       <module group="Lucene/Other" filepath="$PROJECT_DIR$/lucene/suggest/suggest.iml" />
       <module group="Lucene/Other" filepath="$PROJECT_DIR$/lucene/tools/tools.iml" />

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/dev-tools/idea/.idea/workspace.xml
----------------------------------------------------------------------
diff --git a/dev-tools/idea/.idea/workspace.xml b/dev-tools/idea/.idea/workspace.xml
index 423350b..a7c68de 100644
--- a/dev-tools/idea/.idea/workspace.xml
+++ b/dev-tools/idea/.idea/workspace.xml
@@ -204,6 +204,14 @@
       <option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
       <patterns><pattern testClass=".*\.Test[^.]*|.*\.[^.]*Test" /></patterns>
     </configuration>
+    <configuration default="false" name="Module spatial-extras" type="JUnit" factoryName="JUnit">
+      <module name="spatial-extras" />
+      <option name="TEST_OBJECT" value="pattern" />
+      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/idea-build/lucene/spatial-extras" />
+      <option name="VM_PARAMETERS" value="-ea -DtempDir=temp" />
+      <option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
+      <patterns><pattern testClass=".*\.Test[^.]*|.*\.[^.]*Test" /></patterns>
+    </configuration>
     <configuration default="false" name="Module spatial3d" type="JUnit" factoryName="JUnit">
       <module name="spatial3d" />
       <option name="TEST_OBJECT" value="pattern" />
@@ -333,7 +341,7 @@
       <patterns><pattern testClass=".*\.Test[^.]*|.*\.[^.]*Test" /></patterns>
     </configuration>
  
-    <list size="40">
+    <list size="41">
       <item index="0" class="java.lang.String" itemvalue="JUnit.Lucene core" />
       <item index="1" class="java.lang.String" itemvalue="JUnit.Module analyzers-common" />
       <item index="2" class="java.lang.String" itemvalue="JUnit.Module analyzers-icu" />
@@ -359,21 +367,22 @@
       <item index="22" class="java.lang.String" itemvalue="JUnit.Module replicator" />
       <item index="23" class="java.lang.String" itemvalue="JUnit.Module sandbox" />
       <item index="24" class="java.lang.String" itemvalue="JUnit.Module spatial" />
-      <item index="25" class="java.lang.String" itemvalue="JUnit.Module spatial3d" />
-      <item index="26" class="java.lang.String" itemvalue="JUnit.Module suggest" />
-      <item index="27" class="java.lang.String" itemvalue="JUnit.Solr core" />
-      <item index="28" class="java.lang.String" itemvalue="JUnit.Solr analysis-extras contrib" />
-      <item index="29" class="java.lang.String" itemvalue="JUnit.Solr clustering contrib" />
-      <item index="30" class="java.lang.String" itemvalue="JUnit.Solr dataimporthandler contrib" />
-      <item index="31" class="java.lang.String" itemvalue="JUnit.Solr dataimporthandler-extras contrib" />
-      <item index="32" class="java.lang.String" itemvalue="JUnit.Solr extraction contrib" />
-      <item index="33" class="java.lang.String" itemvalue="JUnit.Solr map-reduce contrib" />
-      <item index="34" class="java.lang.String" itemvalue="JUnit.Solr morphlines-cell contrib" />
-      <item index="35" class="java.lang.String" itemvalue="JUnit.Solr morphlines-core contrib" />
-      <item index="36" class="java.lang.String" itemvalue="JUnit.Solr langid contrib" />
-      <item index="37" class="java.lang.String" itemvalue="JUnit.Solr uima contrib" />
-      <item index="38" class="java.lang.String" itemvalue="JUnit.Solr velocity contrib" />
-      <item index="39" class="java.lang.String" itemvalue="JUnit.Solrj" />
+      <item index="25" class="java.lang.String" itemvalue="JUnit.Module spatial-extras" />
+      <item index="26" class="java.lang.String" itemvalue="JUnit.Module spatial3d" />
+      <item index="27" class="java.lang.String" itemvalue="JUnit.Module suggest" />
+      <item index="28" class="java.lang.String" itemvalue="JUnit.Solr core" />
+      <item index="29" class="java.lang.String" itemvalue="JUnit.Solr analysis-extras contrib" />
+      <item index="30" class="java.lang.String" itemvalue="JUnit.Solr clustering contrib" />
+      <item index="31" class="java.lang.String" itemvalue="JUnit.Solr dataimporthandler contrib" />
+      <item index="32" class="java.lang.String" itemvalue="JUnit.Solr dataimporthandler-extras contrib" />
+      <item index="33" class="java.lang.String" itemvalue="JUnit.Solr extraction contrib" />
+      <item index="34" class="java.lang.String" itemvalue="JUnit.Solr map-reduce contrib" />
+      <item index="35" class="java.lang.String" itemvalue="JUnit.Solr morphlines-cell contrib" />
+      <item index="36" class="java.lang.String" itemvalue="JUnit.Solr morphlines-core contrib" />
+      <item index="37" class="java.lang.String" itemvalue="JUnit.Solr langid contrib" />
+      <item index="38" class="java.lang.String" itemvalue="JUnit.Solr uima contrib" />
+      <item index="39" class="java.lang.String" itemvalue="JUnit.Solr velocity contrib" />
+      <item index="40" class="java.lang.String" itemvalue="JUnit.Solrj" />
     </list>
   </component>
 </project>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/dev-tools/idea/lucene/benchmark/src/benchmark.iml
----------------------------------------------------------------------
diff --git a/dev-tools/idea/lucene/benchmark/src/benchmark.iml b/dev-tools/idea/lucene/benchmark/src/benchmark.iml
index cecd54f..509d5ec 100644
--- a/dev-tools/idea/lucene/benchmark/src/benchmark.iml
+++ b/dev-tools/idea/lucene/benchmark/src/benchmark.iml
@@ -24,7 +24,7 @@
     <orderEntry type="library" scope="TEST" name="JUnit" level="project" />
     <orderEntry type="module" scope="TEST" module-name="lucene-test-framework" />
     <orderEntry type="module" scope="TEST" module-name="benchmark-conf" />
-    <orderEntry type="module" module-name="spatial" />
+    <orderEntry type="module" module-name="spatial-extras" />
     <orderEntry type="module" module-name="facet" />
     <orderEntry type="module" module-name="highlighter" />
     <orderEntry type="module" module-name="icu" />

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/dev-tools/idea/lucene/spatial-extras/spatial-extras.iml
----------------------------------------------------------------------
diff --git a/dev-tools/idea/lucene/spatial-extras/spatial-extras.iml b/dev-tools/idea/lucene/spatial-extras/spatial-extras.iml
new file mode 100644
index 0000000..5694371
--- /dev/null
+++ b/dev-tools/idea/lucene/spatial-extras/spatial-extras.iml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/../../idea-build/lucene/spatial-extras/classes/java" />
+    <output-test url="file://$MODULE_DIR$/../../idea-build/lucene/spatial-extras/classes/test" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test-files" type="java-test-resource" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module-library" exported="">
+      <library>
+        <CLASSES>
+          <root url="file://$MODULE_DIR$/lib" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+        <jarDirectory url="file://$MODULE_DIR$/lib" recursive="false" />
+      </library>
+    </orderEntry>
+    <orderEntry type="library" scope="TEST" name="JUnit" level="project" />
+    <orderEntry type="module" scope="TEST" module-name="lucene-test-framework" />
+    <orderEntry type="module" module-name="lucene-core" />
+    <orderEntry type="module" module-name="queries" />
+    <orderEntry type="module" module-name="misc" />
+    <orderEntry type="module" module-name="spatial3d" />
+    <orderEntry type="module" module-name="analysis-common" scope="TEST"/>
+  </component>
+</module>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/dev-tools/idea/lucene/spatial/spatial.iml
----------------------------------------------------------------------
diff --git a/dev-tools/idea/lucene/spatial/spatial.iml b/dev-tools/idea/lucene/spatial/spatial.iml
index f7cc723..f264467 100644
--- a/dev-tools/idea/lucene/spatial/spatial.iml
+++ b/dev-tools/idea/lucene/spatial/spatial.iml
@@ -7,27 +7,12 @@
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test-files" type="java-test-resource" />
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module-library" exported="">
-      <library>
-        <CLASSES>
-          <root url="file://$MODULE_DIR$/lib" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-        <jarDirectory url="file://$MODULE_DIR$/lib" recursive="false" />
-      </library>
-    </orderEntry>
     <orderEntry type="library" scope="TEST" name="JUnit" level="project" />
     <orderEntry type="module" scope="TEST" module-name="lucene-test-framework" />
     <orderEntry type="module" module-name="lucene-core" />
-    <orderEntry type="module" module-name="queries" />
-    <orderEntry type="module" module-name="misc" />
-    <orderEntry type="module" module-name="spatial3d" />
-    <orderEntry type="module" module-name="analysis-common" scope="TEST"/>
   </component>
 </module>
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/dev-tools/idea/solr/core/src/java/solr-core.iml
----------------------------------------------------------------------
diff --git a/dev-tools/idea/solr/core/src/java/solr-core.iml b/dev-tools/idea/solr/core/src/java/solr-core.iml
index 3ffd185..f03268c 100644
--- a/dev-tools/idea/solr/core/src/java/solr-core.iml
+++ b/dev-tools/idea/solr/core/src/java/solr-core.iml
@@ -16,7 +16,7 @@
     <orderEntry type="library" name="Solr example library" level="project" />
     <orderEntry type="module" module-name="solrj" />
     <orderEntry type="module" module-name="kuromoji" />
-    <orderEntry type="module" module-name="spatial" />
+    <orderEntry type="module" module-name="spatial-extras" />
     <orderEntry type="module" module-name="grouping" />
     <orderEntry type="module" module-name="highlighter" />
     <orderEntry type="module" module-name="icu" />

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/dev-tools/idea/solr/core/src/solr-core-tests.iml
----------------------------------------------------------------------
diff --git a/dev-tools/idea/solr/core/src/solr-core-tests.iml b/dev-tools/idea/solr/core/src/solr-core-tests.iml
index eb27c57..c9f722a 100644
--- a/dev-tools/idea/solr/core/src/solr-core-tests.iml
+++ b/dev-tools/idea/solr/core/src/solr-core-tests.iml
@@ -25,7 +25,7 @@
     <orderEntry type="module" scope="TEST" module-name="queryparser" />
     <orderEntry type="module" scope="TEST" module-name="queries" />
     <orderEntry type="module" scope="TEST" module-name="suggest" />
-    <orderEntry type="module" scope="TEST" module-name="spatial" />
+    <orderEntry type="module" scope="TEST" module-name="spatial-extras" />
     <orderEntry type="module" scope="TEST" module-name="misc" />
     <orderEntry type="module" scope="TEST" module-name="join" />
     <orderEntry type="module" scope="TEST" module-name="expressions" />

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/dev-tools/maven/lucene/pom.xml.template
----------------------------------------------------------------------
diff --git a/dev-tools/maven/lucene/pom.xml.template b/dev-tools/maven/lucene/pom.xml.template
index f49a60e..536290b 100644
--- a/dev-tools/maven/lucene/pom.xml.template
+++ b/dev-tools/maven/lucene/pom.xml.template
@@ -60,6 +60,7 @@
     <module>replicator</module>
     <module>sandbox</module>
     <module>spatial</module>
+    <module>spatial-extras</module>
     <module>spatial3d</module>
     <module>suggest</module>
   </modules>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/dev-tools/maven/lucene/spatial-extras/pom.xml.template
----------------------------------------------------------------------
diff --git a/dev-tools/maven/lucene/spatial-extras/pom.xml.template b/dev-tools/maven/lucene/spatial-extras/pom.xml.template
new file mode 100644
index 0000000..58a5aa8
--- /dev/null
+++ b/dev-tools/maven/lucene/spatial-extras/pom.xml.template
@@ -0,0 +1,62 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <!--
+    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.
+  -->
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.lucene</groupId>
+    <artifactId>lucene-parent</artifactId>
+    <version>@version@</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+  <groupId>org.apache.lucene</groupId>
+  <artifactId>lucene-spatial-extras</artifactId>
+  <packaging>jar</packaging>
+  <name>Lucene Spatial Extras</name>
+  <description>
+    Advanced Spatial Shape Strategies for Apache Lucene
+  </description>
+  <properties>
+    <module-directory>lucene/spatial-extras</module-directory>
+    <relative-top-level>../../..</relative-top-level>
+    <module-path>${relative-top-level}/${module-directory}</module-path>
+  </properties>
+  <dependencies>
+    <dependency>
+      <!-- lucene-test-framework dependency must be declared before lucene-core -->
+      <groupId>org.apache.lucene</groupId>
+      <artifactId>lucene-test-framework</artifactId>
+      <scope>test</scope>
+    </dependency>
+@lucene-spatial-extras.internal.dependencies@
+@lucene-spatial-extras.external.dependencies@
+@lucene-spatial-extras.internal.test.dependencies@
+@lucene-spatial-extras.external.test.dependencies@
+  </dependencies>
+  <build>
+    <sourceDirectory>${module-path}/src/java</sourceDirectory>
+    <testSourceDirectory>${module-path}/src/test</testSourceDirectory>
+    <testResources>
+      <testResource>
+        <directory>${module-path}/src/test-files</directory>
+      </testResource>
+    </testResources>
+  </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/dev-tools/maven/lucene/spatial/pom.xml.template
----------------------------------------------------------------------
diff --git a/dev-tools/maven/lucene/spatial/pom.xml.template b/dev-tools/maven/lucene/spatial/pom.xml.template
index d4c5cd2..5f6420a 100644
--- a/dev-tools/maven/lucene/spatial/pom.xml.template
+++ b/dev-tools/maven/lucene/spatial/pom.xml.template
@@ -31,7 +31,7 @@
   <packaging>jar</packaging>
   <name>Lucene Spatial</name>
   <description>    
-  	Spatial Strategies for Apache Lucene
+	Geospatial Indexing and Query for Apache Lucene
   </description>
   <properties>
     <module-directory>lucene/spatial</module-directory>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/dev-tools/scripts/smokeTestRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.py
index d76e8fa..aa367f6 100644
--- a/dev-tools/scripts/smokeTestRelease.py
+++ b/dev-tools/scripts/smokeTestRelease.py
@@ -643,7 +643,7 @@ def verifyUnpacked(java, project, artifact, unpackPath, gitRevision, version, te
 
   if project == 'lucene':
     # TODO: clean this up to not be a list of modules that we must maintain
-    extras = ('analysis', 'backward-codecs', 'benchmark', 'classification', 'codecs', 'core', 'demo', 'docs', 'expressions', 'facet', 'grouping', 'highlighter', 'join', 'memory', 'misc', 'queries', 'queryparser', 'replicator', 'sandbox', 'spatial', 'spatial3d', 'suggest', 'test-framework', 'licenses')
+    extras = ('analysis', 'backward-codecs', 'benchmark', 'classification', 'codecs', 'core', 'demo', 'docs', 'expressions', 'facet', 'grouping', 'highlighter', 'join', 'memory', 'misc', 'queries', 'queryparser', 'replicator', 'sandbox', 'spatial', 'spatial-extras', 'spatial3d', 'suggest', 'test-framework', 'licenses')
     if isSrc:
       extras += ('build.xml', 'common-build.xml', 'module-build.xml', 'ivy-settings.xml', 'ivy-versions.properties', 'ivy-ignore-conflicts.properties', 'version.properties', 'tools', 'site')
   else:

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/lucene/benchmark/build.xml
----------------------------------------------------------------------
diff --git a/lucene/benchmark/build.xml b/lucene/benchmark/build.xml
index cd47287..49a9f4c 100644
--- a/lucene/benchmark/build.xml
+++ b/lucene/benchmark/build.xml
@@ -171,7 +171,7 @@
       <pathelement path="${analyzers-common.jar}"/>
       <pathelement path="${queryparser.jar}"/>
       <pathelement path="${facet.jar}"/>
-      <pathelement path="${spatial.jar}"/>
+      <pathelement path="${spatial-extras.jar}"/>
       <pathelement path="${queries.jar}"/>
       <pathelement path="${codecs.jar}"/>
       <pathelement path="${join.jar}"/>
@@ -185,7 +185,7 @@
     </path>
 
     <target name="javadocs" depends="javadocs-memory,javadocs-highlighter,javadocs-analyzers-common,
-      javadocs-queryparser,javadocs-facet,javadocs-spatial,compile-core,check-javadocs-uptodate" 
+      javadocs-queryparser,javadocs-facet,javadocs-spatial-extras,compile-core,check-javadocs-uptodate"
             unless="javadocs-uptodate-${name}">
     <invoke-module-javadoc>
       <links>
@@ -194,7 +194,7 @@
         <link href="../analyzers-common"/>
         <link href="../queryparser"/>
         <link href="../facet"/>
-        <link href="../spatial"/>
+        <link href="../spatial-extras"/>
       </links>
     </invoke-module-javadoc>
     </target>
@@ -277,7 +277,7 @@
       <echo>Benchmark output in JIRA table format is in file: ${shingle.jira.output.file}</echo>
     </target>
 
-    <target name="init" depends="module-build.init,jar-memory,jar-highlighter,jar-analyzers-common,jar-queryparser,jar-facet,jar-spatial,jar-codecs,jar-join"/>
+    <target name="init" depends="module-build.init,jar-memory,jar-highlighter,jar-analyzers-common,jar-queryparser,jar-facet,jar-spatial-extras,jar-codecs,jar-join"/>
   
     <target name="compile-test" depends="copy-alg-files-for-testing,module-build.compile-test"/>
     <target name="copy-alg-files-for-testing" description="copy .alg files as resources for testing">

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/lucene/build.xml
----------------------------------------------------------------------
diff --git a/lucene/build.xml b/lucene/build.xml
index 9bd4492..117059e 100644
--- a/lucene/build.xml
+++ b/lucene/build.xml
@@ -179,7 +179,8 @@
     <!-- queries: problems -->
     <!-- queryparser: problems -->
     <!-- sandbox: problems -->
-    <!-- spatial: problems -->
+    <check-missing-javadocs dir="build/docs/spatial" level="method"/>
+    <!-- spatial-extras: problems -->
     <check-missing-javadocs dir="build/docs/suggest" level="method"/>
     <!-- test-framework: problems -->
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/lucene/module-build.xml
----------------------------------------------------------------------
diff --git a/lucene/module-build.xml b/lucene/module-build.xml
index 0263101..d48ae37 100644
--- a/lucene/module-build.xml
+++ b/lucene/module-build.xml
@@ -640,6 +640,28 @@
     <property name="spatial-javadocs.uptodate" value="true"/>
   </target>
 
+  <property name="spatial-extras.jar" value="${common.dir}/build/spatial-extras/lucene-spatial-extras-${version}.jar"/>
+  <target name="check-spatial-extras-uptodate" unless="spatial-extras.uptodate">
+    <module-uptodate name="spatial-extras" jarfile="${spatial-extras.jar}" property="spatial-extras.uptodate"/>
+  </target>
+  <target name="jar-spatial-extras" unless="spatial-extras.uptodate" depends="check-spatial-extras-uptodate">
+    <ant dir="${common.dir}/spatial-extras" target="jar-core" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+    <property name="spatial-extras.uptodate" value="true"/>
+  </target>
+
+  <property name="spatial-extras-javadoc.jar" value="${common.dir}/build/spatial-extras/lucene-spatial-extras-${version}-javadoc.jar"/>
+  <target name="check-spatial-extras-javadocs-uptodate" unless="spatial-extras-javadocs.uptodate">
+    <module-uptodate name="spatial-extras" jarfile="${spatial-extras-javadoc.jar}" property="spatial-extras-javadocs.uptodate"/>
+  </target>
+  <target name="javadocs-spatial-extras" unless="spatial-extras-javadocs.uptodate" depends="check-spatial-extras-javadocs-uptodate">
+    <ant dir="${common.dir}/spatial-extras" target="javadocs" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+    <property name="spatial-extras-javadocs.uptodate" value="true"/>
+  </target>
+
   <property name="suggest.jar" value="${common.dir}/build/suggest/lucene-suggest-${version}.jar"/>
   <target name="check-suggest-uptodate" unless="suggest.uptodate">
     <module-uptodate name="suggest" jarfile="${suggest.jar}" property="suggest.uptodate"/>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/lucene/spatial-extras/build.xml
----------------------------------------------------------------------
diff --git a/lucene/spatial-extras/build.xml b/lucene/spatial-extras/build.xml
new file mode 100644
index 0000000..a77f9ea
--- /dev/null
+++ b/lucene/spatial-extras/build.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+<project name="spatial-extras" default="default">
+  <description>
+    Geospatial search
+  </description>
+
+  <import file="../module-build.xml"/>
+
+  <path id="spatialjar">
+     <fileset dir="lib"/>
+  </path>
+
+  <path id="classpath">
+    <path refid="base.classpath"/>
+    <path refid="spatialjar"/>
+    <pathelement path="${queries.jar}" />
+    <pathelement path="${misc.jar}" />
+    <pathelement path="${spatial3d.jar}" />
+  </path>
+
+  <path id="test.classpath">
+    <path refid="test.base.classpath" />
+    <path refid="spatialjar"/>
+    <pathelement path="src/test-files" />
+  </path>
+
+  <target name="compile-core" depends="jar-queries,jar-misc,jar-spatial3d,common.compile-core" />
+
+  <target name="javadocs" depends="javadocs-queries,javadocs-misc,javadocs-spatial3d,compile-core,check-javadocs-uptodate"
+          unless="javadocs-uptodate-${name}">
+    <invoke-module-javadoc>
+      <links>
+        <link href="../queries"/>
+        <link href="../misc"/>
+        <link href="../spatial3d"/>
+      </links>
+    </invoke-module-javadoc>
+  </target>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/lucene/spatial-extras/ivy.xml
----------------------------------------------------------------------
diff --git a/lucene/spatial-extras/ivy.xml b/lucene/spatial-extras/ivy.xml
new file mode 100644
index 0000000..4fef30e
--- /dev/null
+++ b/lucene/spatial-extras/ivy.xml
@@ -0,0 +1,36 @@
+<!--
+   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.
+-->
+<ivy-module version="2.0"  xmlns:maven="http://ant.apache.org/ivy/maven">
+  <info organisation="org.apache.lucene" module="spatial-extras"/>
+  <configurations defaultconfmapping="compile->master;test->master">
+    <conf name="compile" transitive="false"/>
+    <conf name="test" transitive="false"/>
+  </configurations>
+  <dependencies>
+    <dependency org="com.spatial4j" name="spatial4j" rev="${/com.spatial4j/spatial4j}" conf="compile"/>
+
+    <dependency org="com.spatial4j" name="spatial4j" rev="${/com.spatial4j/spatial4j}" conf="test">
+      <artifact name="spatial4j" type="test" ext="jar" maven:classifier="tests" />
+    </dependency>
+
+    <dependency org="org.slf4j" name="slf4j-api" rev="${/org.slf4j/slf4j-api}" conf="test"/>
+
+    <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
+  </dependencies>
+</ivy-module>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/lucene/spatial-extras/src/java/org/apache/lucene/spatial/SpatialStrategy.java
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..f433c11
--- /dev/null
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/SpatialStrategy.java
@@ -0,0 +1,149 @@
+/*
+ * 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.
+ */
+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.apache.lucene.document.Field;
+import org.apache.lucene.queries.function.ValueSource;
+import org.apache.lucene.queries.function.valuesource.ReciprocalFloatFunction;
+import org.apache.lucene.search.Query;
+import org.apache.lucene.spatial.query.SpatialArgs;
+
+/**
+ * The SpatialStrategy encapsulates an approach to indexing and searching based
+ * on shapes.
+ * <p>
+ * Different implementations will support different features. A strategy should
+ * document these common elements:
+ * <ul>
+ *   <li>Can it index more than one shape per field?</li>
+ *   <li>What types of shapes can be indexed?</li>
+ *   <li>What types of query shapes can be used?</li>
+ *   <li>What types of query operations are supported?
+ *   This might vary per shape.</li>
+ *   <li>Does it use some type of cache?  When?
+ * </ul>
+ * If a strategy only supports certain shapes at index or query time, then in
+ * general it will throw an exception if given an incompatible one.  It will not
+ * be coerced into compatibility.
+ * <p>
+ * Note that a SpatialStrategy is not involved with the Lucene stored field
+ * values of shapes, which is immaterial to indexing and search.
+ * <p>
+ * Thread-safe.
+ * <p>
+ * This API is marked as experimental, however it is quite stable.
+ *
+ * @lucene.experimental
+ */
+public abstract class SpatialStrategy {
+
+  protected final SpatialContext ctx;
+  private final String fieldName;
+
+  /**
+   * Constructs the spatial strategy with its mandatory arguments.
+   */
+  public SpatialStrategy(SpatialContext ctx, String fieldName) {
+    if (ctx == null)
+      throw new IllegalArgumentException("ctx is required");
+    this.ctx = ctx;
+    if (fieldName == null || fieldName.length() == 0)
+      throw new IllegalArgumentException("fieldName is required");
+    this.fieldName = fieldName;
+  }
+
+  public SpatialContext getSpatialContext() {
+    return ctx;
+  }
+
+  /**
+   * The name of the field or the prefix of them if there are multiple
+   * fields needed internally.
+   * @return Not null.
+   */
+  public String getFieldName() {
+    return fieldName;
+  }
+
+  /**
+   * Returns the IndexableField(s) from the {@code shape} that are to be
+   * added to the {@link org.apache.lucene.document.Document}.  These fields
+   * are expected to be marked as indexed and not stored.
+   * <p>
+   * Note: If you want to <i>store</i> the shape as a string for retrieval in
+   * search results, you could add it like this:
+   * <pre>document.add(new StoredField(fieldName,ctx.toString(shape)));</pre>
+   * The particular string representation used doesn't matter to the Strategy
+   * since it doesn't use it.
+   *
+   * @return Not null nor will it have null elements.
+   * @throws UnsupportedOperationException if given a shape incompatible with the strategy
+   */
+  public abstract Field[] createIndexableFields(Shape shape);
+
+  /**
+   * See {@link #makeDistanceValueSource(com.spatial4j.core.shape.Point, double)} called with
+   * a multiplier of 1.0 (i.e. units of degrees).
+   */
+  public ValueSource makeDistanceValueSource(Point queryPoint) {
+    return makeDistanceValueSource(queryPoint, 1.0);
+  }
+
+  /**
+   * Make a ValueSource returning the distance between the center of the
+   * indexed shape and {@code queryPoint}.  If there are multiple indexed shapes
+   * then the closest one is chosen. The result is multiplied by {@code multiplier}, which
+   * conveniently is used to get the desired units.
+   */
+  public abstract ValueSource makeDistanceValueSource(Point queryPoint, double multiplier);
+
+  /**
+   * Make a Query based principally on {@link org.apache.lucene.spatial.query.SpatialOperation}
+   * and {@link Shape} from the supplied {@code args}.  It should be constant scoring of 1.
+   *
+   * @throws UnsupportedOperationException If the strategy does not support the shape in {@code args}
+   * @throws org.apache.lucene.spatial.query.UnsupportedSpatialOperation If the strategy does not support the {@link
+   * org.apache.lucene.spatial.query.SpatialOperation} in {@code args}.
+   */
+  public abstract Query makeQuery(SpatialArgs args);
+
+  /**
+   * Returns a ValueSource with values ranging from 1 to 0, depending inversely
+   * on the distance from {@link #makeDistanceValueSource(com.spatial4j.core.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
+   * low as ~0.1 at its furthest edges.
+   */
+  public final ValueSource makeRecipDistanceValueSource(Shape queryShape) {
+    Rectangle bbox = queryShape.getBoundingBox();
+    double diagonalDist = ctx.getDistCalc().distance(
+        ctx.makePoint(bbox.getMinX(), bbox.getMinY()), bbox.getMaxX(), bbox.getMaxY());
+    double distToEdge = diagonalDist * 0.5;
+    float c = (float)distToEdge * 0.1f;//one tenth
+    return new ReciprocalFloatFunction(makeDistanceValueSource(queryShape.getCenter(), 1.0), 1f, c, c);
+  }
+
+  @Override
+  public String toString() {
+    return getClass().getSimpleName()+" field:"+fieldName+" ctx="+ctx;
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxOverlapRatioValueSource.java
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..9d0afe1
--- /dev/null
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxOverlapRatioValueSource.java
@@ -0,0 +1,251 @@
+/*
+ * 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.
+ */
+package org.apache.lucene.spatial.bbox;
+
+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;
+
+/**
+ * The algorithm is implemented as envelope on envelope (rect on rect) overlays rather than
+ * complex polygon on complex polygon overlays.
+ * <p>
+ * Spatial relevance scoring algorithm:
+ * <DL>
+ *   <DT>queryArea</DT> <DD>the area of the input query envelope</DD>
+ *   <DT>targetArea</DT> <DD>the area of the target envelope (per Lucene document)</DD>
+ *   <DT>intersectionArea</DT> <DD>the area of the intersection between the query and target envelopes</DD>
+ *   <DT>queryTargetProportion</DT> <DD>A 0-1 factor that divides the score proportion between query and target.
+ *   0.5 is evenly.</DD>
+ *
+ *   <DT>queryRatio</DT> <DD>intersectionArea / queryArea; (see note)</DD>
+ *   <DT>targetRatio</DT> <DD>intersectionArea / targetArea; (see note)</DD>
+ *   <DT>queryFactor</DT> <DD>queryRatio * queryTargetProportion;</DD>
+ *   <DT>targetFactor</DT> <DD>targetRatio * (1 - queryTargetProportion);</DD>
+ *   <DT>score</DT> <DD>queryFactor + targetFactor;</DD>
+ * </DL>
+ * Additionally, note that an optional minimum side length {@code minSideLength} may be used whenever an
+ * area is calculated (queryArea, targetArea, intersectionArea). This allows for points or horizontal/vertical lines
+ * to be used as the query shape and in such case the descending order should have smallest boxes up front. Without
+ * this, a point or line query shape typically scores everything with the same value since there is 0 area.
+ * <p>
+ * Note: The actual computation of queryRatio and targetRatio is more complicated so that it considers
+ * points and lines. Lines have the ratio of overlap, and points are either 1.0 or 0.0 depending on whether
+ * it intersects or not.
+ * <p>
+ * Originally based on Geoportal's
+ * <a href="http://geoportal.svn.sourceforge.net/svnroot/geoportal/Geoportal/trunk/src/com/esri/gpt/catalog/lucene/SpatialRankingValueSource.java">
+ *   SpatialRankingValueSource</a> but modified quite a bit. GeoPortal's algorithm will yield a score of 0
+ * if either a line or point is compared, and it doesn't output a 0-1 normalized score (it multiplies the factors),
+ * and it doesn't support minSideLength, and it had dateline bugs.
+ *
+ * @lucene.experimental
+ */
+public class BBoxOverlapRatioValueSource extends BBoxSimilarityValueSource {
+
+  private final boolean isGeo;//-180/+180 degrees  (not part of identity; attached to parent strategy/field)
+
+  private final Rectangle queryExtent;
+  private final double queryArea;//not part of identity
+
+  private final double minSideLength;
+
+  private final double queryTargetProportion;
+
+  //TODO option to compute geodetic area
+
+  /**
+   *
+   * @param rectValueSource mandatory; source of rectangles
+   * @param isGeo True if ctx.isGeo() and thus dateline issues should be attended to
+   * @param queryExtent mandatory; the query rectangle
+   * @param queryTargetProportion see class javadocs. Between 0 and 1.
+   * @param minSideLength see class javadocs. 0.0 will effectively disable.
+   */
+  public BBoxOverlapRatioValueSource(ValueSource rectValueSource, boolean isGeo, Rectangle queryExtent,
+                                     double queryTargetProportion, double minSideLength) {
+    super(rectValueSource);
+    this.isGeo = isGeo;
+    this.minSideLength = minSideLength;
+    this.queryExtent = queryExtent;
+    this.queryArea = calcArea(queryExtent.getWidth(), queryExtent.getHeight());
+    assert queryArea >= 0;
+    this.queryTargetProportion = queryTargetProportion;
+    if (queryTargetProportion < 0 || queryTargetProportion > 1.0)
+      throw new IllegalArgumentException("queryTargetProportion must be >= 0 and <= 1");
+  }
+
+  /** Construct with 75% weighting towards target (roughly GeoPortal's default), geo degrees assumed, no
+   * minimum side length. */
+  public BBoxOverlapRatioValueSource(ValueSource rectValueSource, Rectangle queryExtent) {
+    this(rectValueSource, true, queryExtent, 0.25, 0.0);
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (!super.equals(o)) return false;
+
+    BBoxOverlapRatioValueSource that = (BBoxOverlapRatioValueSource) o;
+
+    if (Double.compare(that.minSideLength, minSideLength) != 0) return false;
+    if (Double.compare(that.queryTargetProportion, queryTargetProportion) != 0) return false;
+    if (!queryExtent.equals(that.queryExtent)) return false;
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    int result = super.hashCode();
+    long temp;
+    result = 31 * result + queryExtent.hashCode();
+    temp = Double.doubleToLongBits(minSideLength);
+    result = 31 * result + (int) (temp ^ (temp >>> 32));
+    temp = Double.doubleToLongBits(queryTargetProportion);
+    result = 31 * result + (int) (temp ^ (temp >>> 32));
+    return result;
+  }
+
+  @Override
+  protected String similarityDescription() {
+    return queryExtent.toString() + "," + queryTargetProportion;
+  }
+
+  @Override
+  protected double score(Rectangle target, AtomicReference<Explanation> exp) {
+    // calculate "height": the intersection height between two boxes.
+    double top = Math.min(queryExtent.getMaxY(), target.getMaxY());
+    double bottom = Math.max(queryExtent.getMinY(), target.getMinY());
+    double height = top - bottom;
+    if (height < 0) {
+      if (exp != null) {
+        exp.set(Explanation.noMatch("No intersection"));
+      }
+      return 0;//no intersection
+    }
+
+    // calculate "width": the intersection width between two boxes.
+    double width = 0;
+    {
+      Rectangle a = queryExtent;
+      Rectangle b = target;
+      if (a.getCrossesDateLine() == b.getCrossesDateLine()) {
+        //both either cross or don't
+        double left = Math.max(a.getMinX(), b.getMinX());
+        double right = Math.min(a.getMaxX(), b.getMaxX());
+        if (!a.getCrossesDateLine()) {//both don't
+          if (left <= right) {
+            width = right - left;
+          } else if (isGeo && (Math.abs(a.getMinX()) == 180 || Math.abs(a.getMaxX()) == 180)
+              && (Math.abs(b.getMinX()) == 180 || Math.abs(b.getMaxX()) == 180)) {
+            width = 0;//both adjacent to dateline
+          } else {
+            if (exp != null) {
+              exp.set(Explanation.noMatch("No intersection"));
+            }
+            return 0;//no intersection
+          }
+        } else {//both cross
+          width = right - left + 360;
+        }
+      } else {
+        if (!a.getCrossesDateLine()) {//then flip
+          a = target;
+          b = queryExtent;
+        }
+        //a crosses, b doesn't
+        double qryWestLeft = Math.max(a.getMinX(), b.getMinX());
+        double qryWestRight = b.getMaxX();
+        if (qryWestLeft < qryWestRight)
+          width += qryWestRight - qryWestLeft;
+
+        double qryEastLeft = b.getMinX();
+        double qryEastRight = Math.min(a.getMaxX(), b.getMaxX());
+        if (qryEastLeft < qryEastRight)
+          width += qryEastRight - qryEastLeft;
+
+        if (qryWestLeft > qryWestRight && qryEastLeft > qryEastRight) {
+          if (exp != null) {
+            exp.set(Explanation.noMatch("No intersection"));
+          }
+          return 0;//no intersection
+        }
+      }
+    }
+
+    // calculate queryRatio and targetRatio
+    double intersectionArea = calcArea(width, height);
+    double queryRatio;
+    if (queryArea > 0) {
+      queryRatio = intersectionArea / queryArea;
+    } else if (queryExtent.getHeight() > 0) {//vert line
+      queryRatio = height / queryExtent.getHeight();
+    } else if (queryExtent.getWidth() > 0) {//horiz line
+      queryRatio = width / queryExtent.getWidth();
+    } else {
+      queryRatio = queryExtent.relate(target).intersects() ? 1 : 0;//could be optimized
+    }
+
+    double targetArea = calcArea(target.getWidth(), target.getHeight());
+    assert targetArea >= 0;
+    double targetRatio;
+    if (targetArea > 0) {
+      targetRatio = intersectionArea / targetArea;
+    } else if (target.getHeight() > 0) {//vert line
+      targetRatio = height / target.getHeight();
+    } else if (target.getWidth() > 0) {//horiz line
+      targetRatio = width / target.getWidth();
+    } else {
+      targetRatio = target.relate(queryExtent).intersects() ? 1 : 0;//could be optimized
+    }
+    assert queryRatio >= 0 && queryRatio <= 1 : queryRatio;
+    assert targetRatio >= 0 && targetRatio <= 1 : targetRatio;
+
+    // combine ratios into a score
+
+    double queryFactor = queryRatio * queryTargetProportion;
+    double targetFactor = targetRatio * (1.0 - queryTargetProportion);
+    double score = queryFactor + targetFactor;
+
+    if (exp!=null) {
+      String minSideDesc = minSideLength > 0.0 ? " (minSide="+minSideLength+")" : "";
+      exp.set(Explanation.match((float) score,
+          this.getClass().getSimpleName()+": queryFactor + targetFactor",
+          Explanation.match((float)intersectionArea, "IntersectionArea" + minSideDesc,
+              Explanation.match((float)width, "width"),
+              Explanation.match((float)height, "height"),
+              Explanation.match((float)queryTargetProportion, "queryTargetProportion")),
+          Explanation.match((float)queryFactor, "queryFactor",
+              Explanation.match((float)targetRatio, "ratio"),
+              Explanation.match((float)queryArea,  "area of " + queryExtent + minSideDesc)),
+          Explanation.match((float)targetFactor, "targetFactor",
+              Explanation.match((float)targetRatio, "ratio"),
+              Explanation.match((float)targetArea,  "area of " + target + minSideDesc))));
+    }
+
+    return score;
+  }
+
+  /** Calculates the area while applying the minimum side length. */
+  private double calcArea(double width, double height) {
+    return Math.max(minSideLength, width) * Math.max(minSideLength, height);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/89db4950/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxSimilarityValueSource.java
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..15cd646
--- /dev/null
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxSimilarityValueSource.java
@@ -0,0 +1,117 @@
+/*
+ * 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.
+ */
+package org.apache.lucene.spatial.bbox;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.apache.lucene.index.LeafReaderContext;
+import org.apache.lucene.queries.function.FunctionValues;
+import org.apache.lucene.queries.function.ValueSource;
+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;
+
+/**
+ * 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}.
+ * <p>
+ * Implementers: remember to implement equals and hashCode if you have
+ * fields!
+ *
+ * @lucene.experimental
+ */
+public abstract class BBoxSimilarityValueSource extends ValueSource {
+
+  private final ValueSource bboxValueSource;
+
+  public BBoxSimilarityValueSource(ValueSource bboxValueSource) {
+    this.bboxValueSource = bboxValueSource;
+  }
+
+  @Override
+  public void createWeight(Map context, IndexSearcher searcher) throws IOException {
+    bboxValueSource.createWeight(context, searcher);
+  }
+
+  @Override
+  public String description() {
+    return getClass().getSimpleName()+"(" + bboxValueSource.description() + "," + similarityDescription() + ")";
+  }
+
+  /** A comma-separated list of configurable items of the subclass to put into {@link #description()}. */
+  protected abstract String similarityDescription();
+
+  @Override
+  public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
+
+    final FunctionValues shapeValues = bboxValueSource.getValues(context, readerContext);
+
+    return new DoubleDocValues(this) {
+      @Override
+      public double doubleVal(int doc) {
+        //? limit to Rect or call getBoundingBox()? latter would encourage bad practice
+        final Rectangle rect = (Rectangle) shapeValues.objectVal(doc);
+        return rect==null ? 0 : score(rect, null);
+      }
+
+      @Override
+      public boolean exists(int doc) {
+        return shapeValues.exists(doc);
+      }
+
+      @Override
+      public Explanation explain(int doc) {
+        final Rectangle rect = (Rectangle) shapeValues.objectVal(doc);
+        if (rect == null)
+          return Explanation.noMatch("no rect");
+        AtomicReference<Explanation> explanation = new AtomicReference<>();
+        score(rect, explanation);
+        return explanation.get();
+      }
+    };
+  }
+
+  /**
+   * Return a relevancy score. If {@code exp} is provided then diagnostic information is added.
+   * @param rect The indexed rectangle; not null.
+   * @param exp Optional diagnostic holder.
+   * @return a score.
+   */
+  protected abstract double score(Rectangle rect, AtomicReference<Explanation> exp);
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;//same class
+
+    BBoxSimilarityValueSource that = (BBoxSimilarityValueSource) o;
+
+    if (!bboxValueSource.equals(that.bboxValueSource)) return false;
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return bboxValueSource.hashCode();
+  }
+}