lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [58/62] [abbrv] lucenenet git commit: Lucene.Net.Core.Search: Deleted obsolete files that are no longer in use
Date Sat, 01 Apr 2017 01:09:51 GMT
Lucene.Net.Core.Search: Deleted obsolete files that are no longer in use


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/0cc1473d
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/0cc1473d
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/0cc1473d

Branch: refs/heads/api-work
Commit: 0cc1473d3aafaaa1e8c9ef5c27e138dfbe9732ce
Parents: 228b970
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sat Apr 1 04:06:25 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sat Apr 1 07:52:02 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Search/CachingSpanFilter.cs | 124 ----
 src/Lucene.Net.Core/Search/DefaultSimilarity.cs | 108 ---
 .../Search/FieldDocSortedHitQueue.cs            | 148 ----
 src/Lucene.Net.Core/Search/FilterManager.cs     | 203 ------
 src/Lucene.Net.Core/Search/FilteredTermEnum.cs  | 127 ----
 .../Search/Function/ByteFieldSource.cs          | 136 ----
 .../Search/Function/CustomScoreProvider.cs      | 175 -----
 .../Search/Function/CustomScoreQuery.cs         | 579 ---------------
 .../Search/Function/DocValues.cs                | 206 ------
 .../Search/Function/FieldCacheSource.cs         | 110 ---
 .../Search/Function/FieldScoreQuery.cs          | 139 ----
 .../Search/Function/FloatFieldSource.cs         | 131 ----
 .../Search/Function/IntFieldSource.cs           | 136 ----
 .../Search/Function/OrdFieldSource.cs           | 146 ----
 .../Search/Function/ReverseOrdFieldSource.cs    | 158 -----
 .../Search/Function/ShortFieldSource.cs         | 136 ----
 .../Search/Function/ValueSource.cs              |  69 --
 .../Search/Function/ValueSourceQuery.cs         | 235 -------
 src/Lucene.Net.Core/Search/FuzzyTermEnum.cs     | 318 ---------
 .../Grouping/AbstractDistinctValuesCollector.cs |  49 --
 .../Grouping/TermDistinctValuesCollector.cs     | 148 ----
 src/Lucene.Net.Core/Search/MultiSearcher.cs     | 458 ------------
 .../Search/ParallelMultiSearcher.cs             | 199 ------
 src/Lucene.Net.Core/Search/PhraseScorer.cs      | 224 ------
 src/Lucene.Net.Core/Search/PrefixTermEnum.cs    |  71 --
 src/Lucene.Net.Core/Search/QueryTermVector.cs   | 167 -----
 src/Lucene.Net.Core/Search/Searchable.cs        | 169 -----
 src/Lucene.Net.Core/Search/Searcher.cs          | 192 -----
 src/Lucene.Net.Core/Search/Similarity.cs        | 697 -------------------
 .../Search/SimilarityDelegator.cs               |  80 ---
 src/Lucene.Net.Core/Search/SingleTermEnum.cs    |  70 --
 src/Lucene.Net.Core/Search/SpanFilter.cs        |  47 --
 src/Lucene.Net.Core/Search/SpanFilterResult.cs  | 116 ---
 src/Lucene.Net.Core/Search/SpanQueryFilter.cs   | 109 ---
 src/Lucene.Net.Core/Search/TermRangeTermEnum.cs | 161 -----
 src/Lucene.Net.Core/Search/WildcardTermEnum.cs  | 196 ------
 src/Lucene.Net.Core/project.json                |  42 --
 37 files changed, 6579 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/CachingSpanFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/CachingSpanFilter.cs b/src/Lucene.Net.Core/Search/CachingSpanFilter.cs
