lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [01/26] lucenenet git commit: Ported over Lucene.Net.Spatial
Date Fri, 25 Nov 2016 11:07:06 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 96d38effd -> e8735ed96


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Prefix/PointPrefixTreeFieldCacheProvider.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Prefix/PointPrefixTreeFieldCacheProvider.cs b/src/Lucene.Net.Spatial/Prefix/PointPrefixTreeFieldCacheProvider.cs
index acf6f96..73c57f9 100644
--- a/src/Lucene.Net.Spatial/Prefix/PointPrefixTreeFieldCacheProvider.cs
+++ b/src/Lucene.Net.Spatial/Prefix/PointPrefixTreeFieldCacheProvider.cs
@@ -28,32 +28,27 @@ namespace Lucene.Net.Spatial.Prefix
     /// <see cref="Lucene.Net.Spatial.Util.ShapeFieldCacheProvider{T}">Lucene.Net.Spatial.Util.ShapeFieldCacheProvider&lt;T&gt;
     /// 	</see>
     /// designed for
-    /// <see cref="PrefixTreeStrategy">PrefixTreeStrategy</see>
-    /// s.
+    /// <see cref="PrefixTreeStrategy">PrefixTreeStrategy</see>s.
     /// Note, due to the fragmented representation of Shapes in these Strategies, this implementation
