diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index a30de248cd7..aaa4f0fe8d7 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -69,6 +69,12 @@ Changes in backwards compatibility policy previous two methods returned by calling parents(), children() or siblings() on the returned ParallelTaxonomyArrays. (Shai Erera) +* LUCENE-4585: Spatial PrefixTree based Strategies (either TermQuery or + RecursivePrefix based) MAY want to re-index if used for point data. If a + re-index is not done, then an indexed point is ~1/2 the smallest grid cell + larger and as such is slightly more likely to match a query shape. + (David Smiley) + New Features * LUCENE-4226: New experimental StoredFieldsFormat that compresses chunks of @@ -207,16 +213,6 @@ Bug Fixes * LUCENE-4009: Improve TermsFilter.toString (Tim Costermans via Chris Male, Mike McCandless) -* LUCENE-4588: Benchmark's EnwikiContentSource was discarding last wiki - document and had leaking threads in 'forever' mode. (Doron Cohen) - -Changes in Runtime Behavior - -* LUCENE-4586: Change default ResultMode of FacetRequest to PER_NODE_IN_TREE. - This only affects requests with depth>1. If you execute such requests and - rely on the facet results being returned flat (i.e. no hierarchy), you should - set the ResultMode to GLOBAL_FLAT. (Shai Erera, Gilad Barkai) - Optimizations * LUCENE-2221: oal.util.BitUtil was modified to use Long.bitCount and @@ -269,9 +265,6 @@ Optimizations Users of this API can now simply obtain an instance via DocValues#getDirectSource per thread. (Simon Willnauer) -* LUCENE-4580: DrillDown.query variants return a ConstantScoreQuery with boost set to 0.0f - so that documents scores are not affected by running a drill-down query. (Shai Erera) - Documentation * LUCENE-4483: Refer to BytesRef.deepCopyOf in Term's constructor that takes BytesRef. @@ -287,10 +280,6 @@ Build RandomizedContext.contexts static map. Upgrade randomized testing to version 2.0.2 (Mike McCandless, Dawid Weiss) -* LUCENE-4589: Upgraded benchmark module's Nekohtml dependency to version - 1.9.17, removing the workaround in Lucene's HTML parser for the - Turkish locale. (Uwe Schindler) - ======================= Lucene 4.0.0 ======================= diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PointPrefixTreeFieldCacheProvider.java b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PointPrefixTreeFieldCacheProvider.java index 29ab850a564..ebb12f78df9 100644 --- a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PointPrefixTreeFieldCacheProvider.java +++ b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PointPrefixTreeFieldCacheProvider.java @@ -45,6 +45,8 @@ public class PointPrefixTreeFieldCacheProvider extends ShapeFieldCacheProvider
detailLevel)
continue;
if (termLevel == detailLevel || scanCell.isLeaf()) {
- //TODO should put more thought into implications of box vs point
- Shape cShape = termLevel == grid.getMaxLevels() ? scanCell.getCenter() : scanCell.getShape();
+ Shape cShape;
+ //if this cell represents a point, use the cell center vs the box
+ // (points never have isLeaf())
+ if (termLevel == grid.getMaxLevels() && !scanCell.isLeaf())
+ cShape = scanCell.getCenter();
+ else
+ cShape = scanCell.getShape();
if(queryShape.relate(cShape) == SpatialRelation.DISJOINT)
continue;
diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/tree/GeohashPrefixTree.java b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/tree/GeohashPrefixTree.java
index 146f35b1c82..f9aafea16db 100644
--- a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/tree/GeohashPrefixTree.java
+++ b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/tree/GeohashPrefixTree.java
@@ -101,11 +101,11 @@ public class GeohashPrefixTree extends SpatialPrefixTree {
class GhCell extends Node {
GhCell(String token) {
- super(GeohashPrefixTree.this, token);
+ super(token);
}
GhCell(byte[] bytes, int off, int len) {
- super(GeohashPrefixTree.this, bytes, off, len);
+ super(bytes, off, len);
}
@Override
diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/tree/Node.java b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/tree/Node.java
index 223a53f555d..d489f8bbce7 100644
--- a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/tree/Node.java
+++ b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/tree/Node.java
@@ -44,11 +44,14 @@ public abstract class Node implements Comparable