deleted file mode 100644
index 4f0f2ee..0000000
--- a/src/Lucene.Net.Core/Search/CachingSpanFilter.cs
+++ /dev/null
@@ -1,124 +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.Runtime.InteropServices;
-using IndexReader = Lucene.Net.Index.IndexReader;
-
-namespace Lucene.Net.Search
-{
-    
-    /// <summary> Wraps another SpanFilter's result and caches it.  The purpose is to allow
-    /// filters to simply filter, and then wrap with this class to add caching.
-    /// </summary>
-    [Serializable]
-    public class CachingSpanFilter:SpanFilter
-    {
-        private SpanFilter filter;
-        
-        /// <summary> A transient Filter cache (internal because of test)</summary>
-        [NonSerialized]
-        internal CachingWrapperFilter.FilterCache<SpanFilterResult> cache;
-
-        /// <summary>
-        /// New deletions always result in a cache miss, by default
-        /// (<see cref="CachingWrapperFilter.DeletesMode.RECACHE" />.
-        /// <param name="filter">Filter to cache results of
-        /// </param>
-        /// </summary>
-        public CachingSpanFilter(SpanFilter filter): this(filter, CachingWrapperFilter.DeletesMode.RECACHE)
-        {
-            
-        }
-
-        /// <summary>New deletions always result in a cache miss, specify the <paramref name="deletesMode"/></summary>
-        /// <param name="filter">Filter to cache results of</param>
-        /// <param name="deletesMode">See <see cref="CachingWrapperFilter.DeletesMode" /></param>
-        public CachingSpanFilter(SpanFilter filter, CachingWrapperFilter.DeletesMode deletesMode)
-        {
-            this.filter = filter;
-            if (deletesMode == CachingWrapperFilter.DeletesMode.DYNAMIC)
-            {
-                throw new System.ArgumentException("DeletesMode.DYNAMIC is not supported");
-            }
-            this.cache = new AnonymousFilterCache(deletesMode);
-        }
-
-        class AnonymousFilterCache : CachingWrapperFilter.FilterCache<SpanFilterResult>
-        {
-            public AnonymousFilterCache(CachingWrapperFilter.DeletesMode deletesMode) : base(deletesMode)
-            {
-            }
-
-            protected override SpanFilterResult MergeDeletes(IndexReader reader, SpanFilterResult docIdSet)
-            {
-                throw new System.ArgumentException("DeletesMode.DYNAMIC is not supported");
-            }
-        }
-        
-        public override DocIdSet GetDocIdSet(IndexReader reader)
-        {
-            SpanFilterResult result = GetCachedResult(reader);
-            return result != null?result.DocIdSet:null;
-        }
-
-        // for testing
-        public int hitCount, missCount;
-
-        private SpanFilterResult GetCachedResult(IndexReader reader)
-        {
-            object coreKey = reader.FieldCacheKey;
-            object delCoreKey = reader.HasDeletions ? reader.DeletesCacheKey : coreKey;
-
-            SpanFilterResult result = cache.Get(reader, coreKey, delCoreKey);
-            if (result != null) {
-                hitCount++;
-                return result;
-            }
-
-            missCount++;
-            result = filter.BitSpans(reader);
-
-            cache.Put(coreKey, delCoreKey, result);
-            return result;
-        }
-        
-        
-        public override SpanFilterResult BitSpans(IndexReader reader)
-        {
-            return GetCachedResult(reader);
-        }
-        
-        public override System.String ToString()
-        {
-            return "CachingSpanFilter(" + filter + ")";
-        }
-        
-        public  override bool Equals(System.Object o)
-        {
-            if (!(o is CachingSpanFilter))
-                return false;
-            return this.filter.Equals(((CachingSpanFilter) o).filter);
-        }
-        
-        public override int GetHashCode()
-        {
-            return filter.GetHashCode() ^ 0x1117BF25;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/DefaultSimilarity.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/DefaultSimilarity.cs b/src/Lucene.Net.Core/Search/DefaultSimilarity.cs
deleted file mode 100644
index fb6e01e..0000000
--- a/src/Lucene.Net.Core/Search/DefaultSimilarity.cs
+++ /dev/null
@@ -1,108 +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 FieldInvertState = Lucene.Net.Index.FieldInvertState;
-
-namespace Lucene.Net.Search
-{
-    
-    /// <summary>Expert: Default scoring implementation. </summary>
-    [Serializable]
-    public class DefaultSimilarity:Similarity
-    {
-        
-        /// <summary>Implemented as
-        /// <c>state.getBoost()*lengthNorm(numTerms)</c>, where
-        /// <c>numTerms</c> is <see cref="FieldInvertState.Length" /> if <see cref="DiscountOverlaps" />
-        /// is false, else it's <see cref="FieldInvertState.Length" />
-        /// - <see cref="FieldInvertState.NumOverlap" />
-        ///.
-        /// 
-        /// <p/><b>WARNING</b>: This API is new and experimental, and may suddenly
-        /// change.<p/> 
-        /// </summary>
-        public override float ComputeNorm(System.String field, FieldInvertState state)
-        {
-            int numTerms;
-            if (internalDiscountOverlaps)
-                numTerms = state.Length - state.NumOverlap;
-            else
-                numTerms = state.Length;
-            return (state.Boost * LengthNorm(field, numTerms));
-        }
-        
-        /// <summary>Implemented as <c>1/sqrt(numTerms)</c>. </summary>
-        public override float LengthNorm(System.String fieldName, int numTerms)
-        {
-            return (float) (1.0 / System.Math.Sqrt(numTerms));
-        }
-        
-        /// <summary>Implemented as <c>1/sqrt(sumOfSquaredWeights)</c>. </summary>
-        public override float QueryNorm(float sumOfSquaredWeights)
-        {
-            return (float) (1.0 / System.Math.Sqrt(sumOfSquaredWeights));
-        }
-        
-        /// <summary>Implemented as <c>sqrt(freq)</c>. </summary>
-        public override float Tf(float freq)
-        {
-            return (float) System.Math.Sqrt(freq);
-        }
-        
-        /// <summary>Implemented as <c>1 / (distance + 1)</c>. </summary>
-        public override float SloppyFreq(int distance)
-        {
-            return 1.0f / (distance + 1);
-        }
-        
-        /// <summary>Implemented as <c>log(numDocs/(docFreq+1)) + 1</c>. </summary>
-        public override float Idf(int docFreq, int numDocs)
-        {
-            return (float) (System.Math.Log(numDocs / (double) (docFreq + 1)) + 1.0);
-        }
-        
-        /// <summary>Implemented as <c>overlap / maxOverlap</c>. </summary>
-        public override float Coord(int overlap, int maxOverlap)
-        {
-            return overlap / (float) maxOverlap;
-        }
-
-        /// <seealso cref="DiscountOverlaps">
-        /// </seealso>
-        // Default false
-        protected internal bool internalDiscountOverlaps;
-
-        /// <summary>Determines whether overlap tokens (Tokens with
-        /// 0 position increment) are ignored when computing
-        /// norm.  By default this is false, meaning overlap
-        /// tokens are counted just like non-overlap tokens.
-        /// 
-        /// <p/><b>WARNING</b>: This API is new and experimental, and may suddenly
-        /// change.<p/>
-        /// 
-        /// </summary>
-        /// <seealso cref="ComputeNorm">
-        /// </seealso>
-        public virtual bool DiscountOverlaps
-        {
-            get { return internalDiscountOverlaps; }
-            set { internalDiscountOverlaps = value; }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/FieldDocSortedHitQueue.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FieldDocSortedHitQueue.cs b/src/Lucene.Net.Core/Search/FieldDocSortedHitQueue.cs
deleted file mode 100644
index 40248da..0000000
--- a/src/Lucene.Net.Core/Search/FieldDocSortedHitQueue.cs
+++ /dev/null
@@ -1,148 +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.Util;
-
-namespace Lucene.Net.Search
-{
-    
-    /// <summary> Expert: Collects sorted results from Searchable's and collates them.
-    /// The elements put into this queue must be of type FieldDoc.
-    /// 
-    /// <p/>Created: Feb 11, 2004 2:04:21 PM
-    /// 
-    /// </summary>
-    /// <since>   lucene 1.4
-    /// </since>
-    class FieldDocSortedHitQueue : PriorityQueue<FieldDoc>
-    {
-        internal volatile SortField[] fields = null;
-        
-        // used in the case where the fields are sorted by locale
-        // based strings
-        internal volatile System.Globalization.CompareInfo[] collators;
-        
-        
-        /// <summary> Creates a hit queue sorted by the given list of fields.</summary>
-        /// <param name="size">The number of hits to retain.  Must be greater than zero.</param>
-        internal FieldDocSortedHitQueue(int size)
-        {
-            Initialize(size);
-        }
-        
-        
-        /// <summary> Allows redefinition of sort fields if they are <c>null</c>.
-        /// This is to handle the case using ParallelMultiSearcher where the
-        /// original list contains AUTO and we don't know the actual sort
-        /// type until the values come back.  The fields can only be set once.
-        /// This method is thread safe.
-        /// </summary>
-        /// <param name="fields"></param>
-        internal virtual void  SetFields(SortField[] fields)
-        {
-            lock (this)
-            {
-                this.fields = fields;
-                this.collators = HasCollators(fields);
-            }
-        }
-
-        /// <summary>Returns the fields being used to sort. </summary>
-        internal virtual SortField[] GetFields()
-        {
-            return fields;
-        }
-
-
-        /// <summary>Returns an array of collators, possibly <c>null</c>.  The collators
-        /// correspond to any SortFields which were given a specific locale.
-        /// </summary>
-        /// <param name="fields">Array of sort fields.</param>
-        /// <returns> Array, possibly <c>null</c>.</returns>
-        private System.Globalization.CompareInfo[] HasCollators(SortField[] fields)
-        {
-            if (fields == null)
-                return null;
-            System.Globalization.CompareInfo[] ret = new System.Globalization.CompareInfo[fields.Length];
-            for (int i = 0; i < fields.Length; ++i)
-            {
-                System.Globalization.CultureInfo locale = fields[i].Locale;
-                if (locale != null)
-                    ret[i] = locale.CompareInfo;
-            }
-            return ret;
-        }
-        
-        
-        /// <summary> Returns whether <c>a</c> is less relevant than <c>b</c>.</summary>
-        /// <param name="docA">ScoreDoc</param>
-        /// <param name="docB">ScoreDoc</param>
-        /// <returns><c>true</c> if document <c>a</c> should be sorted after document <c>b</c>.</returns>
-        public override bool LessThan(FieldDoc docA, FieldDoc docB)
-        {
-            int n = fields.Length;
-            int c = 0;
-            for (int i = 0; i < n && c == 0; ++i)
-            {
-                int type = fields[i].Type;
-                if(type == SortField.STRING)
-                {
-                    string s1 = (string) docA.fields[i];
-                    string s2 = (string) docB.fields[i];
-                    // null values need to be sorted first, because of how FieldCache.getStringIndex()
-                    // works - in that routine, any documents without a value in the given field are
-                    // put first.  If both are null, the next SortField is used
-                    if (s1 == null)
-                    {
-                        c = (s2 == null) ? 0 : -1;
-                    }
-                    else if (s2 == null)
-                    {
-                        c = 1;
-                    }
-                    else if (fields[i].Locale == null)
-                    {
-                        c = s1.CompareTo(s2);
-                    }
-                    else
-                    {
-                        c = collators[i].Compare(s1, s2);
-                    }
-                }
-                else
-                {
-                    c = docA.fields[i].CompareTo(docB.fields[i]);
-                    if (type == SortField.SCORE)
-                    {
-                        c = -c;
-                    }
-                }
-                if (fields[i].Reverse)
-                {
-                    c = - c;
-                }
-            }
-            
-            // avoid random sort order that could lead to duplicates (bug #31241):
-            if (c == 0)
-                return docA.Doc > docB.Doc;
-            
-            return c > 0;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/FilterManager.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FilterManager.cs b/src/Lucene.Net.Core/Search/FilterManager.cs
deleted file mode 100644
index dddc36e..0000000
--- a/src/Lucene.Net.Core/Search/FilterManager.cs
+++ /dev/null
@@ -1,203 +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.Linq;
-using Lucene.Net.Support;
-
-namespace Lucene.Net.Search
-{
-    
-    /// <summary> Filter caching singleton.  It can be used 
-    /// to save filters locally for reuse.
-    /// This class makes it possble to cache Filters even when using RMI, as it
-    /// keeps the cache on the seaercher side of the RMI connection.
-    /// 
-    /// Also could be used as a persistent storage for any filter as long as the
-    /// filter provides a proper hashCode(), as that is used as the key in the cache.
-    /// 
-    /// The cache is periodically cleaned up from a separate thread to ensure the
-    /// cache doesn't exceed the maximum size.
-    /// </summary>
-    public class FilterManager
-    {
-        
-        protected internal static FilterManager manager;
-        
-        /// <summary>The default maximum number of Filters in the cache </summary>
-        protected internal const int DEFAULT_CACHE_CLEAN_SIZE = 100;
-        /// <summary>The default frequency of cache clenup </summary>
-        protected internal const long DEFAULT_CACHE_SLEEP_TIME = 1000 * 60 * 10;
-        
-        /// <summary>The cache itself </summary>
-        protected internal IDictionary<int, FilterItem> cache;
-        /// <summary>Maximum allowed cache size </summary>
-        protected internal int cacheCleanSize;
-        /// <summary>Cache cleaning frequency </summary>
-        protected internal long cleanSleepTime;
-        /// <summary>Cache cleaner that runs in a separate thread </summary>
-        protected internal FilterCleaner internalFilterCleaner;
-
-        private static readonly object _staticSyncObj = new object();
-        public static FilterManager Instance
-        {
-            get
-            {
-                lock (_staticSyncObj)
-                {
-                    return manager ?? (manager = new FilterManager());
-                }
-            }
-        }
-
-        /// <summary> Sets up the FilterManager singleton.</summary>
-        protected internal FilterManager()
-        {
-            cache = new HashMap<int, FilterItem>();
-            cacheCleanSize = DEFAULT_CACHE_CLEAN_SIZE; // Let the cache get to 100 items
-            cleanSleepTime = DEFAULT_CACHE_SLEEP_TIME; // 10 minutes between cleanings
-            
-            internalFilterCleaner = new FilterCleaner(this);
-            ThreadClass fcThread = new ThreadClass(new System.Threading.ThreadStart(internalFilterCleaner.Run));
-            // setto be a Daemon so it doesn't have to be stopped
-            fcThread.IsBackground = true;
-            fcThread.Start();
-        }
-
-        /// <summary> Sets the max size that cache should reach before it is cleaned up</summary>
-        /// <param name="value"> maximum allowed cache size </param>
-        public virtual void SetCacheSize(int value)
-        {
-            this.cacheCleanSize = value;
-        }
-
-        /// <summary> Sets the cache cleaning frequency in milliseconds.</summary>
-        /// <param name="value"> cleaning frequency in millioseconds </param>
-        public virtual void SetCleanThreadSleepTime(long value)
-        {
-            this.cleanSleepTime = value;
-        }
-
-        /// <summary> Returns the cached version of the filter.  Allows the caller to pass up
-        /// a small filter but this will keep a persistent version around and allow
-        /// the caching filter to do its job.
-        /// 
-        /// </summary>
-        /// <param name="filter">The input filter
-        /// </param>
-        /// <returns> The cached version of the filter
-        /// </returns>
-        public virtual Filter GetFilter(Filter filter)
-        {
-            lock (cache)
-            {
-                FilterItem fi = null;
-                fi = cache[filter.GetHashCode()];
-                if (fi != null)
-                {
-                    fi.timestamp = System.DateTime.UtcNow.Ticks;
-                    return fi.filter;
-                }
-                cache[filter.GetHashCode()] = new FilterItem(filter);
-                return filter;
-            }
-        }
-        
-        /// <summary> Holds the filter and the last time the filter was used, to make LRU-based
-        /// cache cleaning possible.
-        /// TODO: Clean this up when we switch to Java 1.5
-        /// </summary>
-        protected internal class FilterItem
-        {
-            public Filter filter;
-            public long timestamp;
-            
-            public FilterItem(Filter filter)
-            {
-                this.filter = filter;
-                this.timestamp = System.DateTime.UtcNow.Ticks;
-            }
-        }
-        
-        
-        /// <summary> Keeps the cache from getting too big.
-        /// If we were using Java 1.5, we could use LinkedHashMap and we would not need this thread
-        /// to clean out the cache.
-        /// 
-        /// The SortedSet sortedFilterItems is used only to sort the items from the cache,
-        /// so when it's time to clean up we have the TreeSet sort the FilterItems by
-        /// timestamp.
-        /// 
-        /// Removes 1.5 * the numbers of items to make the cache smaller.
-        /// For example:
-        /// If cache clean size is 10, and the cache is at 15, we would remove (15 - 10) * 1.5 = 7.5 round up to 8.
-        /// This way we clean the cache a bit more, and avoid having the cache cleaner having to do it frequently.
-        /// </summary>
-        protected internal class FilterCleaner : IThreadRunnable
-        {
-            private class FilterItemComparer : IComparer<KeyValuePair<int, FilterItem>>
-            {
-                #region IComparer<FilterItem> Members
-
-                public int Compare(KeyValuePair<int, FilterItem> x, KeyValuePair<int, FilterItem> y)
-                {
-                    return x.Value.timestamp.CompareTo(y.Value.timestamp);
-                }
-
-                #endregion
-            }
-            
-            private bool running = true;
-            private FilterManager manager;
-            private ISet<KeyValuePair<int, FilterItem>> sortedFilterItems;
-            
-            public FilterCleaner(FilterManager enclosingInstance)
-            {
-                this.manager = enclosingInstance;
-                sortedFilterItems = new SortedSet<KeyValuePair<int, FilterItem>>(new FilterItemComparer());
-            }
-            
-            public virtual void  Run()
-            {
-                while (running)
-                {
-                    // sort items from oldest to newest 
-                    // we delete the oldest filters 
-                    if (this.manager.cache.Count > this.manager.cacheCleanSize)
-                    {
-                        // empty the temporary set
-                        sortedFilterItems.Clear();
-                        lock (this.manager.cache)
-                        {
-                            sortedFilterItems.UnionWith(this.manager.cache);
-                            int numToDelete = (int)((this.manager.cache.Count - this.manager.cacheCleanSize) * 1.5);
-
-                            //delete all of the cache entries not used in a while
-                            sortedFilterItems.ExceptWith(sortedFilterItems.Take(numToDelete).ToArray());
-                        }
-                        // empty the set so we don't tie up the memory
-                        sortedFilterItems.Clear();
-                    }
-                    // take a nap
-                    System.Threading.Thread.Sleep(new System.TimeSpan((System.Int64)10000 * this.manager.cleanSleepTime));
-                    
-                }
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/FilteredTermEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FilteredTermEnum.cs b/src/Lucene.Net.Core/Search/FilteredTermEnum.cs
deleted file mode 100644
index 5ebd863..0000000
--- a/src/Lucene.Net.Core/Search/FilteredTermEnum.cs
+++ /dev/null
@@ -1,127 +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 Term = Lucene.Net.Index.Term;
-using TermEnum = Lucene.Net.Index.TermEnum;
-
-namespace Lucene.Net.Search
-{
-    
-    /// <summary>Abstract class for enumerating a subset of all terms. 
-    /// <p/>Term enumerations are always ordered by Term.compareTo().  Each term in
-    /// the enumeration is greater than all that precede it.  
-    /// </summary>
-    public abstract class FilteredTermEnum:TermEnum
-    {
-        /// <summary>the current term </summary>
-        protected internal Term currentTerm = null;
-        
-        /// <summary>the delegate enum - to set this member use <see cref="SetEnum" /> </summary>
-        protected internal TermEnum actualEnum = null;
-
-        protected FilteredTermEnum()
-        {
-        }
-        
-        /// <summary>Equality compare on the term </summary>
-        protected internal abstract bool TermCompare(Term term);
-        
-        /// <summary>Equality measure on the term </summary>
-        public abstract float Difference();
-        
-        /// <summary>Indicates the end of the enumeration has been reached </summary>
-        public abstract bool EndEnum();
-
-        private bool isDisposed;
-        
-        /// <summary> use this method to set the actual TermEnum (e.g. in ctor),
-        /// it will be automatically positioned on the first matching term.
-        /// </summary>
-        protected internal virtual void  SetEnum(TermEnum actualEnum)
-        {
-            this.actualEnum = actualEnum;
-            // Find the first term that matches
-            Term term = actualEnum.Term;
-            if (term != null && TermCompare(term))
-                currentTerm = term;
-            else
-                Next();
-        }
-        
-        /// <summary> Returns the docFreq of the current Term in the enumeration.
-        /// Returns -1 if no Term matches or all terms have been enumerated.
-        /// </summary>
-        public override int DocFreq()
-        {
-            if (currentTerm == null)
-                return - 1;
-            System.Diagnostics.Debug.Assert(actualEnum != null);
-            return actualEnum.DocFreq();
-        }
-        
-        /// <summary>Increments the enumeration to the next element.  True if one exists. </summary>
-        public override bool Next()
-        {
-            if (actualEnum == null)
-                return false; // the actual enumerator is not initialized!
-            currentTerm = null;
-            while (currentTerm == null)
-            {
-                if (EndEnum())
-                    return false;
-                if (actualEnum.Next())
-                {
-                    Term term = actualEnum.Term;
-                    if (TermCompare(term))
-                    {
-                        currentTerm = term;
-                        return true;
-                    }
-                }
-                else
-                    return false;
-            }
-            currentTerm = null;
-            return false;
-        }
-
-        /// <summary>Returns the current Term in the enumeration.
-        /// Returns null if no Term matches or all terms have been enumerated. 
-        /// </summary>
-        public override Term Term
-        {
-            get { return currentTerm; }
-        }
-
-        protected override void Dispose(bool disposing)
-        {
-            if (isDisposed) return;
-
-            if (disposing)
-            {
-                if (actualEnum != null)
-                    actualEnum.Close();
-                currentTerm = null;
-                actualEnum = null;
-            }
-
-            isDisposed = true;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/Function/ByteFieldSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Function/ByteFieldSource.cs b/src/Lucene.Net.Core/Search/Function/ByteFieldSource.cs
deleted file mode 100644
index acb7407..0000000
--- a/src/Lucene.Net.Core/Search/Function/ByteFieldSource.cs
+++ /dev/null
@@ -1,136 +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 IndexReader = Lucene.Net.Index.IndexReader;
-using FieldCache = Lucene.Net.Search.FieldCache;
-
-namespace Lucene.Net.Search.Function
-{
-    
-    /// <summary> Expert: obtains single byte field values from the 
-    /// <see cref="Lucene.Net.Search.FieldCache">FieldCache</see>
-    /// using <c>getBytes()</c> and makes those values 
-    /// available as other numeric types, casting as needed.
-    /// 
-    /// <p/><font color="#FF0000">
-    /// WARNING: The status of the <b>Search.Function</b> package is experimental. 
-    /// The APIs introduced here might change in the future and will not be 
-    /// supported anymore in such a case.</font>
-    /// 
-    /// </summary>
-    /// <seealso cref="Lucene.Net.Search.Function.FieldCacheSource"> for requirements"
-    /// on the field. 
-    /// 
-    /// <p/><b>NOTE</b>: with the switch in 2.9 to segment-based
-    /// searching, if <see cref="FieldCacheSource.GetValues" /> is invoked with a
-    /// composite (multi-segment) reader, this can easily cause
-    /// double RAM usage for the values in the FieldCache.  It's
-    /// best to switch your application to pass only atomic
-    /// (single segment) readers to this API.<p/>
-    /// </seealso>
-    [Serializable]
-    public class ByteFieldSource:FieldCacheSource
-    {
-        private class AnonymousClassDocValues:DocValues
-        {
-            public AnonymousClassDocValues(sbyte[] arr, ByteFieldSource enclosingInstance)
-            {
-                InitBlock(arr, enclosingInstance);
-            }
-            private void  InitBlock(sbyte[] arr, ByteFieldSource enclosingInstance)
-            {
-                this.arr = arr;
-                this.enclosingInstance = enclosingInstance;
-            }
-            private sbyte[] arr;
-            private ByteFieldSource enclosingInstance;
-            public ByteFieldSource Enclosing_Instance
-            {
-                get
-                {
-                    return enclosingInstance;
-                }
-                
-            }
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.DocValues.floatVal(int) */
-            public override float FloatVal(int doc)
-            {
-                return (float) arr[doc];
-            }
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.DocValues.intVal(int) */
-            public override int IntVal(int doc)
-            {
-                return arr[doc];
-            }
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.DocValues.toString(int) */
-            public override System.String ToString(int doc)
-            {
-                return Enclosing_Instance.Description() + '=' + IntVal(doc);
-            }
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.DocValues.getInnerArray() */
-
-            protected internal override object InnerArray
-            {
-                get { return arr; }
-            }
-        }
-        private Lucene.Net.Search.ByteParser parser;
-        
-        /// <summary> Create a cached byte field source with default string-to-byte parser. </summary>
-        public ByteFieldSource(System.String field):this(field, null)
-        {
-        }
-        
-        /// <summary> Create a cached byte field source with a specific string-to-byte parser. </summary>
-        public ByteFieldSource(System.String field, Lucene.Net.Search.ByteParser parser):base(field)
-        {
-            this.parser = parser;
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.ValueSource.description() */
-        public override System.String Description()
-        {
-            return "byte(" + base.Description() + ')';
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.FieldCacheSource.getCachedValues(Lucene.Net.Search.FieldCache, java.lang.String, Lucene.Net.Index.IndexReader) */
-        public override DocValues GetCachedFieldValues(FieldCache cache, System.String field, IndexReader reader)
-        {
-            sbyte[] arr = cache.GetBytes(reader, field, parser);
-            return new AnonymousClassDocValues(arr, this);
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.FieldCacheSource.cachedFieldSourceEquals(Lucene.Net.Search.Function.FieldCacheSource) */
-        public override bool CachedFieldSourceEquals(FieldCacheSource o)
-        {
-            if (o.GetType() != typeof(ByteFieldSource))
-            {
-                return false;
-            }
-            ByteFieldSource other = (ByteFieldSource) o;
-            return this.parser == null?other.parser == null:this.parser.GetType() == other.parser.GetType();
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.FieldCacheSource.cachedFieldSourceHashCode() */
-        public override int CachedFieldSourceHashCode()
-        {
-            return parser == null?typeof(System.SByte).GetHashCode():parser.GetType().GetHashCode();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/Function/CustomScoreProvider.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Function/CustomScoreProvider.cs b/src/Lucene.Net.Core/Search/Function/CustomScoreProvider.cs
deleted file mode 100644
index 630edf4..0000000
--- a/src/Lucene.Net.Core/Search/Function/CustomScoreProvider.cs
+++ /dev/null
@@ -1,175 +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.Text;
-
-using Lucene.Net.Index;
-
-namespace Lucene.Net.Search.Function
-{
-    /// <summary>
-    /// An instance of this subclass should be returned by
-    /// <see cref="CustomScoreQuery.GetCustomScoreProvider" />, if you want
-    /// to modify the custom score calculation of a <see cref="CustomScoreQuery" />.
-    /// <para>Since Lucene 2.9, queries operate on each segment of an Index separately,
-    /// so overriding the similar (now deprecated) methods in <see cref="CustomScoreQuery" />
-    /// is no longer suitable, as the supplied <c>doc</c> ID is per-segment
-    /// and without knowledge of the IndexReader you cannot access the
-    /// document or <see cref="FieldCache" />.</para>
-    /// 
-    /// @lucene.experimental
-    /// @since 2.9.2
-    /// </summary>
-    public class CustomScoreProvider
-    {
-
-        protected IndexReader reader;
-
-        /// <summary>
-        /// Creates a new instance of the provider class for the given IndexReader.
-        /// </summary>
-        public CustomScoreProvider(IndexReader reader)
-        {
-            this.reader = reader;
-        }
-
-        /// <summary>
-        /// * Compute a custom score by the subQuery score and a number of 
-        /// ValueSourceQuery scores.
-        /// <p/> 
-        /// Subclasses can override this method to modify the custom score.  
-        /// <p/>
-        /// If your custom scoring is different than the default herein you 
-        /// should override at least one of the two customScore() methods.
-        /// If the number of ValueSourceQueries is always &lt; 2 it is 
-        /// sufficient to override the other 
-        /// <see cref="CustomScore(int, float, float)">CustomScore()</see>
-        /// method, which is simpler. 
-        /// <p/>
-        /// The default computation herein is a multiplication of given scores:
-        /// <pre>
-        ///     ModifiedScore = valSrcScore * valSrcScores[0] * valSrcScores[1] * ...
-        /// </pre>
-        /// </summary>
-        /// <param name="doc">id of scored doc</param>
-        /// <param name="subQueryScore">score of that doc by the subQuery</param>
-        /// <param name="valSrcScores">scores of that doc by the ValueSourceQuery</param>
-        /// <returns>custom score</returns>
-        public virtual float CustomScore(int doc, float subQueryScore, float[] valSrcScores)
-        {
-            if (valSrcScores.Length == 1)
-            {
-                return CustomScore(doc, subQueryScore, valSrcScores[0]);
-            }
-            if (valSrcScores.Length == 0)
-            {
-                return CustomScore(doc, subQueryScore, 1);
-            }
-            float score = subQueryScore;
-            for (int i = 0; i < valSrcScores.Length; i++)
-            {
-                score *= valSrcScores[i];
-            }
-            return score;
-        }
-                
-        /// <summary>
-        /// Compute a custom score by the subQuery score and the ValueSourceQuery score.
-        /// <p/> 
-        /// Subclasses can override this method to modify the custom score.
-        /// <p/>
-        /// If your custom scoring is different than the default herein you 
-        /// should override at least one of the two customScore() methods.
-        /// If the number of ValueSourceQueries is always &lt; 2 it is 
-        /// sufficient to override this customScore() method, which is simpler. 
-        /// <p/>
-        /// The default computation herein is a multiplication of the two scores:
-        /// <pre>
-        ///     ModifiedScore = subQueryScore * valSrcScore
-        /// </pre>
-        /// </summary>
-        /// <param name="doc">id of scored doc</param>
-        /// <param name="subQueryScore">score of that doc by the subQuery</param>
-        /// <param name="valSrcScore">score of that doc by the ValueSourceQuery</param>
-        /// <returns>custom score</returns>
-        public virtual float CustomScore(int doc, float subQueryScore, float valSrcScore)
-        {
-            return subQueryScore * valSrcScore;
-        }
-
-        /// <summary>
-        /// Explain the custom score.
-        /// Whenever overriding <see cref="CustomScore(int, float, float[])" />, 
-        /// this method should also be overridden to provide the correct explanation
-        /// for the part of the custom scoring.
-        /// </summary>
-        /// <param name="doc">doc being explained</param>
-        /// <param name="subQueryExpl">explanation for the sub-query part</param>
-        /// <param name="valSrcExpls">explanation for the value source part</param>
-        /// <returns>an explanation for the custom score</returns>
-        public virtual Explanation CustomExplain(int doc, Explanation subQueryExpl, Explanation[] valSrcExpls)
-        {
-            if (valSrcExpls.Length == 1)
-            {
-                return CustomExplain(doc, subQueryExpl, valSrcExpls[0]);
-            }
-            if (valSrcExpls.Length == 0)
-            {
-                return subQueryExpl;
-            }
-            float valSrcScore = 1;
-            for (int i = 0; i < valSrcExpls.Length; i++)
-            {
-                valSrcScore *= valSrcExpls[i].Value;
-            }
-            Explanation exp = new Explanation(valSrcScore * subQueryExpl.Value, "custom score: product of:");
-            exp.AddDetail(subQueryExpl);
-            for (int i = 0; i < valSrcExpls.Length; i++)
-            {
-                exp.AddDetail(valSrcExpls[i]);
-            }
-            return exp;
-        }
-                
-        /// <summary>
-        /// Explain the custom score.
-        /// Whenever overriding <see cref="CustomScore(int, float, float)" />, 
-        /// this method should also be overridden to provide the correct explanation
-        /// for the part of the custom scoring.
-        /// 
-        /// </summary>
-        /// <param name="doc">doc being explained</param>
-        /// <param name="subQueryExpl">explanation for the sub-query part</param>
-        /// <param name="valSrcExpl">explanation for the value source part</param>
-        /// <returns>an explanation for the custom score</returns>
-        public virtual Explanation CustomExplain(int doc, Explanation subQueryExpl, Explanation valSrcExpl)
-        {
-            float valSrcScore = 1;
-            if (valSrcExpl != null)
-            {
-                valSrcScore *= valSrcExpl.Value;
-            }
-            Explanation exp = new Explanation(valSrcScore * subQueryExpl.Value, "custom score: product of:");
-            exp.AddDetail(subQueryExpl);
-            exp.AddDetail(valSrcExpl);
-            return exp;
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/Function/CustomScoreQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Function/CustomScoreQuery.cs b/src/Lucene.Net.Core/Search/Function/CustomScoreQuery.cs
deleted file mode 100644
index f27e6eb..0000000
--- a/src/Lucene.Net.Core/Search/Function/CustomScoreQuery.cs
+++ /dev/null
@@ -1,579 +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.Linq;
-using Lucene.Net.Index;
-using IndexReader = Lucene.Net.Index.IndexReader;
-using ToStringUtils = Lucene.Net.Util.ToStringUtils;
-using ComplexExplanation = Lucene.Net.Search.ComplexExplanation;
-using Explanation = Lucene.Net.Search.Explanation;
-using Query = Lucene.Net.Search.Query;
-using Scorer = Lucene.Net.Search.Scorer;
-using Searcher = Lucene.Net.Search.Searcher;
-using Similarity = Lucene.Net.Search.Similarity;
-using Weight = Lucene.Net.Search.Weight;
-
-namespace Lucene.Net.Search.Function
-{
-    
-    /// <summary> Query that sets document score as a programmatic function of several (sub) scores:
-    /// <list type="bullet">
-    /// <item>the score of its subQuery (any query)</item>
-    /// <item>(optional) the score of its ValueSourceQuery (or queries).
-    /// For most simple/convenient use cases this query is likely to be a 
-    /// <see cref="Lucene.Net.Search.Function.FieldScoreQuery">FieldScoreQuery</see></item>
-    /// </list>
-    /// Subclasses can modify the computation by overriding <see cref="GetCustomScoreProvider" />.
-    /// 
-    /// <p/><font color="#FF0000">
-    /// WARNING: The status of the <b>Search.Function</b> package is experimental. 
-    /// The APIs introduced here might change in the future and will not be 
-    /// supported anymore in such a case.</font>
-    /// </summary>
-    [Serializable]
-    public class CustomScoreQuery:Query, System.ICloneable
-    {
-        
-        private Query subQuery;
-        private ValueSourceQuery[] valSrcQueries; // never null (empty array if there are no valSrcQueries).
-        private bool strict = false; // if true, valueSource part of query does not take part in weights normalization.  
-        
-        /// <summary> Create a CustomScoreQuery over input subQuery.</summary>
-        /// <param name="subQuery">the sub query whose scored is being customed. Must not be null. 
-        /// </param>
-        public CustomScoreQuery(Query subQuery):this(subQuery, new ValueSourceQuery[0])
-        {
-        }
-        
-        /// <summary> Create a CustomScoreQuery over input subQuery and a <see cref="ValueSourceQuery" />.</summary>
-        /// <param name="subQuery">the sub query whose score is being customed. Must not be null.
-        /// </param>
-        /// <param name="valSrcQuery">a value source query whose scores are used in the custom score
-        /// computation. For most simple/convineient use case this would be a 
-        /// <see cref="Lucene.Net.Search.Function.FieldScoreQuery">FieldScoreQuery</see>.
-        /// This parameter is optional - it can be null or even an empty array.
-        /// </param>
-        public CustomScoreQuery(Query subQuery, ValueSourceQuery valSrcQuery):this(subQuery, valSrcQuery != null?new ValueSourceQuery[]{valSrcQuery}:new ValueSourceQuery[0])
-        {
-        }
-        
-        /// <summary> Create a CustomScoreQuery over input subQuery and a <see cref="ValueSourceQuery" />.</summary>
-        /// <param name="subQuery">the sub query whose score is being customized. Must not be null.
-        /// </param>
-        /// <param name="valSrcQueries">value source queries whose scores are used in the custom score
-        /// computation. For most simple/convenient use case these would be 
-        /// <see cref="Lucene.Net.Search.Function.FieldScoreQuery">FieldScoreQueries</see>.
-        /// This parameter is optional - it can be null or even an empty array.
-        /// </param>
-        public CustomScoreQuery(Query subQuery, params ValueSourceQuery[] valSrcQueries)
-        {
-            this.subQuery = subQuery;
-            this.valSrcQueries = valSrcQueries != null?valSrcQueries:new ValueSourceQuery[0];
-            if (subQuery == null)
-                throw new System.ArgumentException("<subquery> must not be null!");
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Query.rewrite(Lucene.Net.Index.IndexReader) */
-        public override Query Rewrite(IndexReader reader)
-        {
-            CustomScoreQuery clone = null;
-
-            Query sq = subQuery.Rewrite(reader);
-            if (sq != subQuery)
-            {
-                clone = (CustomScoreQuery)Clone();
-                clone.subQuery = sq;
-            }
-
-            for (int i = 0; i < valSrcQueries.Length; i++)
-            {
-                ValueSourceQuery v = (ValueSourceQuery)valSrcQueries[i].Rewrite(reader);
-                if (v != valSrcQueries[i])
-                {
-                    if (clone == null) clone = (CustomScoreQuery)Clone();
-                    clone.valSrcQueries[i] = v;
-                }
-            }
-
-            return (clone == null) ? this : clone;
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Query.extractTerms(java.util.Set) */
-        public override void ExtractTerms(System.Collections.Generic.ISet<Term> terms)
-        {
-            subQuery.ExtractTerms(terms);
-            for (int i = 0; i < valSrcQueries.Length; i++)
-            {
-                valSrcQueries[i].ExtractTerms(terms);
-            }
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Query.clone() */
-        public override System.Object Clone()
-        {
-            CustomScoreQuery clone = (CustomScoreQuery) base.Clone();
-            clone.subQuery = (Query) subQuery.Clone();
-            clone.valSrcQueries = new ValueSourceQuery[valSrcQueries.Length];
-            for (int i = 0; i < valSrcQueries.Length; i++)
-            {
-                clone.valSrcQueries[i] = (ValueSourceQuery) valSrcQueries[i].Clone();
-            }
-            return clone;
-        }
-        
-        /* (non-Javadoc) <see cref="Lucene.Net.Search.Query.toString(java.lang.String) */
-        public override System.String ToString(System.String field)
-        {
-            System.Text.StringBuilder sb = new System.Text.StringBuilder(Name()).Append("(");
-            sb.Append(subQuery.ToString(field));
-            for (int i = 0; i < valSrcQueries.Length; i++)
-            {
-                sb.Append(", ").Append(valSrcQueries[i].ToString(field));
-            }
-            sb.Append(")");
-            sb.Append(strict?" STRICT":"");
-            return sb.ToString() + ToStringUtils.Boost(Boost);
-        }
-        
-        /// <summary>Returns true if <c>o</c> is equal to this. </summary>
-        public  override bool Equals(System.Object o)
-        {
-            if (GetType() != o.GetType())
-            {
-                return false;
-            }
-            CustomScoreQuery other = (CustomScoreQuery) o;
-            if (this.Boost != other.Boost ||
-                !this.subQuery.Equals(other.subQuery) ||
-                this.strict != other.strict ||
-                this.valSrcQueries.Length != other.valSrcQueries.Length)
-            {
-                return false;
-            }
-
-            // SequenceEqual should properly mimic java's Array.equals()
-            return valSrcQueries.SequenceEqual(other.valSrcQueries);
-        }
-        
-        /// <summary>Returns a hash code value for this object. </summary>
-        public override int GetHashCode()
-        {
-            int valSrcHash = 0;
-            for (int i = 0; i < valSrcQueries.Length; i++)
-            {
-                // TODO: Simplify this hash code generation
-                valSrcHash += valSrcQueries[i].GetHashCode();
-            }
-            return (GetType().GetHashCode() + subQuery.GetHashCode() + valSrcHash) ^
-                BitConverter.ToInt32(BitConverter.GetBytes(Boost), 0) ^ (strict ? 1234 : 4321);
-
-        }
-
-        /// <summary>
-        /// Returns a <see cref="CustomScoreProvider" /> that calculates the custom scores
-        /// for the given <see cref="IndexReader" />. The default implementation returns a default
-        /// implementation as specified in the docs of <see cref="CustomScoreProvider" />.
-        /// </summary>
-        protected virtual CustomScoreProvider GetCustomScoreProvider(IndexReader reader)
-        {
-            // when deprecated methods are removed, do not extend class here, just return new default CustomScoreProvider
-            return new AnonymousCustomScoreProvider(this, reader);
-        }
-
-        class AnonymousCustomScoreProvider : CustomScoreProvider
-        {
-            CustomScoreQuery parent;
-            public AnonymousCustomScoreProvider(CustomScoreQuery parent, IndexReader reader) : base(reader)
-            {
-                this.parent = parent;
-            }
-            public override float CustomScore(int doc, float subQueryScore, float[] valSrcScores)
-            {
-                return parent.CustomScore(doc, subQueryScore, valSrcScores);
-            }
-
-            public override float CustomScore(int doc, float subQueryScore, float valSrcScore)
-            {
-                return parent.CustomScore(doc, subQueryScore, valSrcScore);
-            }
-
-            public override Explanation CustomExplain(int doc, Explanation subQueryExpl, Explanation[] valSrcExpls)
-            {
-                return parent.CustomExplain(doc, subQueryExpl, valSrcExpls);
-            }
-
-            public override Explanation CustomExplain(int doc, Explanation subQueryExpl, Explanation valSrcExpl)
-            {
-                return parent.CustomExplain(doc, subQueryExpl, valSrcExpl);
-            }
-        }
-        
-        /// <summary>
-        /// Compute a custom score by the subQuery score and a number of 
-        /// ValueSourceQuery scores.
-        /// 
-        /// The doc is relative to the current reader, which is
-        /// unknown to CustomScoreQuery when using per-segment search (since Lucene 2.9).
-        /// Please override <see cref="GetCustomScoreProvider" /> and return a subclass
-        /// of <see cref="CustomScoreProvider" /> for the given <see cref="IndexReader" />.
-        /// see CustomScoreProvider#customScore(int,float,float[])
-        /// </summary>
-        [Obsolete("Will be removed in Lucene 3.1")]
-        public virtual float CustomScore(int doc, float subQueryScore, float[] valSrcScores)
-        {
-            if (valSrcScores.Length == 1)
-            {
-                return CustomScore(doc, subQueryScore, valSrcScores[0]);
-            }
-            if (valSrcScores.Length == 0)
-            {
-                return CustomScore(doc, subQueryScore, 1);
-            }
-            float score = subQueryScore;
-            for (int i = 0; i < valSrcScores.Length; i++)
-            {
-                score *= valSrcScores[i];
-            }
-            return score;
-        }
-        
-        /// <summary> Compute a custom score by the subQuery score and the ValueSourceQuery score.
-        /// 
-        /// The doc is relative to the current reader, which is
-        /// unknown to CustomScoreQuery when using per-segment search (since Lucene 2.9).
-        /// Please override <see cref="GetCustomScoreProvider" /> and return a subclass
-        /// of <see cref="CustomScoreProvider" /> for the given <see cref="IndexReader" />.
-        /// </summary>
-        /// <seealso cref="CustomScoreProvider.CustomScore(int,float,float)" />
-        [Obsolete("Will be removed in Lucene 3.1")]
-        public virtual float CustomScore(int doc, float subQueryScore, float valSrcScore)
-        {
-            return subQueryScore * valSrcScore;
-        }
-
-        
-        
-        /// <summary> Explain the custom score.
-        /// 
-        /// The doc is relative to the current reader, which is
-        /// unknown to CustomScoreQuery when using per-segment search (since Lucene 2.9).
-        /// Please override <see cref="GetCustomScoreProvider(IndexReader)" /> and return a subclass
-        /// of <see cref="CustomScoreProvider" /> for the given <see cref="IndexReader" />.
-        /// </summary>
-        [Obsolete("Will be removed in Lucene 3.1")]
-        public virtual Explanation CustomExplain(int doc, Explanation subQueryExpl, Explanation[] valSrcExpls)
-        {
-            if (valSrcExpls.Length == 1)
-            {
-                return CustomExplain(doc, subQueryExpl, valSrcExpls[0]);
-            }
-            if (valSrcExpls.Length == 0)
-            {
-                return subQueryExpl;
-            }
-            float valSrcScore = 1;
-            for (int i = 0; i < valSrcExpls.Length; i++)
-            {
-                valSrcScore *= valSrcExpls[i].Value;
-            }
-            Explanation exp = new Explanation(valSrcScore * subQueryExpl.Value, "custom score: product of:");
-            exp.AddDetail(subQueryExpl);
-            for (int i = 0; i < valSrcExpls.Length; i++)
-            {
-                exp.AddDetail(valSrcExpls[i]);
-            }
-            return exp;
-        }
-        
-        /// <summary> Explain the custom score.
-        /// The doc is relative to the current reader, which is
-        /// unknown to CustomScoreQuery when using per-segment search (since Lucene 2.9).
-        /// Please override <see cref="GetCustomScoreProvider" /> and return a subclass
-        /// of <see cref="CustomScoreProvider" /> for the given <see cref="IndexReader" />.
-        /// </summary>
-        [Obsolete("Will be removed in Lucene 3.1")]
-        public virtual Explanation CustomExplain(int doc, Explanation subQueryExpl, Explanation valSrcExpl)
-        {
-            float valSrcScore = 1;
-            if (valSrcExpl != null)
-            {
-                valSrcScore *= valSrcExpl.Value;
-            }
-            Explanation exp = new Explanation(valSrcScore * subQueryExpl.Value, "custom score: product of:");
-            exp.AddDetail(subQueryExpl);
-            exp.AddDetail(valSrcExpl);
-            return exp;
-        }
-        
-        //=========================== W E I G H T ============================
-        
-        [Serializable]
-        private class CustomWeight:Weight
-        {
-            private void  InitBlock(CustomScoreQuery enclosingInstance)
-            {
-                this.enclosingInstance = enclosingInstance;
-            }
-            private CustomScoreQuery enclosingInstance;
-            public CustomScoreQuery Enclosing_Instance
-            {
-                get
-                {
-                    return enclosingInstance;
-                }
-                
-            }
-            internal Similarity similarity;
-            internal Weight subQueryWeight;
-            internal Weight[] valSrcWeights;
-            internal bool qStrict;
-            
-            public CustomWeight(CustomScoreQuery enclosingInstance, Searcher searcher)
-            {
-                InitBlock(enclosingInstance);
-                this.similarity = Enclosing_Instance.GetSimilarity(searcher);
-                this.subQueryWeight = Enclosing_Instance.subQuery.Weight(searcher);
-                this.valSrcWeights = new Weight[Enclosing_Instance.valSrcQueries.Length];
-                for (int i = 0; i < Enclosing_Instance.valSrcQueries.Length; i++)
-                {
-                    this.valSrcWeights[i] = Enclosing_Instance.valSrcQueries[i].CreateWeight(searcher);
-                }
-                this.qStrict = Enclosing_Instance.strict;
-            }
-            
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Weight.getQuery() */
-
-            public override Query Query
-            {
-                get { return Enclosing_Instance; }
-            }
-
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Weight.getValue() */
-
-            public override float Value
-            {
-                get { return Enclosing_Instance.Boost; }
-            }
-
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Weight.sumOfSquaredWeights() */
-
-            public override float GetSumOfSquaredWeights()
-            {
-                float sum = subQueryWeight.GetSumOfSquaredWeights();
-                for (int i = 0; i < valSrcWeights.Length; i++)
-                {
-                    if (qStrict)
-                    {
-                        var sumsq = valSrcWeights[i].GetSumOfSquaredWeights();
-                        // do not include ValueSource part in the query normalization
-                    }
-                    else
-                    {
-                        sum += valSrcWeights[i].GetSumOfSquaredWeights();
-                    }
-                }
-                sum *= Enclosing_Instance.Boost*Enclosing_Instance.Boost; // boost each sub-weight
-                return sum;
-            }
-
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Weight.normalize(float) */
-            public override void  Normalize(float norm)
-            {
-                norm *= Enclosing_Instance.Boost; // incorporate boost
-                subQueryWeight.Normalize(norm);
-                for (int i = 0; i < valSrcWeights.Length; i++)
-                {
-                    if (qStrict)
-                    {
-                        valSrcWeights[i].Normalize(1); // do not normalize the ValueSource part
-                    }
-                    else
-                    {
-                        valSrcWeights[i].Normalize(norm);
-                    }
-                }
-            }
-            
-            public override Scorer Scorer(IndexReader reader, bool scoreDocsInOrder, bool topScorer)
-            {
-                // Pass true for "scoresDocsInOrder", because we
-                // require in-order scoring, even if caller does not,
-                // since we call advance on the valSrcScorers.  Pass
-                // false for "topScorer" because we will not invoke
-                // score(Collector) on these scorers:
-                Scorer subQueryScorer = subQueryWeight.Scorer(reader, true, false);
-                if (subQueryScorer == null)
-                {
-                    return null;
-                }
-                Scorer[] valSrcScorers = new Scorer[valSrcWeights.Length];
-                for (int i = 0; i < valSrcScorers.Length; i++)
-                {
-                    valSrcScorers[i] = valSrcWeights[i].Scorer(reader, true, topScorer);
-                }
-                return new CustomScorer(enclosingInstance, similarity, reader, this, subQueryScorer, valSrcScorers);
-            }
-            
-            public override Explanation Explain(IndexReader reader, int doc)
-            {
-                Explanation explain = DoExplain(reader, doc);
-                return explain == null?new Explanation(0.0f, "no matching docs"):explain;
-            }
-            
-            private Explanation DoExplain(IndexReader reader, int doc)
-            {
-                Explanation subQueryExpl = subQueryWeight.Explain(reader, doc);
-                if (!subQueryExpl.IsMatch)
-                {
-                    return subQueryExpl;
-                }
-                // match
-                Explanation[] valSrcExpls = new Explanation[valSrcWeights.Length];
-                for (int i = 0; i < valSrcWeights.Length; i++)
-                {
-                    valSrcExpls[i] = valSrcWeights[i].Explain(reader, doc);
-                }
-                Explanation customExp = Enclosing_Instance.GetCustomScoreProvider(reader).CustomExplain(doc, subQueryExpl, valSrcExpls);
-                float sc = Value * customExp.Value;
-                Explanation res = new ComplexExplanation(true, sc, Enclosing_Instance.ToString() + ", product of:");
-                res.AddDetail(customExp);
-                res.AddDetail(new Explanation(Value, "queryBoost")); // actually using the q boost as q weight (== weight value)
-                return res;
-            }
-
-            public override bool GetScoresDocsOutOfOrder()
-            {
-                return false;
-            }
-        }
-        
-        
-        //=========================== S C O R E R ============================
-        
-        /// <summary> A scorer that applies a (callback) function on scores of the subQuery.</summary>
-        private class CustomScorer:Scorer
-        {
-            private void  InitBlock(CustomScoreQuery enclosingInstance)
-            {
-                this.enclosingInstance = enclosingInstance;
-            }
-            private CustomScoreQuery enclosingInstance;
-            public CustomScoreQuery Enclosing_Instance
-            {
-                get
-                {
-                    return enclosingInstance;
-                }
-                
-            }
-            private float qWeight;
-            private Scorer subQueryScorer;
-            private Scorer[] valSrcScorers;
-            private IndexReader reader;
-            private CustomScoreProvider provider;
-            private float[] vScores; // reused in score() to avoid allocating this array for each doc 
-            
-            // constructor
-            internal CustomScorer(CustomScoreQuery enclosingInstance, Similarity similarity, IndexReader reader, CustomWeight w, Scorer subQueryScorer, Scorer[] valSrcScorers):base(similarity)
-            {
-                InitBlock(enclosingInstance);
-                this.qWeight = w.Value;
-                this.subQueryScorer = subQueryScorer;
-                this.valSrcScorers = valSrcScorers;
-                this.reader = reader;
-                this.vScores = new float[valSrcScorers.Length];
-                this.provider = this.Enclosing_Instance.GetCustomScoreProvider(reader);
-            }
-            
-            public override int NextDoc()
-            {
-                int doc = subQueryScorer.NextDoc();
-                if (doc != NO_MORE_DOCS)
-                {
-                    for (int i = 0; i < valSrcScorers.Length; i++)
-                    {
-                        valSrcScorers[i].Advance(doc);
-                    }
-                }
-                return doc;
-            }
-            
-            public override int DocID()
-            {
-                return subQueryScorer.DocID();
-            }
-            
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Scorer.score() */
-            public override float Score()
-            {
-                for (int i = 0; i < valSrcScorers.Length; i++)
-                {
-                    vScores[i] = valSrcScorers[i].Score();
-                }
-                return qWeight * provider.CustomScore(subQueryScorer.DocID(), subQueryScorer.Score(), vScores);
-            }
-            
-            public override int Advance(int target)
-            {
-                int doc = subQueryScorer.Advance(target);
-                if (doc != NO_MORE_DOCS)
-                {
-                    for (int i = 0; i < valSrcScorers.Length; i++)
-                    {
-                        valSrcScorers[i].Advance(doc);
-                    }
-                }
-                return doc;
-            }
-        }
-        
-        public override Weight CreateWeight(Searcher searcher)
-        {
-            return new CustomWeight(this, searcher);
-        }
-        
-        /// <summary> Checks if this is strict custom scoring.
-        /// In strict custom scoring, the ValueSource part does not participate in weight normalization.
-        /// This may be useful when one wants full control over how scores are modified, and does 
-        /// not care about normalizing by the ValueSource part.
-        /// One particular case where this is useful if for testing this query.   
-        /// <p/>
-        /// Note: only has effect when the ValueSource part is not null.
-        /// </summary>
-        public virtual bool IsStrict()
-        {
-            return strict;
-        }
-        
-        /// <summary> Set the strict mode of this query. </summary>
-        /// <param name="strict">The strict mode to set.
-        /// </param>
-        /// <seealso cref="IsStrict()">
-        /// </seealso>
-        public virtual void  SetStrict(bool strict)
-        {
-            this.strict = strict;
-        }
-        
-        /// <summary> A short name of this query, used in <see cref="ToString(String)" />.</summary>
-        public virtual System.String Name()
-        {
-            return "custom";
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/Function/DocValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Function/DocValues.cs b/src/Lucene.Net.Core/Search/Function/DocValues.cs
deleted file mode 100644
index 6a8cb77..0000000
--- a/src/Lucene.Net.Core/Search/Function/DocValues.cs
+++ /dev/null
@@ -1,206 +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 Explanation = Lucene.Net.Search.Explanation;
-
-namespace Lucene.Net.Search.Function
-{
-    
-    /// <summary> Expert: represents field values as different types.
-    /// Normally created via a 
-    /// <see cref="Lucene.Net.Search.Function.ValueSource">ValueSuorce</see> 
-    /// for a particular field and reader.
-    /// 
-    /// <p/><font color="#FF0000">
-    /// WARNING: The status of the <b>Search.Function</b> package is experimental. 
-    /// The APIs introduced here might change in the future and will not be 
-    /// supported anymore in such a case.</font>
-    /// 
-    /// 
-    /// </summary>
-    public abstract class DocValues
-    {
-        /*
-        * DocValues is distinct from ValueSource because
-        * there needs to be an object created at query evaluation time that
-        * is not referenced by the query itself because:
-        * - Query objects should be MT safe
-        * - For caching, Query objects are often used as keys... you don't
-        *   want the Query carrying around big objects
-        */
-        
-        /// <summary> Return doc value as a float. 
-        /// <p/>Mandatory: every DocValues implementation must implement at least this method. 
-        /// </summary>
-        /// <param name="doc">document whose float value is requested. 
-        /// </param>
-        public abstract float FloatVal(int doc);
-        
-        /// <summary> Return doc value as an int. 
-        /// <p/>Optional: DocValues implementation can (but don't have to) override this method. 
-        /// </summary>
-        /// <param name="doc">document whose int value is requested.
-        /// </param>
-        public virtual int IntVal(int doc)
-        {
-            return (int) FloatVal(doc);
-        }
-        
-        /// <summary> Return doc value as a long. 
-        /// <p/>Optional: DocValues implementation can (but don't have to) override this method. 
-        /// </summary>
-        /// <param name="doc">document whose long value is requested.
-        /// </param>
-        public virtual long LongVal(int doc)
-        {
-            return (long) FloatVal(doc);
-        }
-        
-        /// <summary> Return doc value as a double. 
-        /// <p/>Optional: DocValues implementation can (but don't have to) override this method. 
-        /// </summary>
-        /// <param name="doc">document whose double value is requested.
-        /// </param>
-        public virtual double DoubleVal(int doc)
-        {
-            return (double) FloatVal(doc);
-        }
-        
-        /// <summary> Return doc value as a string. 
-        /// <p/>Optional: DocValues implementation can (but don't have to) override this method. 
-        /// </summary>
-        /// <param name="doc">document whose string value is requested.
-        /// </param>
-        public virtual System.String StrVal(int doc)
-        {
-            return FloatVal(doc).ToString();
-        }
-        
-        /// <summary> Return a string representation of a doc value, as reuired for Explanations.</summary>
-        public abstract System.String ToString(int doc);
-        
-        /// <summary> Explain the scoring value for the input doc.</summary>
-        public virtual Explanation Explain(int doc)
-        {
-            return new Explanation(FloatVal(doc), ToString(doc));
-        }
-
-        /// <summary> Expert: for test purposes only, return the inner array of values, or null if not applicable.
-        /// <p/>
-        /// Allows tests to verify that loaded values are:
-        /// <list type="bullet">
-        /// <item>indeed cached/reused.</item>
-        /// <item>stored in the expected size/type (byte/short/int/float).</item>
-        /// </list>
-        /// Note: implementations of DocValues must override this method for 
-        /// these test elements to be tested, Otherwise the test would not fail, just 
-        /// print a warning.
-        /// </summary>
-        protected internal virtual object InnerArray
-        {
-            get { throw new System.NotSupportedException("this optional method is for test purposes only"); }
-        }
-
-        // --- some simple statistics on values
-        private float minVal = System.Single.NaN;
-        private float maxVal = System.Single.NaN;
-        private float avgVal = System.Single.NaN;
-        private bool computed = false;
-        // compute optional values
-        private void  Compute()
-        {
-            if (computed)
-            {
-                return ;
-            }
-            float sum = 0;
-            int n = 0;
-            while (true)
-            {
-                float val;
-                try
-                {
-                    val = FloatVal(n);
-                }
-                catch (System.IndexOutOfRangeException)
-                {
-                    break;
-                }
-                sum += val;
-                minVal = System.Single.IsNaN(minVal)?val:System.Math.Min(minVal, val);
-                maxVal = System.Single.IsNaN(maxVal)?val:System.Math.Max(maxVal, val);
-                ++n;
-            }
-            
-            avgVal = n == 0?System.Single.NaN:sum / n;
-            computed = true;
-        }
-        
-        /// <summary> Returns the minimum of all values or <c>Float.NaN</c> if this
-        /// DocValues instance does not contain any value.
-        /// <p/>
-        /// This operation is optional
-        /// <p/>
-        /// 
-        /// </summary>
-        /// <returns> the minimum of all values or <c>Float.NaN</c> if this
-        /// DocValues instance does not contain any value.
-        /// </returns>
-        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
-        public virtual float GetMinValue()
-        {
-            Compute();
-            return minVal;
-        }
-        
-        /// <summary> Returns the maximum of all values or <c>Float.NaN</c> if this
-        /// DocValues instance does not contain any value.
-        /// <p/>
-        /// This operation is optional
-        /// <p/>
-        /// 
-        /// </summary>
-        /// <returns> the maximum of all values or <c>Float.NaN</c> if this
-        /// DocValues instance does not contain any value.
-        /// </returns>
-        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
-        public virtual float GetMaxValue()
-        {
-            Compute();
-            return maxVal;
-        }
-        
-        /// <summary> Returns the average of all values or <c>Float.NaN</c> if this
-        /// DocValues instance does not contain any value. *
-        /// <p/>
-        /// This operation is optional
-        /// <p/>
-        /// 
-        /// </summary>
-        /// <returns> the average of all values or <c>Float.NaN</c> if this
-        /// DocValues instance does not contain any value
-        /// </returns>
-        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
-        public virtual float GetAverageValue()
-        {
-            Compute();
-            return avgVal;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/Function/FieldCacheSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Function/FieldCacheSource.cs b/src/Lucene.Net.Core/Search/Function/FieldCacheSource.cs
deleted file mode 100644
index e4ccd99..0000000
--- a/src/Lucene.Net.Core/Search/Function/FieldCacheSource.cs
+++ /dev/null
@@ -1,110 +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 IndexReader = Lucene.Net.Index.IndexReader;
-using FieldCache = Lucene.Net.Search.FieldCache;
-
-namespace Lucene.Net.Search.Function
-{
-    
-    /// <summary> Expert: A base class for ValueSource implementations that retrieve values for
-    /// a single field from the <see cref="Lucene.Net.Search.FieldCache">FieldCache</see>.
-    /// <p/>
-    /// Fields used herein nust be indexed (doesn't matter if these fields are stored or not).
-    /// <p/> 
-    /// It is assumed that each such indexed field is untokenized, or at least has a single token in a document.
-    /// For documents with multiple tokens of the same field, behavior is undefined (It is likely that current 
-    /// code would use the value of one of these tokens, but this is not guaranteed).
-    /// <p/>
-    /// Document with no tokens in this field are assigned the <c>Zero</c> value.    
-    /// 
-    /// <p/><font color="#FF0000">
-    /// WARNING: The status of the <b>Search.Function</b> package is experimental. 
-    /// The APIs introduced here might change in the future and will not be 
-    /// supported anymore in such a case.</font>
-    /// 
-    /// <p/><b>NOTE</b>: with the switch in 2.9 to segment-based
-    /// searching, if <see cref="GetValues" /> is invoked with a
-    /// composite (multi-segment) reader, this can easily cause
-    /// double RAM usage for the values in the FieldCache.  It's
-    /// best to switch your application to pass only atomic
-    /// (single segment) readers to this API.<p/>
-    /// </summary>
-    [Serializable]
-    public abstract class FieldCacheSource:ValueSource
-    {
-        private System.String field;
-        
-        /// <summary> Create a cached field source for the input field.  </summary>
-        protected FieldCacheSource(System.String field)
-        {
-            this.field = field;
-        }
-        
-        /* (non-Javadoc) <see cref="Lucene.Net.Search.Function.ValueSource.getValues(Lucene.Net.Index.IndexReader) */
-        public override DocValues GetValues(IndexReader reader)
-        {
-            return GetCachedFieldValues(Lucene.Net.Search.FieldCache_Fields.DEFAULT, field, reader);
-        }
-        
-        /* (non-Javadoc) <see cref="Lucene.Net.Search.Function.ValueSource.description() */
-        public override System.String Description()
-        {
-            return field;
-        }
-        
-        /// <summary> Return cached DocValues for input field and reader.</summary>
-        /// <param name="cache">FieldCache so that values of a field are loaded once per reader (RAM allowing)
-        /// </param>
-        /// <param name="field">Field for which values are required.
-        /// </param>
-        /// <seealso cref="ValueSource">
-        /// </seealso>
-        public abstract DocValues GetCachedFieldValues(FieldCache cache, System.String field, IndexReader reader);
-        
-        /*(non-Javadoc) <see cref="java.lang.Object.equals(java.lang.Object) */
-        public  override bool Equals(System.Object o)
-        {
-            if (!(o is FieldCacheSource))
-            {
-                return false;
-            }
-            FieldCacheSource other = (FieldCacheSource) o;
-            return this.field.Equals(other.field) && CachedFieldSourceEquals(other);
-        }
-        
-        /*(non-Javadoc) <see cref="java.lang.Object.hashCode() */
-        public override int GetHashCode()
-        {
-            return field.GetHashCode() + CachedFieldSourceHashCode();
-        }
-        
-        /// <summary> Check if equals to another <see cref="FieldCacheSource" />, already knowing that cache and field are equal.  </summary>
-        /// <seealso cref="Object.Equals(Object)">
-        /// </seealso>
-        public abstract bool CachedFieldSourceEquals(FieldCacheSource other);
-        
-        /// <summary> Return a hash code of a <see cref="FieldCacheSource" />, without the hash-codes of the field 
-        /// and the cache (those are taken care of elsewhere).  
-        /// </summary>
-        /// <seealso cref="Object.GetHashCode()">
-        /// </seealso>
-        public abstract int CachedFieldSourceHashCode();
-    }
-}
\ No newline at end of file


Mime
View raw message