-    /// can only retrieve the central
-    /// <see cref="Point">Point</see>
-    /// of the original Shapes.
+    /// can only retrieve the central <see cref="Point">Point</see> of the original Shapes.
     /// </summary>
     /// <lucene.internal></lucene.internal>
     public class PointPrefixTreeFieldCacheProvider : ShapeFieldCacheProvider<Point>
     {
-        internal readonly SpatialPrefixTree grid;
+        internal readonly SpatialPrefixTree grid; //
 
-        public PointPrefixTreeFieldCacheProvider(SpatialPrefixTree grid, string shapeField
-            , int defaultSize)
+        public PointPrefixTreeFieldCacheProvider(SpatialPrefixTree grid, string shapeField, int defaultSize)
             : base(shapeField, defaultSize)
         {
-            //
             this.grid = grid;
         }
 
-        private Cell scanCell = null;
+        private Cell scanCell = null;//re-used in readShape to save GC
 
         //re-used in readShape to save GC
         protected internal override Point ReadShape(BytesRef term)
         {
-            scanCell = grid.GetCell(term.bytes.ToByteArray(), term.offset, term.length, scanCell);
+            scanCell = grid.GetCell(term.Bytes, term.Offset, term.Length, scanCell);
             if (scanCell.Level == grid.MaxLevels && !scanCell.IsLeaf())
             {
                 return scanCell.GetCenter();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Prefix/PrefixTreeStrategy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Prefix/PrefixTreeStrategy.cs b/src/Lucene.Net.Spatial/Prefix/PrefixTreeStrategy.cs
index 36c6177..ff83b83 100644
--- a/src/Lucene.Net.Spatial/Prefix/PrefixTreeStrategy.cs
+++ b/src/Lucene.Net.Spatial/Prefix/PrefixTreeStrategy.cs
@@ -25,9 +25,9 @@ using Lucene.Net.Analysis;
 using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Documents;
 using Lucene.Net.Index;
-using Lucene.Net.Search.Function;
 using Lucene.Net.Spatial.Prefix.Tree;
 using Lucene.Net.Spatial.Queries;
+using Lucene.Net.Queries.Function;
 using Lucene.Net.Spatial.Util;
 using Lucene.Net.Support;
 using Spatial4n.Core.Shapes;
@@ -92,8 +92,8 @@ namespace Lucene.Net.Spatial.Prefix
     {
         protected internal readonly SpatialPrefixTree grid;
 
-        private readonly IDictionary<string, PointPrefixTreeFieldCacheProvider> provider =
-            new ConcurrentHashMap<string, PointPrefixTreeFieldCacheProvider>();
+        private readonly ConcurrentDictionary<string, PointPrefixTreeFieldCacheProvider> provider =
+            new ConcurrentDictionary<string, PointPrefixTreeFieldCacheProvider>();
 
         protected internal readonly bool simplifyIndexedCells;
 
@@ -101,11 +101,9 @@ namespace Lucene.Net.Spatial.Prefix
 
         protected internal double distErrPct = SpatialArgs.DEFAULT_DISTERRPCT;
 
-        public PrefixTreeStrategy(SpatialPrefixTree grid, string fieldName, bool simplifyIndexedCells
-            )
+        public PrefixTreeStrategy(SpatialPrefixTree grid, string fieldName, bool simplifyIndexedCells)
             : base(grid.SpatialContext, fieldName)
         {
-            // [ 0 TO 0.5 ]
             this.grid = grid;
             this.simplifyIndexedCells = simplifyIndexedCells;
         }
@@ -150,23 +148,19 @@ namespace Lucene.Net.Spatial.Prefix
             set { distErrPct = value; }
         }
 
-        public override Field[] CreateIndexableFields(Shape shape
-            )
+        public override Field[] CreateIndexableFields(Shape shape)
         {
             double distErr = SpatialArgs.CalcDistanceFromErrPct(shape, distErrPct, ctx);
             return CreateIndexableFields(shape, distErr);
         }
 
-        public virtual Field[] CreateIndexableFields(Shape shape
-            , double distErr)
+        public virtual Field[] CreateIndexableFields(Shape shape, double distErr)
         {
             int detailLevel = grid.GetLevelForDistance(distErr);
             IList<Cell> cells = grid.GetCells(shape, detailLevel, true, simplifyIndexedCells);
-            //intermediates cells
             //TODO is CellTokenStream supposed to be re-used somehow? see Uwe's comments:
             //  http://code.google.com/p/lucene-spatial-playground/issues/detail?id=4
-            Field field = new Field(FieldName, new PrefixTreeStrategy.CellTokenStream(cells
-                .GetEnumerator()), FieldType);
+            Field field = new Field(FieldName, new CellTokenStream(cells.GetEnumerator()), FieldType);
             return new Field[] { field };
         }
 
@@ -224,27 +218,10 @@ namespace Lucene.Net.Spatial.Prefix
             }
         }
 
-        public ShapeFieldCacheProvider<Point> GetCacheProvider()
+        public override ValueSource MakeDistanceValueSource(Point queryPoint, double multiplier)
         {
-            PointPrefixTreeFieldCacheProvider p;
-            if (!provider.TryGetValue(FieldName, out p) || p == null)
-            {
-                lock (this)
-                {//double checked locking idiom is okay since provider is threadsafe
-                    if (!provider.ContainsKey(FieldName))
-                    {
-                        p = new PointPrefixTreeFieldCacheProvider(grid, FieldName, defaultFieldValuesArrayLen);
-                        provider[FieldName] = p;
-                    }
-                }
-            }
-            return p;
-        }
-
-        public override ValueSource MakeDistanceValueSource(Point queryPoint)
-        {
-            var p = (PointPrefixTreeFieldCacheProvider)GetCacheProvider();
-            return new ShapeFieldCacheDistanceValueSource(ctx, p, queryPoint);
+            var p = provider.GetOrAdd(FieldName, f => new PointPrefixTreeFieldCacheProvider(grid, FieldName, defaultFieldValuesArrayLen));
+            return new ShapeFieldCacheDistanceValueSource(ctx, p, queryPoint, multiplier);
         }
 
         public virtual SpatialPrefixTree Grid

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Prefix/RecursivePrefixTreeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Prefix/RecursivePrefixTreeFilter.cs b/src/Lucene.Net.Spatial/Prefix/RecursivePrefixTreeFilter.cs
index ce0d0d9..ad71d0c 100644
--- a/src/Lucene.Net.Spatial/Prefix/RecursivePrefixTreeFilter.cs
+++ b/src/Lucene.Net.Spatial/Prefix/RecursivePrefixTreeFilter.cs
@@ -66,9 +66,9 @@ if (!scan) {
             this.fieldName = fieldName;
             this.grid = grid;
             this.queryShape = queryShape;
-            this.prefixGridScanLevel = Math.Max(1, Math.Min(prefixGridScanLevel, grid.GetMaxLevels() - 1));
+            this.prefixGridScanLevel = Math.Max(1, Math.Min(prefixGridScanLevel, grid.MaxLevels - 1));
             this.detailLevel = detailLevel;
-            Debug.Assert(detailLevel <= grid.GetMaxLevels());
+            Debug.Assert(detailLevel <= grid.MaxLevels);
         }
 
         public override DocIdSet GetDocIdSet(Index.IndexReader reader /*, Bits acceptDocs*/)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Prefix/RecursivePrefixTreeStrategy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Prefix/RecursivePrefixTreeStrategy.cs b/src/Lucene.Net.Spatial/Prefix/RecursivePrefixTreeStrategy.cs
index 1e0ccd0..2fcfe01 100644
--- a/src/Lucene.Net.Spatial/Prefix/RecursivePrefixTreeStrategy.cs
+++ b/src/Lucene.Net.Spatial/Prefix/RecursivePrefixTreeStrategy.cs
@@ -14,6 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+using Lucene.Net.Queries.Function;
 using Lucene.Net.Search;
 using Lucene.Net.Spatial.Prefix.Tree;
 using Lucene.Net.Spatial.Queries;
@@ -35,25 +37,28 @@ namespace Lucene.Net.Spatial.Prefix
     /// <lucene.experimental></lucene.experimental>
     public class RecursivePrefixTreeStrategy : PrefixTreeStrategy
     {
+        protected readonly SpatialPrefixTree grid;
         private int prefixGridScanLevel;
 
+        /** True if only indexed points shall be supported.  See
+        *  {@link IntersectsPrefixTreeFilter#hasIndexedLeaves}. */
+        protected bool pointsOnly = false;
+
+        /** See {@link ContainsPrefixTreeFilter#multiOverlappingIndexedShapes}. */
+        protected bool multiOverlappingIndexedShapes = true;
+
         public RecursivePrefixTreeStrategy(SpatialPrefixTree grid, string fieldName)
-            : base(grid, fieldName, true)
+            : base(grid, fieldName, true) //simplify indexed cells
         {
-            //simplify indexed cells
-            prefixGridScanLevel = grid.MaxLevels - 4;
+            this.grid = grid;
+            prefixGridScanLevel = grid.MaxLevels - 4;//TODO this default constant is dependent on the prefix grid size
         }
 
-        //TODO this default constant is dependent on the prefix grid size
         /// <summary>
         /// Sets the grid level [1-maxLevels] at which indexed terms are scanned brute-force
-        /// instead of by grid decomposition.
-        /// </summary>
-        /// <remarks>
-        /// Sets the grid level [1-maxLevels] at which indexed terms are scanned brute-force
-        /// instead of by grid decomposition.  By default this is maxLevels - 4.  The
+        /// instead of by grid decomposition.By default this is maxLevels - 4.  The
         /// final level, maxLevels, is always scanned.
-        /// </remarks>
+        /// </summary>
         public virtual int PrefixGridScanLevel
         {
             set
@@ -77,27 +82,22 @@ namespace Lucene.Net.Spatial.Prefix
             }
             Shape shape = args.Shape;
             int detailLevel = grid.GetLevelForDistance(args.ResolveDistErr(ctx, distErrPct));
-            bool hasIndexedLeaves = true;
-            if (op == SpatialOperation.Intersects)
+
+        
+            if (pointsOnly || op == SpatialOperation.Intersects)
+            {
+                return new IntersectsPrefixTreeFilter(
+                    shape, FieldName, grid, detailLevel, prefixGridScanLevel, !pointsOnly);
+            }
+            else if (op == SpatialOperation.IsWithin)
             {
-                return new IntersectsPrefixTreeFilter(shape, FieldName, grid, detailLevel, prefixGridScanLevel
-                                                      , hasIndexedLeaves);
+                return new WithinPrefixTreeFilter(shape, FieldName, grid, detailLevel, prefixGridScanLevel
+                    , -1); //-1 flag is slower but ensures correct results
             }
-            else
+            else if (op == SpatialOperation.Contains)
             {
-                if (op == SpatialOperation.IsWithin)
-                {
-                    return new WithinPrefixTreeFilter(shape, FieldName, grid, detailLevel, prefixGridScanLevel
-                                                      , -1);
-                }
-                else
-                {
-                    //-1 flag is slower but ensures correct results
-                    if (op == SpatialOperation.Contains)
-                    {
-                        return new ContainsPrefixTreeFilter(shape, FieldName, grid, detailLevel);
-                    }
-                }
+                return new ContainsPrefixTreeFilter(shape, FieldName, grid, detailLevel, 
+                    multiOverlappingIndexedShapes);
             }
             throw new UnsupportedSpatialOperation(op);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Prefix/TermQueryPrefixTreeStrategy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Prefix/TermQueryPrefixTreeStrategy.cs b/src/Lucene.Net.Spatial/Prefix/TermQueryPrefixTreeStrategy.cs
index 20cbf5f..b8753e3 100644
--- a/src/Lucene.Net.Spatial/Prefix/TermQueryPrefixTreeStrategy.cs
+++ b/src/Lucene.Net.Spatial/Prefix/TermQueryPrefixTreeStrategy.cs
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 using System.Collections.Generic;
+using Lucene.Net.Queries;
 using Lucene.Net.Search;
 using Lucene.Net.Spatial.Prefix.Tree;
 using Lucene.Net.Spatial.Queries;
@@ -31,7 +32,7 @@ namespace Lucene.Net.Spatial.Prefix
     /// 	</see>
     /// of all the cells from
     /// <see cref="Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree.GetCells(Shape, int, bool, bool)
-    /// 	">Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree.GetCells(Shape, int, bool, bool)
+    /// 	"SpatialPrefixTree.GetCells(Shape, int, bool, bool)
     /// 	</see>
     /// . It only supports the search of indexed Point shapes.
     /// <p/>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Prefix/Tree/Cell.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Prefix/Tree/Cell.cs b/src/Lucene.Net.Spatial/Prefix/Tree/Cell.cs
index f572f2c..319815a 100644
--- a/src/Lucene.Net.Spatial/Prefix/Tree/Cell.cs
+++ b/src/Lucene.Net.Spatial/Prefix/Tree/Cell.cs
@@ -118,7 +118,7 @@ namespace Lucene.Net.Spatial.Prefix.Tree
             //bytes = Encoding.UTF8.GetBytes(token);
             BytesRef utf8Result = new BytesRef(token.Length);
             UnicodeUtil.UTF16toUTF8(token.ToCharArray(), 0, token.Length, utf8Result);
-            bytes = utf8Result.bytes.ToByteArray();
+            bytes = utf8Result.Bytes;
 
             b_off = 0;
             b_len = bytes.Length;
@@ -192,7 +192,7 @@ namespace Lucene.Net.Spatial.Prefix.Tree
                 //bytes = Encoding.UTF8.GetBytes(token);
                 BytesRef utf8Result = new BytesRef(token.Length);
                 UnicodeUtil.UTF16toUTF8(token.ToCharArray(), 0, token.Length, utf8Result);
-                bytes = utf8Result.bytes.ToByteArray();
+                bytes = utf8Result.Bytes;
                 b_off = 0;
                 b_len = bytes.Length;
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Prefix/Tree/Node.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Prefix/Tree/Node.cs b/src/Lucene.Net.Spatial/Prefix/Tree/Node.cs
index bb05720..ccff798 100644
--- a/src/Lucene.Net.Spatial/Prefix/Tree/Node.cs
+++ b/src/Lucene.Net.Spatial/Prefix/Tree/Node.cs
@@ -65,7 +65,7 @@ namespace Lucene.Net.Spatial.Prefix.Tree
 
         private void b_fixLeaf()
         {
-            if (GetLevel() == spatialPrefixTree.GetMaxLevels())
+            if (GetLevel() == spatialPrefixTree.MaxLevels)
             {
                 SetLeaf();
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Prefix/WithinPrefixTreeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Prefix/WithinPrefixTreeFilter.cs b/src/Lucene.Net.Spatial/Prefix/WithinPrefixTreeFilter.cs
index 032554a..07f8f9e 100644
--- a/src/Lucene.Net.Spatial/Prefix/WithinPrefixTreeFilter.cs
+++ b/src/Lucene.Net.Spatial/Prefix/WithinPrefixTreeFilter.cs
@@ -149,7 +149,7 @@ namespace Lucene.Net.Spatial.Prefix
         }
 
         /// <exception cref="System.IO.IOException"></exception>
-        public override DocIdSet GetDocIdSet(AtomicReaderContext context, IBits acceptDocs
+        public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs
             )
         {
             return new _VisitorTemplate_121(this, context, acceptDocs, true).GetDocIdSet();
@@ -167,7 +167,7 @@ namespace Lucene.Net.Spatial.Prefix
             private SpatialRelation visitRelation;
 
             public _VisitorTemplate_121(WithinPrefixTreeFilter _enclosing, AtomicReaderContext
-                                                                               baseArg1, IBits baseArg2, bool baseArg3)
+                                                                               baseArg1, Bits baseArg2, bool baseArg3)
                 : base(_enclosing, baseArg1, baseArg2, baseArg3)
             {
                 this._enclosing = _enclosing;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/SpatialStrategy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/SpatialStrategy.cs b/src/Lucene.Net.Spatial/SpatialStrategy.cs
index 0b283c5..2fb8689 100644
--- a/src/Lucene.Net.Spatial/SpatialStrategy.cs
+++ b/src/Lucene.Net.Spatial/SpatialStrategy.cs
@@ -17,11 +17,10 @@
 
 using System;
 using Lucene.Net.Documents;
+using Lucene.Net.Queries.Function;
+using Lucene.Net.Queries.Function.ValueSources;
 using Lucene.Net.Search;
-using Lucene.Net.Search.Function;
-using Lucene.Net.Search.Function.ValueSources;
 using Lucene.Net.Spatial.Queries;
-using Lucene.Net.Spatial.Util;
 using Spatial4n.Core.Context;
 using Spatial4n.Core.Shapes;
 
@@ -85,9 +84,15 @@ namespace Lucene.Net.Spatial
         /// <returns>Not null nor will it have null elements.</returns>
         public abstract Field[] CreateIndexableFields(Shape shape);
 
-        public Field CreateStoredField(Shape shape)
+        /// <summary>
+        /// See {@link #makeDistanceValueSource(com.spatial4j.core.shape.Point, double)} called with
+        /// a multiplier of 1.0 (i.e. units of degrees).
+        /// </summary>
+        /// <param name="queryPoint"></param>
+        /// <returns></returns>
+        public ValueSource MakeDistanceValueSource(Point queryPoint)
         {
-            return new Field(FieldName, ctx.ToString(shape), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS, Field.TermVector.NO);
+            return MakeDistanceValueSource(queryPoint, 1.0);
         }
 
         /// <summary>
@@ -95,7 +100,7 @@ namespace Lucene.Net.Spatial
         /// indexed shape and {@code queryPoint}.  If there are multiple indexed shapes
         /// then the closest one is chosen.
         /// </summary>
-        public abstract ValueSource MakeDistanceValueSource(Point queryPoint);
+        public abstract ValueSource MakeDistanceValueSource(Point queryPoint, double multiplier);
 
         /// <summary>
         /// Make a (ConstantScore) Query based principally on {@link org.apache.lucene.spatial.query.SpatialOperation}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Util/Bits.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Util/Bits.cs b/src/Lucene.Net.Spatial/Util/Bits.cs
deleted file mode 100644
index f0040ee..0000000
--- a/src/Lucene.Net.Spatial/Util/Bits.cs
+++ /dev/null
@@ -1,92 +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.
- */
-
-namespace Lucene.Net.Spatial.Util
-{
-    /// <summary>
-    /// Interface for Bitset-like structures.
-    /// </summary>
-    public interface IBits
-    {
-        bool Get(int index);
-        int Length();
-    }
-
-    /// <summary>
-    /// Empty implementation, basically just so we can provide EMPTY_ARRAY
-    /// </summary>
-    public abstract class Bits : IBits
-    {
-        public static readonly Bits[] EMPTY_ARRAY = new Bits[0];
-
-        public virtual bool Get(int index)
-        {
-            throw new System.NotImplementedException();
-        }
-
-        public virtual int Length()
-        {
-            throw new System.NotImplementedException();
-        }
-    }
-
-    /// <summary>
-    /// Bits impl of the specified length with all bits set.
-    /// </summary>
-    public class MatchAllBits : Bits
-    {
-        private readonly int len;
-
-        public MatchAllBits(int len)
-        {
-            this.len = len;
-        }
-
-        public override bool Get(int index)
-        {
-            return true;
-        }
-
-        public override int Length()
-        {
-            return len;
-        }
-    }
-
-    /// <summary>
-    /// Bits impl of the specified length with no bits set. 
-    /// </summary>
-    public class MatchNoBits : Bits
-    {
-        private readonly int len;
-
-        public MatchNoBits(int len)
-        {
-            this.len = len;
-        }
-
-        public override bool Get(int index)
-        {
-            return false;
-        }
-
-        public override int Length()
-        {
-            return len;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Util/CachingDoubleValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Util/CachingDoubleValueSource.cs b/src/Lucene.Net.Spatial/Util/CachingDoubleValueSource.cs
index b6f9c17..793e10f 100644
--- a/src/Lucene.Net.Spatial/Util/CachingDoubleValueSource.cs
+++ b/src/Lucene.Net.Spatial/Util/CachingDoubleValueSource.cs
@@ -15,21 +15,28 @@
  * limitations under the License.
  */
 
+using System.Collections;
 using System.Collections.Generic;
 using Lucene.Net.Index;
-using Lucene.Net.Search.Function;
+using Lucene.Net.Queries.Function;
+using Lucene.Net.Support;
 
 namespace Lucene.Net.Spatial.Util
 {
+    /// <summary>
+    /// Caches the doubleVal of another value source in a HashMap
+    /// so that it is computed only once.
+    /// @lucene.internal
+    /// </summary>
     public class CachingDoubleValueSource : ValueSource
     {
-        protected readonly Dictionary<int, double> cache;
+        protected readonly IDictionary<int, double> cache;
         protected readonly ValueSource source;
 
         public CachingDoubleValueSource(ValueSource source)
         {
             this.source = source;
-            cache = new Dictionary<int, double>();
+            cache = new HashMap<int, double>();
         }
 
         public override string Description
@@ -37,9 +44,9 @@ namespace Lucene.Net.Spatial.Util
             get { return "Cached[" + source.Description + "]"; }
         }
 
-        public override FunctionValues GetValues(IDictionary<object, object> context, AtomicReaderContext readerContext)
+        public override FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
         {
-            int @base = readerContext.docBase;
+            int @base = readerContext.DocBase;
             FunctionValues vals = source.GetValues(context, readerContext);
             return new CachingDoubleFunctionValue(@base, vals, cache);
         }
@@ -65,11 +72,11 @@ namespace Lucene.Net.Spatial.Util
 
         public class CachingDoubleFunctionValue : FunctionValues
         {
-            private readonly Dictionary<int, double> cache;
+            private readonly IDictionary<int, double> cache;
             private readonly int docBase;
             private readonly FunctionValues values;
 
-            public CachingDoubleFunctionValue(int docBase, FunctionValues vals, Dictionary<int, double> cache)
+            public CachingDoubleFunctionValue(int docBase, FunctionValues vals, IDictionary<int, double> cache)
             {
                 this.docBase = docBase;
                 values = vals;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Util/CompatibilityExtensions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Util/CompatibilityExtensions.cs b/src/Lucene.Net.Spatial/Util/CompatibilityExtensions.cs
deleted file mode 100644
index be9b185..0000000
--- a/src/Lucene.Net.Spatial/Util/CompatibilityExtensions.cs
+++ /dev/null
@@ -1,173 +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.
- */
-
-using System;
-#if NET35
-using Lucene.Net.Support.Compatibility;
-#else
-using System.Collections.Concurrent;
-#endif
-using System.Diagnostics;
-using System.Linq;
-using Lucene.Net.Analysis.Tokenattributes;
-using Lucene.Net.Index;
-using Lucene.Net.Search;
-using Lucene.Net.Util;
-
-namespace Lucene.Net.Spatial.Util
-{
-    public static class CompatibilityExtensions
-    {
-        private static readonly ConcurrentDictionary<string, IBits> _docsWithFieldCache = new ConcurrentDictionary<string, IBits>();
-
-        /// <summary> <p/>
-        /// EXPERT: Instructs the FieldCache to forcibly expunge all entries 
-        /// from the underlying caches.  This is intended only to be used for 
-        /// test methods as a way to ensure a known base state of the Cache 
-        /// (with out needing to rely on GC to free WeakReferences).  
-        /// It should not be relied on for "Cache maintenance" in general 
-        /// application code.
-        /// <p/>
-        /// <p/>
-        /// <b>EXPERIMENTAL API:</b> This API is considered extremely advanced 
-        /// and experimental.  It may be removed or altered w/o warning in future 
-        /// releases 
-        /// of Lucene.
-        /// <p/>
-        /// </summary>
-        public static void PurgeSpatialCaches(this IFieldCache fc)
-        {
-            _docsWithFieldCache.Clear();
-        }
-
-
-        public static byte[] ToByteArray(this sbyte[] sbytes)
-        {
-            return sbytes.Select(Convert.ToByte).ToArray();
-        }
-
-        /* table of number of leading zeros in a byte */
-
-        public static readonly byte[] nlzTable =
-            {
-                8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3
-                , 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-                2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1
-                , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-                1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
-                , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-                , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-                , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-            };
-        public static sbyte[] ToSByteArray(this byte[] bytes)
-        {
-            return bytes.Select(Convert.ToSByte).ToArray();
-        }
-
-        /// <summary>
-        /// Returns the number of leading zero bits.
-        /// </summary>
-        /// <param name="x"></param>
-        /// <returns></returns>
-        public static int BitUtilNlz(long x)
-        {
-            int n = 0;
-            // do the first step as a long
-            var y = (int)((ulong)x >> 32);
-            if (y == 0) { n += 32; y = (int)(x); }
-            if ((y & 0xFFFF0000) == 0) { n += 16; y <<= 16; }
-            if ((y & 0xFF000000) == 0) { n += 8; y <<= 8; }
-            return n + nlzTable[(uint)y >> 24];
-            /* implementation without table:
-              if ((y & 0xF0000000) == 0) { n+=4; y<<=4; }
-              if ((y & 0xC0000000) == 0) { n+=2; y<<=2; }
-              if ((y & 0x80000000) == 0) { n+=1; y<<=1; }
-              if ((y & 0x80000000) == 0) { n+=1;}
-              return n;
-             */
-        }
-    }
-
-    public static class Arrays
-    {
-        public static void Fill<T>(T[] array, int fromIndex, int toIndex, T value)
-        {
-            if (array == null)
-            {
-                throw new ArgumentNullException("array");
-            }
-            if (fromIndex < 0 || fromIndex > toIndex)
-            {
-                throw new ArgumentOutOfRangeException("fromIndex");
-            }
-            if (toIndex > array.Length)
-            {
-                throw new ArgumentOutOfRangeException("toIndex");
-            }
-            for (var i = fromIndex; i < toIndex; i++)
-            {
-                array[i] = value;
-            }
-        }
-    }
-
-    /// <summary>
-    /// Expert: Every composite-key in the internal cache is of this type.
-    /// </summary>
-    internal class Entry
-    {
-        internal readonly String field;        // which Fieldable
-        internal readonly Object custom;       // which custom comparator or parser
-
-        /* Creates one of these objects for a custom comparator/parser. */
-        public Entry(String field, Object custom)
-        {
-            this.field = field;
-            this.custom = custom;
-        }
-
-        /* Two of these are equal iff they reference the same field and type. */
-        public override bool Equals(Object o)
-        {
-            var other = o as Entry;
-            if (other != null)
-            {
-                if (other.field.Equals(field))
-                {
-                    if (other.custom == null)
-                    {
-                        if (custom == null) return true;
-                    }
-                    else if (other.custom.Equals(custom))
-                    {
-                        return true;
-                    }
-                }
-            }
-            return false;
-        }
-
-        /* Composes a hashcode based on the field and type. */
-        public override int GetHashCode()
-        {
-            return field.GetHashCode() ^ (custom == null ? 0 : custom.GetHashCode());
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Util/FixedBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Util/FixedBitSet.cs b/src/Lucene.Net.Spatial/Util/FixedBitSet.cs
deleted file mode 100644
index bfc5c45..0000000
--- a/src/Lucene.Net.Spatial/Util/FixedBitSet.cs
+++ /dev/null
@@ -1,454 +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.
- */
-
-using System;
-using System.Collections;
-using Lucene.Net.Search;
-using Lucene.Net.Util;
-
-namespace Lucene.Net.Spatial.Util
-{
-    /* BitSet of fixed length (numBits), backed by accessible
- *  ({@link #getBits}) long[], accessed with an int index,
- *  implementing Bits and DocIdSet.  Unlike {@link
- *  OpenBitSet} this bit set does not auto-expand, cannot
- *  handle long index, and does not have fastXX/XX variants
- *  (just X).
- *
- * @lucene.internal
- **/
-    public class FixedBitSet : DocIdSet, IBits
-    {
-        private readonly BitArray bits;
-
-        /// <summary>
-        /// returns the number of 64 bit words it would take to hold numBits
-        /// </summary>
-        /// <param name="numBits"></param>
-        /// <returns></returns>
-        public static int bits2words(int numBits)
-        {
-            var numLong = (int)((uint)numBits >> 6);
-            if ((numBits & 63) != 0)
-            {
-                numLong++;
-            }
-            return numLong;
-        }
-
-        public FixedBitSet(int numBits)
-        {
-            bits = new BitArray(numBits);
-        }
-
-        /// <summary>
-        /// Makes full copy.
-        /// </summary>
-        /// <param name="other"></param>
-        public FixedBitSet(FixedBitSet other)
-        {
-            bits = new BitArray(other.bits);
-        }
-
-        public IBits Bits()
-        {
-            return this;
-        }
-
-        public int Length()
-        {
-            return bits.Length;
-        }
-
-        public override bool IsCacheable
-        {
-            get { return true; }
-        }
-
-        /// <summary>
-        /// Returns number of set bits.  NOTE: this visits every
-        /// long in the backing bits array, and the result is not
-        /// internally cached!
-        /// </summary>
-        /// <returns></returns>
-        public int Cardinality()
-        {
-            int ret = 0;
-            for (var i = 0; i < bits.Length; i++)
-            {
-                if (bits[i]) ret++;
-            }
-            return ret;
-        }
-
-        public bool Get(int index)
-        {
-            return bits[index];
-        }
-
-        public void Set(int index)
-        {
-            bits.Set(index, true);
-        }
-
-        public bool GetAndSet(int index)
-        {
-            var ret = bits[index];
-            bits.Set(index, true);
-            return ret;
-        }
-
-        public void Clear(int index)
-        {
-            bits.Set(index, false);
-        }
-
-        public bool GetAndClear(int index)
-        {
-            var ret = bits[index];
-            bits.Set(index, false);
-            return ret;
-        }
-
-        /// <summary>
-        /// Returns the index of the first set bit starting at the index specified.
-        /// -1 is returned if there are no more set bits.
-        /// </summary>
-        /// <param name="index"></param>
-        /// <returns></returns>
-        public int NextSetBit(int index)
-        {
-            if (index >= bits.Length || index < 0)
-                throw new ArgumentException("Invalid index", "index");
-
-            for (var i = index; i < bits.Length; i++)
-            {
-                if (bits[i]) return i;
-            }
-
-            return -1;
-        }
-
-        /* Returns the index of the last set bit before or on the index specified.
-         *  -1 is returned if there are no more set bits.
-         */
-        public int PrevSetBit(int index)
-        {
-            if (index >= bits.Length || index < 0)
-                throw new ArgumentException("Invalid index", "index");
-
-            for (var i = index; i >= 0; i--)
-            {
-                if (bits[i]) return i;
-            }
-
-            return -1;
-        }
-
-        /* Does in-place OR of the bits provided by the
-         *  iterator. */
-        //public void Or(DocIdSetIterator iter)
-        //{
-        //    if (iter is OpenBitSetIterator && iter.DocID() == -1)
-        //    {
-        //        var obs = (OpenBitSetIterator)iter;
-        //        Or(obs.arr, obs.words);
-        //        // advance after last doc that would be accepted if standard
-        //        // iteration is used (to exhaust it):
-        //        obs.Advance(bits.Length);
-        //    }
-        //    else
-        //    {
-        //        int doc;
-        //        while ((doc = iter.NextDoc()) < bits.Length)
-        //        {
-        //            Set(doc);
-        //        }
-        //    }
-        //}
-
-        /* this = this OR other */
-        public void Or(FixedBitSet other)
-        {
-            Or(other.bits, other.bits.Length);
-        }
-
-        private void Or(BitArray otherArr, int otherLen)
-        {
-            var thisArr = this.bits;
-            int pos = Math.Min(thisArr.Length, otherLen);
-            while (--pos >= 0)
-            {
-                thisArr[pos] |= otherArr[pos];
-            }
-        }
-
-        /* Does in-place AND of the bits provided by the
-         *  iterator. */
-        //public void And(DocIdSetIterator iter)
-        //{
-        //    if (iter is OpenBitSetIterator && iter.DocID() == -1)
-        //    {
-        //        var obs = (OpenBitSetIterator)iter;
-        //        And(obs.arr, obs.words);
-        //        // advance after last doc that would be accepted if standard
-        //        // iteration is used (to exhaust it):
-        //        obs.Advance(bits.Length);
-        //    }
-        //    else
-        //    {
-        //        if (bits.Length == 0) return;
-        //        int disiDoc, bitSetDoc = NextSetBit(0);
-        //        while (bitSetDoc != -1 && (disiDoc = iter.Advance(bitSetDoc)) < bits.Length)
-        //        {
-        //            Clear(bitSetDoc, disiDoc);
-        //            disiDoc++;
-        //            bitSetDoc = (disiDoc < bits.Length) ? NextSetBit(disiDoc) : -1;
-        //        }
-        //        if (bitSetDoc != -1)
-        //        {
-        //            Clear(bitSetDoc, bits.Length);
-        //        }
-        //    }
-        //}
-
-        /* this = this AND other */
-        public void And(FixedBitSet other)
-        {
-            And(other.bits, other.bits.Length);
-        }
-
-        private void And(BitArray otherArr, int otherLen)
-        {
-            var thisArr = this.bits;
-            int pos = Math.Min(thisArr.Length, otherLen);
-            while (--pos >= 0)
-            {
-                thisArr[pos] &= otherArr[pos];
-            }
-            if (thisArr.Length > otherLen)
-            {
-                for (var i = otherLen; i < thisArr.Length; i++)
-                {
-                    thisArr[i] = false;
-                }
-            }
-        }
-
-        /* Does in-place AND NOT of the bits provided by the
-         *  iterator. */
-        //public void AndNot(DocIdSetIterator iter)
-        //{
-        //    var obs = iter as OpenBitSetIterator;
-        //    if (obs != null && iter.DocID() == -1)
-        //    {
-        //        AndNot(obs.arr, obs.words);
-        //        // advance after last doc that would be accepted if standard
-        //        // iteration is used (to exhaust it):
-        //        obs.Advance(bits.Length);
-        //    }
-        //    else
-        //    {
-        //        int doc;
-        //        while ((doc = iter.NextDoc()) < bits.Length)
-        //        {
-        //            Clear(doc);
-        //        }
-        //    }
-        //}
-
-        /* this = this AND NOT other */
-        public void AndNot(FixedBitSet other)
-        {
-            AndNot(other.bits, other.bits.Length);
-        }
-
-        private void AndNot(BitArray otherArr, int otherLen)
-        {
-            var thisArr = this.bits;
-            int pos = Math.Min(thisArr.Length, otherLen);
-            while (--pos >= 0)
-            {
-                thisArr[pos] &= !otherArr[pos];
-            }
-        }
-
-        // NOTE: no .isEmpty() here because that's trappy (ie,
-        // typically isEmpty is low cost, but this one wouldn't
-        // be)
-
-        /* Flips a range of bits
-         *
-         * @param startIndex lower index
-         * @param endIndex one-past the last bit to flip
-         */
-        //      public void Flip(int startIndex, int endIndex) {
-        //  Debug.Assert(startIndex >= 0 && startIndex < numBits);
-        //  Debug.Assert(endIndex >= 0 && endIndex <= numBits);
-        //  if (endIndex <= startIndex) {
-        //    return;
-        //  }
-
-        //  int startWord = startIndex >> 6;
-        //  int endWord = (endIndex-1) >> 6;
-
-        //  /* Grrr, java shifting wraps around so -1L>>>64 == -1
-        //   * for that reason, make sure not to use endmask if the bits to flip will
-        //   * be zero in the last word (redefine endWord to be the last changed...)
-        //  long startmask = -1L << (startIndex & 0x3f);     // example: 11111...111000
-        //  long endmask = -1L >>> (64-(endIndex & 0x3f));   // example: 00111...111111
-        //  ***/
-
-        //  long startmask = -1L << startIndex;
-        //  long endmask =  -1L >>> -endIndex;  // 64-(endIndex&0x3f) is the same as -endIndex due to wrap
-
-        //  if (startWord == endWord) {
-        //    bits[startWord] ^= (startmask & endmask);
-        //    return;
-        //  }
-
-        //  bits[startWord] ^= startmask;
-
-        //  for (var i=startWord+1; i<endWord; i++) {
-        //    bits[i] = ~bits[i];
-        //  }
-
-        //  bits[endWord] ^= endmask;
-        //}
-
-        /* Sets a range of bits
-         *
-         * @param startIndex lower index
-         * @param endIndex one-past the last bit to set
-         */
-        public void Set(int startIndex, int endIndex)
-        {
-            // Naive implementation
-            for (int i = startIndex; i < endIndex; i++)
-            {
-                Set(i);
-            }
-        }
-
-        //      public void Set(int startIndex, int endIndex) {
-        //  Debug.Assert(startIndex >= 0 && startIndex < numBits);
-        //  Debug.Assert(endIndex >= 0 && endIndex <= numBits);
-        //  if (endIndex <= startIndex) {
-        //    return;
-        //  }
-
-        //  int startWord = startIndex >> 6;
-        //  int endWord = (endIndex-1) >> 6;
-
-        //  long startmask = -1L << startIndex;
-        //  long endmask = -1L >>> -endIndex;  // 64-(endIndex&0x3f) is the same as -endIndex due to wrap
-
-        //  if (startWord == endWord) {
-        //    bits[startWord] |= (startmask & endmask);
-        //    return;
-        //  }
-
-        //  bits[startWord] |= startmask;
-        //  Arrays.Fill(bits, startWord+1, endWord, -1L);
-        //  bits[endWord] |= endmask;
-        //}
-
-        /* Clears a range of bits.
-         *
-         * @param startIndex lower index
-         * @param endIndex one-past the last bit to clear
-         */
-        public void Clear(int startIndex, int endIndex)
-        {
-            for (int i = startIndex; i < endIndex; i++)
-            {
-                Clear(i);
-            }
-        }
-
-        //@Override
-        public FixedBitSet Clone()
-        {
-            return new FixedBitSet(this);
-        }
-
-        /* returns true if both sets have the same bits set */
-        public override bool Equals(Object o)
-        {
-            if (this == o)
-            {
-                return true;
-            }
-
-            var other = o as FixedBitSet;
-            if (other == null)
-            {
-                return false;
-            }
-
-            return bits.Equals(other.bits);
-        }
-
-        public override int GetHashCode()
-        {
-            return bits.GetHashCode();
-        }
-
-        public override DocIdSetIterator Iterator()
-        {
-            return new FixedBitSetIterator(this);
-        }
-
-        /// <summary>
-        /// A FixedBitSet Iterator implementation
-        /// </summary>
-        public class FixedBitSetIterator : DocIdSetIterator
-        {
-            private int curDocId = -1;
-            private readonly IEnumerator enumerator;
-
-            public FixedBitSetIterator(FixedBitSet bitset)
-            {
-                enumerator = bitset.bits.GetEnumerator();
-            }
-
-            public override int DocID()
-            {
-                return curDocId;
-            }
-
-            public override int NextDoc()
-            {
-                while (enumerator.MoveNext())
-                {
-                    ++curDocId;
-                    if ((bool)enumerator.Current) return curDocId;
-                }
-                return curDocId = NO_MORE_DOCS;
-            }
-
-            public override int Advance(int target)
-            {
-                int doc;
-                while ((doc = NextDoc()) < target)
-                {
-                }
-                return doc;
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Util/FunctionQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Util/FunctionQuery.cs b/src/Lucene.Net.Spatial/Util/FunctionQuery.cs
deleted file mode 100644
index 8d5d1c7..0000000
--- a/src/Lucene.Net.Spatial/Util/FunctionQuery.cs
+++ /dev/null
@@ -1,215 +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.
- */
-
-
-using System;
-using Lucene.Net.Index;
-using Lucene.Net.Search;
-using Lucene.Net.Search.Function;
-
-namespace Lucene.Net.Spatial.Util
-{
-    /// <summary>
-    /// Port of Solr's FunctionQuery (v1.4)
-    /// 
-    /// Returns a score for each document based on a ValueSource,
-    /// often some function of the value of a field.
-    /// 
-    /// <b>Note: This API is experimental and may change in non backward-compatible ways in the future</b>
-    /// </summary>
-    public class FunctionQuery : Query
-    {
-        protected readonly ValueSource func;
-
-        public FunctionQuery(ValueSource func)
-        {
-            this.func = func;
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <returns>The associated ValueSource</returns>
-        public ValueSource GetValueSource()
-        {
-            return func;
-        }
-
-        public override Query Rewrite(Index.IndexReader reader)
-        {
-            return this;
-        }
-
-        public override void ExtractTerms(System.Collections.Generic.ISet<Term> terms)
-        {
-            //base.ExtractTerms(terms);
-        }
-
-        protected class FunctionWeight : Weight
-        {
-            protected Searcher searcher;
-            protected float queryNorm;
-            protected float queryWeight;
-            protected readonly FunctionQuery enclosingInstance;
-
-            public FunctionWeight(Searcher searcher, FunctionQuery q)
-            {
-                enclosingInstance = q;
-                this.searcher = searcher;
-                //q.func.CreateWeight(searcher);
-            }
-
-            internal float GetQueryNorm()
-            {
-                return queryNorm;
-            }
-
-            public override Query Query
-            {
-                get { return enclosingInstance; }
-            }
-
-            public override float Value
-            {
-                get { return queryWeight; }
-            }
-
-            public override float GetSumOfSquaredWeights()
-            {
-                queryWeight = enclosingInstance.Boost;
-                return queryWeight * queryWeight;
-            }
-
-            public override void Normalize(float norm)
-            {
-                this.queryNorm = norm;
-                queryWeight *= this.queryNorm;
-            }
-
-            public override Scorer Scorer(IndexReader reader, bool scoreDocsInOrder, bool topScorer)
-            {
-                return new AllScorer(enclosingInstance.GetSimilarity(searcher), reader, this);
-            }
-
-            public override Explanation Explain(IndexReader reader, int doc)
-            {
-                return ((AllScorer)Scorer(reader, true, true)).Explain(doc);
-            }
-        }
-
-        protected class AllScorer : Scorer
-        {
-            readonly IndexReader reader;
-            readonly FunctionWeight weight;
-            readonly int maxDoc;
-            readonly float qWeight;
-            int doc = -1;
-            readonly DocValues vals;
-            readonly bool hasDeletions;
-
-            public AllScorer(Similarity similarity, IndexReader reader, FunctionWeight w)
-                : base(similarity)
-            {
-                this.weight = w;
-                this.qWeight = w.Value;
-                this.reader = reader;
-                this.maxDoc = reader.MaxDoc;
-                this.hasDeletions = reader.HasDeletions;
-                vals = ((FunctionQuery)w.Query).func.GetValues(reader);
-            }
-
-            public override int DocID()
-            {
-                return doc;
-            }
-
-            // instead of matching all docs, we could also embed a query.
-            // the score could either ignore the subscore, or boost it.
-            // Containment:  floatline(foo:myTerm, "myFloatField", 1.0, 0.0f)
-            // Boost:        foo:myTerm^floatline("myFloatField",1.0,0.0f)
-            public override int NextDoc()
-            {
-                for (; ; )
-                {
-                    ++doc;
-                    if (doc >= maxDoc)
-                    {
-                        return doc = NO_MORE_DOCS;
-                    }
-                    if (hasDeletions && reader.IsDeleted(doc)) continue;
-                    return doc;
-                }
-            }
-
-            public override int Advance(int target)
-            {
-                // this will work even if target==NO_MORE_DOCS
-                doc = target - 1;
-                return NextDoc();
-            }
-
-            public override float Score()
-            {
-                float score = qWeight * vals.FloatVal(doc);
-
-                // Current Lucene priority queues can't handle NaN and -Infinity, so
-                // map to -Float.MAX_VALUE. This conditional handles both -infinity
-                // and NaN since comparisons with NaN are always false.
-                return score > float.NegativeInfinity ? score : -float.MaxValue;
-            }
-
-            public /*override*/ Explanation Explain(int doc)
-            {
-                float sc = qWeight * vals.FloatVal(doc);
-
-                Explanation result = new ComplexExplanation
-                  (true, sc, "FunctionQuery(" + ((FunctionQuery)weight.Query).func + "), product of:");
-
-                result.AddDetail(vals.Explain(doc));
-                result.AddDetail(new Explanation(weight.Query.Boost, "boost"));
-                result.AddDetail(new Explanation(weight.GetQueryNorm(), "queryNorm"));
-                return result;
-            }
-        }
-
-        public override Weight CreateWeight(Searcher searcher)
-        {
-            return new FunctionQuery.FunctionWeight(searcher, this);
-        }
-
-        public override string ToString(string field)
-        {
-            float boost = Boost;
-            return (boost != 1.0 ? "(" : "") + func.ToString()
-                    + (boost == 1.0 ? "" : ")^" + boost);
-        }
-
-        public override bool Equals(object o)
-        {
-            var other = o as FunctionQuery;
-
-            if (other == null) return false;
-
-            return this.Boost == other.Boost && this.func.Equals(other.func);
-        }
-
-        public override int GetHashCode()
-        {
-            return (int)(func.GetHashCode() * 31 + BitConverter.DoubleToInt64Bits(Boost));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Util/ReciprocalFloatFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Util/ReciprocalFloatFunction.cs b/src/Lucene.Net.Spatial/Util/ReciprocalFloatFunction.cs
deleted file mode 100644
index 010f628..0000000
--- a/src/Lucene.Net.Spatial/Util/ReciprocalFloatFunction.cs
+++ /dev/null
@@ -1,100 +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.
- */
-
-using System;
-using Lucene.Net.Index;
-using Lucene.Net.Search.Function;
-
-namespace Lucene.Net.Spatial.Util
-{
-    public class ReciprocalFloatFunction : ValueSource
-    {
-        protected readonly ValueSource source;
-        protected readonly float m;
-        protected readonly float a;
-        protected readonly float b;
-
-        /// <summary>
-        /// f(source) = a/(m*float(source)+b)
-        /// </summary>
-        /// <param name="source"></param>
-        /// <param name="m"></param>
-        /// <param name="a"></param>
-        /// <param name="b"></param>
-        public ReciprocalFloatFunction(ValueSource source, float m, float a, float b)
-        {
-            this.source = source;
-            this.m = m;
-            this.a = a;
-            this.b = b;
-        }
-
-        public class FloatDocValues : DocValues
-        {
-            private readonly ReciprocalFloatFunction _enclosingInstance;
-            private readonly DocValues vals;
-
-            public FloatDocValues(ReciprocalFloatFunction enclosingInstance, DocValues vals)
-            {
-                _enclosingInstance = enclosingInstance;
-                this.vals = vals;
-            }
-
-            public override float FloatVal(int doc)
-            {
-                return _enclosingInstance.a / (_enclosingInstance.m * vals.FloatVal(doc) + _enclosingInstance.b);
-            }
-
-            public override string ToString(int doc)
-            {
-                return _enclosingInstance.a + "/("
-                       + _enclosingInstance.m + "*float(" + vals.ToString(doc) + ')'
-                       + '+' + _enclosingInstance.b + ')';
-            }
-        }
-
-        public override DocValues GetValues(IndexReader reader)
-        {
-            var vals = source.GetValues(reader);
-            return new FloatDocValues(this, vals);
-        }
-
-        public override string Description()
-        {
-            return a + "/("
-                   + m + "*float(" + source.Description() + ")"
-                   + "+" + b + ')';
-        }
-
-        public override bool Equals(object o)
-        {
-            if (typeof(ReciprocalFloatFunction) != o.GetType()) return false;
-            var other = (ReciprocalFloatFunction)o;
-            return this.m == other.m
-                   && this.a == other.a
-                   && this.b == other.b
-                   && this.source.Equals(other.source);
-        }
-
-        public override int GetHashCode()
-        {
-            int h = (int)BitConverter.DoubleToInt64Bits(a) + (int)BitConverter.DoubleToInt64Bits(m);
-            h ^= (h << 13) | (int)((uint)h >> 20);
-            return h + ((int)BitConverter.DoubleToInt64Bits(b)) + source.GetHashCode();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Util/ShapeFieldCacheDistanceValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Util/ShapeFieldCacheDistanceValueSource.cs b/src/Lucene.Net.Spatial/Util/ShapeFieldCacheDistanceValueSource.cs
index b487d0c..d1bcb9e 100644
--- a/src/Lucene.Net.Spatial/Util/ShapeFieldCacheDistanceValueSource.cs
+++ b/src/Lucene.Net.Spatial/Util/ShapeFieldCacheDistanceValueSource.cs
@@ -16,9 +16,10 @@
  */
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using Lucene.Net.Index;
-using Lucene.Net.Search.Function;
+using Lucene.Net.Queries.Function;
 using Spatial4n.Core.Context;
 using Spatial4n.Core.Distance;
 using Spatial4n.Core.Shapes;
@@ -33,12 +34,15 @@ namespace Lucene.Net.Spatial.Util
         private readonly ShapeFieldCacheProvider<Point> provider;
         private readonly SpatialContext ctx;
         private readonly Point from;
+        private readonly double multiplier;
 
-        public ShapeFieldCacheDistanceValueSource(SpatialContext ctx, ShapeFieldCacheProvider<Point> provider, Point from)
+        public ShapeFieldCacheDistanceValueSource(SpatialContext ctx, 
+            ShapeFieldCacheProvider<Point> provider, Point from, double multiplier)
         {
             this.ctx = ctx;
             this.from = from;
             this.provider = provider;
+            this.multiplier = multiplier;
         }
 
         public class CachedDistanceFunctionValue : FunctionValues
@@ -56,7 +60,7 @@ namespace Lucene.Net.Spatial.Util
 
                 from = enclosingInstance.from;
                 calculator = enclosingInstance.ctx.GetDistCalc();
-                nullValue = (enclosingInstance.ctx.IsGeo() ? 180 : double.MaxValue);
+                nullValue = (enclosingInstance.ctx.IsGeo() ? 180 * enclosingInstance.multiplier : double.MaxValue);
             }
 
             public override float FloatVal(int doc)
@@ -74,7 +78,7 @@ namespace Lucene.Net.Spatial.Util
                     {
                         v = Math.Min(v, calculator.Distance(from, vals[i]));
                     }
-                    return v;
+                    return v * enclosingInstance.multiplier;
                 }
                 return nullValue;
             }
@@ -93,7 +97,7 @@ namespace Lucene.Net.Spatial.Util
             }
         }
 
-        public override FunctionValues GetValues(IDictionary<object, object> context, AtomicReaderContext readerContext)
+        public override FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
         {
             return new CachedDistanceFunctionValue(readerContext.AtomicReader, this);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Util/TermsFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Util/TermsFilter.cs b/src/Lucene.Net.Spatial/Util/TermsFilter.cs
deleted file mode 100644
index 4acfcef..0000000
--- a/src/Lucene.Net.Spatial/Util/TermsFilter.cs
+++ /dev/null
@@ -1,117 +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.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using Lucene.Net.Index;
-using Lucene.Net.Search;
-
-namespace Lucene.Net.Spatial.Util
-{
-    /// <summary>
-    /// Constructs a filter for docs matching any of the terms added to this class.
-    /// Unlike a RangeFilter this can be used for filtering on multiple terms that are not necessarily in
-    /// a sequence. An example might be a collection of primary keys from a database query result or perhaps
-    /// a choice of "category" labels picked by the end user. As a filter, this is much faster than the
-    /// equivalent query (a BooleanQuery with many "should" TermQueries)
-    /// </summary>
-    public class TermsFilter : Filter
-    {
-        private readonly SortedSet<Term> terms = new SortedSet<Term>();
-
-        /// <summary>
-        /// Adds a term to the list of acceptable terms
-        /// </summary>
-        /// <param name="term"></param>
-        public void AddTerm(Term term)
-        {
-            terms.Add(term);
-        }
-
-        public override DocIdSet GetDocIdSet(IndexReader reader)
-        {
-            var result = new FixedBitSet(reader.MaxDoc);
-            var fields = reader.GetFieldNames(IndexReader.FieldOption.ALL);
-
-            if (fields == null || fields.Count == 0)
-            {
-                return result;
-            }
-
-            String lastField = null;
-            TermsEnumCompatibility termsEnum = null;
-            foreach (Term term in terms)
-            {
-                if (!term.Field.Equals(lastField))
-                {
-                    var termsC = new TermsEnumCompatibility(reader, term.Field);
-                    if (termsC.Term() == null)
-                    {
-                        return result;
-                    }
-                    termsEnum = termsC;
-                    lastField = term.Field;
-                }
-
-                if (terms != null)
-                {
-                    // TODO this check doesn't make sense, decide which variable its supposed to be for
-                    Debug.Assert(termsEnum != null);
-                    if (termsEnum.SeekCeil(term.Text) == TermsEnumCompatibility.SeekStatus.FOUND)
-                    {
-                        termsEnum.Docs(result);
-                    }
-                }
-            }
-            return result;
-        }
-
-        public override bool Equals(object obj)
-        {
-            if (this == obj)
-                return true;
-
-            if ((obj == null) || (obj.GetType() != this.GetType()))
-                return false;
-
-            var test = (TermsFilter)obj;
-            if (terms == test.terms)
-                return true;
-            if (terms == null || terms.Count != test.terms.Count)
-                return false;
-
-            var e1 = terms.GetEnumerator();
-            var e2 = test.terms.GetEnumerator();
-            while (e1.MoveNext() && e2.MoveNext())
-            {
-                if (!e1.Current.Equals(e2.Current)) return false;
-            }
-            return true;
-        }
-
-        public override int GetHashCode()
-        {
-            int hash = 9;
-            foreach (Term term in terms)
-            {
-                hash = 31 * hash + term.GetHashCode();
-            }
-            return hash;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Util/ValueSourceFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Util/ValueSourceFilter.cs b/src/Lucene.Net.Spatial/Util/ValueSourceFilter.cs
index 6bba8c7..bcd73a6 100644
--- a/src/Lucene.Net.Spatial/Util/ValueSourceFilter.cs
+++ b/src/Lucene.Net.Spatial/Util/ValueSourceFilter.cs
@@ -17,8 +17,8 @@
 
 using System;
 using Lucene.Net.Index;
+using Lucene.Net.Queries.Function;
 using Lucene.Net.Search;
-using Lucene.Net.Search.Function;
 using Lucene.Net.Util;
 
 namespace Lucene.Net.Spatial.Util
@@ -46,7 +46,7 @@ namespace Lucene.Net.Spatial.Util
             this.max = max;
         }
 
-        public override DocIdSet GetDocIdSet(AtomicReaderContext context, IBits acceptDocs)
+        public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
         {
             var values = source.GetValues(null, context);
             return new ValueSourceFilteredDocIdSet(startingFilter.GetDocIdSet(context, acceptDocs), values, this);
@@ -64,7 +64,7 @@ namespace Lucene.Net.Spatial.Util
                 this.values = values;
             }
 
-            public override bool Match(int doc)
+            protected override bool Match(int doc)
             {
                 double val = values.DoubleVal(doc);
                 return val >= enclosingFilter.min && val <= enclosingFilter.max;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Vector/DistanceValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Vector/DistanceValueSource.cs b/src/Lucene.Net.Spatial/Vector/DistanceValueSource.cs
index 509146a..d54016f 100644
--- a/src/Lucene.Net.Spatial/Vector/DistanceValueSource.cs
+++ b/src/Lucene.Net.Spatial/Vector/DistanceValueSource.cs
@@ -15,11 +15,12 @@
  * limitations under the License.
  */
 
+using System.Collections;
 using System.Collections.Generic;
 using System.Diagnostics;
 using Lucene.Net.Index;
+using Lucene.Net.Queries.Function;
 using Lucene.Net.Search;
-using Lucene.Net.Search.Function;
 using Lucene.Net.Util;
 using Spatial4n.Core.Distance;
 using Spatial4n.Core.Shapes;
@@ -33,11 +34,13 @@ namespace Lucene.Net.Spatial.Vector
     {
         private readonly Point from;
         private readonly PointVectorStrategy strategy;
+        private readonly double multiplier;
 
-        public DistanceValueSource(PointVectorStrategy strategy, Point from)
+        public DistanceValueSource(PointVectorStrategy strategy, Point from, double multiplier)
         {
             this.strategy = strategy;
             this.from = from;
+            this.multiplier = multiplier;
         }
 
         public override string Description
@@ -45,7 +48,7 @@ namespace Lucene.Net.Spatial.Vector
             get { return "DistanceValueSource(" + strategy + ", " + from + ")"; }
         }
 
-        public override FunctionValues GetValues(IDictionary<object, object> context, AtomicReaderContext readerContext)
+        public override FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
         {
             return new DistanceFunctionValue(this, readerContext.AtomicReader);
         }
@@ -76,9 +79,10 @@ namespace Lucene.Net.Spatial.Vector
             private readonly DistanceValueSource enclosingInstance;
             private readonly Point from;
             private readonly double nullValue;
+            private readonly double multiplier;
 
             private readonly FieldCache.Doubles ptX, ptY;
-            private readonly IBits validX, validY;
+            private readonly Bits validX, validY;
 
             public DistanceFunctionValue(DistanceValueSource enclosingInstance, AtomicReader reader)
             {
@@ -90,8 +94,9 @@ namespace Lucene.Net.Spatial.Vector
                 validY = FieldCache.DEFAULT.GetDocsWithField(reader, enclosingInstance.strategy.FieldNameY);
 
                 from = enclosingInstance.from;
+                multiplier = enclosingInstance.multiplier;
                 calculator = enclosingInstance.strategy.SpatialContext.GetDistCalc();
-                nullValue = (enclosingInstance.strategy.SpatialContext.IsGeo() ? 180 : double.MaxValue);
+                nullValue = (enclosingInstance.strategy.SpatialContext.IsGeo() ? 180 * multiplier : double.MaxValue);
             }
 
             public override float FloatVal(int doc)
@@ -102,10 +107,10 @@ namespace Lucene.Net.Spatial.Vector
             public override double DoubleVal(int doc)
             {
                 // make sure it has minX and area
-                if (validX[doc])
+                if (validX.Get(doc))
                 {
-                    Debug.Assert(validY[doc]);
-                    return calculator.Distance(from, ptX.Get(doc), ptY.Get(doc));
+                    Debug.Assert(validY.Get(doc));
+                    return calculator.Distance(from, ptX.Get(doc), ptY.Get(doc)) * multiplier;
                 }
                 return nullValue;
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/Vector/PointVectorStrategy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/Vector/PointVectorStrategy.cs b/src/Lucene.Net.Spatial/Vector/PointVectorStrategy.cs
index 0f1238f..aec23a0 100644
--- a/src/Lucene.Net.Spatial/Vector/PointVectorStrategy.cs
+++ b/src/Lucene.Net.Spatial/Vector/PointVectorStrategy.cs
@@ -17,8 +17,8 @@
 
 using System;
 using Lucene.Net.Documents;
+using Lucene.Net.Queries.Function;
 using Lucene.Net.Search;
-using Lucene.Net.Search.Function;
 using Lucene.Net.Spatial.Queries;
 using Lucene.Net.Spatial.Util;
 using Spatial4n.Core.Context;
@@ -96,9 +96,9 @@ namespace Lucene.Net.Spatial.Vector
             return f;
         }
 
-        public override ValueSource MakeDistanceValueSource(Point queryPoint)
+        public override ValueSource MakeDistanceValueSource(Point queryPoint, double multiplier)
         {
-            return new DistanceValueSource(this, queryPoint);
+            return new DistanceValueSource(this, queryPoint, multiplier);
         }
 
         public override ConstantScoreQuery MakeQuery(SpatialArgs args)
@@ -192,8 +192,8 @@ namespace Lucene.Net.Spatial.Vector
             }
             Query spatialRankingQuery = new FunctionQuery(valueSource);
             var bq = new BooleanQuery();
-            bq.Add(spatial, Occur.MUST);
-            bq.Add(spatialRankingQuery, Occur.MUST);
+            bq.Add(spatial, BooleanClause.Occur.MUST);
+            bq.Add(spatialRankingQuery, BooleanClause.Occur.MUST);
             return bq;
 
         }
@@ -216,12 +216,12 @@ namespace Lucene.Net.Spatial.Vector
         private Query MakeWithin(Rectangle bbox)
         {
             var bq = new BooleanQuery();
-            const Occur MUST = Occur.MUST;
+            const BooleanClause.Occur MUST = BooleanClause.Occur.MUST;
             if (bbox.GetCrossesDateLine())
             {
                 //use null as performance trick since no data will be beyond the world bounds
-                bq.Add(RangeQuery(fieldNameX, null /*-180*/, bbox.GetMaxX()), Occur.SHOULD);
-                bq.Add(RangeQuery(fieldNameX, bbox.GetMinX(), null /*+180*/), Occur.SHOULD);
+                bq.Add(RangeQuery(fieldNameX, null /*-180*/, bbox.GetMaxX()), BooleanClause.Occur.SHOULD);
+                bq.Add(RangeQuery(fieldNameX, bbox.GetMinX(), null /*+180*/), BooleanClause.Occur.SHOULD);
                 bq.MinimumNumberShouldMatch = 1; //must match at least one of the SHOULD
             }
             else
@@ -253,7 +253,7 @@ namespace Lucene.Net.Spatial.Vector
                 throw new InvalidOperationException("MakeDisjoint doesn't handle dateline cross");
             Query qX = RangeQuery(fieldNameX, bbox.GetMinX(), bbox.GetMaxX());
             Query qY = RangeQuery(fieldNameY, bbox.GetMinY(), bbox.GetMaxY());
-            var bq = new BooleanQuery { { qX, Occur.MUST_NOT }, { qY, Occur.MUST_NOT } };
+            var bq = new BooleanQuery { { qX, BooleanClause.Occur.MUST_NOT }, { qY, BooleanClause.Occur.MUST_NOT } };
             return bq;
         }
     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4a485ee4/src/Lucene.Net.Spatial/packages.config
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Spatial/packages.config b/src/Lucene.Net.Spatial/packages.config
new file mode 100644
index 0000000..27237fc
--- /dev/null
+++ b/src/Lucene.Net.Spatial/packages.config
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Spatial4n.Core" version="0.3" targetFramework="net451" />
+</packages>
\ No newline at end of file


Mime
View raw message