lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [57/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:50 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/Function/FieldScoreQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Function/FieldScoreQuery.cs b/src/Lucene.Net.Core/Search/Function/FieldScoreQuery.cs
deleted file mode 100644
index 9bd9da6..0000000
--- a/src/Lucene.Net.Core/Search/Function/FieldScoreQuery.cs
+++ /dev/null
@@ -1,139 +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;
-
-namespace Lucene.Net.Search.Function
-{
-    
-    /// <summary> A query that scores each document as the value of the numeric input field.
-    /// <p/> 
-    /// The query matches all documents, and scores each document according to the numeric 
-    /// value of that field. 
-    /// <p/>
-    /// It is assumed, and expected, that:
-    /// <list type="bullet">
-    /// <item>The field used here is indexed, and has exactly 
-    /// one token in every scored document.</item> 
-    /// <item>Best if this field is un_tokenized.</item>
-    /// <item>That token is parsable to the selected type.</item>
-    /// </list>
-    /// <p/>  
-    /// Combining this query in a FunctionQuery allows much freedom in affecting document scores.
-    /// Note, that with this freedom comes responsibility: it is more than likely that the
-    /// default Lucene scoring is superior in quality to scoring modified as explained here.
-    /// However, in some cases, and certainly for research experiments, this capability may turn useful.
-    /// <p/>
-    /// When contructing this query, select the appropriate type. That type should match the data stored in the
-    /// field. So in fact the "right" type should be selected before indexing. Type selection
-    /// has effect on the RAM usage: 
-    /// <list type="bullet">
-    /// <item><see cref="Type.BYTE" /> consumes 1 * maxDocs bytes.</item>
-    /// <item><see cref="Type.SHORT" /> consumes 2 * maxDocs bytes.</item>
-    /// <item><see cref="Type.INT" /> consumes 4 * maxDocs bytes.</item>
-    /// <item><see cref="Type.FLOAT" /> consumes 8 * maxDocs bytes.</item>
-    /// </list>
-    /// <p/>
-    /// <b>Caching:</b>
-    /// Values for the numeric field are loaded once and cached in memory for further use with the same IndexReader. 
-    /// To take advantage of this, it is extremely important to reuse index-readers or index-searchers, 
-    /// otherwise, for instance if for each query a new index reader is opened, large penalties would be 
-    /// paid for loading the field values into memory over and over again!
-    /// 
-    /// <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 FieldScoreQuery:ValueSourceQuery
-    {
-        
-        /// <summary> Type of score field, indicating how field values are interpreted/parsed.  
-        /// <p/>
-        /// The type selected at search search time should match the data stored in the field. 
-        /// Different types have different RAM requirements: 
-        /// <list type="bullet">
-        /// <item><see cref="BYTE" /> consumes 1 * maxDocs bytes.</item>
-        /// <item><see cref="SHORT" /> consumes 2 * maxDocs bytes.</item>
-        /// <item><see cref="INT" /> consumes 4 * maxDocs bytes.</item>
-        /// <item><see cref="FLOAT" /> consumes 8 * maxDocs bytes.</item>
-        /// </list>
-        /// </summary>
-        public class Type
-        {
-            
-            /// <summary>field values are interpreted as numeric byte values. </summary>
-            public static readonly Type BYTE = new Type("byte");
-            
-            /// <summary>field values are interpreted as numeric short values. </summary>
-            public static readonly Type SHORT = new Type("short");
-            
-            /// <summary>field values are interpreted as numeric int values. </summary>
-            public static readonly Type INT = new Type("int");
-            
-            /// <summary>field values are interpreted as numeric float values. </summary>
-            public static readonly Type FLOAT = new Type("float");
-            
-            private System.String typeName;
-            internal Type(System.String name)
-            {
-                this.typeName = name;
-            }
-            /*(non-Javadoc) <see cref="java.lang.Object.toString() */
-            public override System.String ToString()
-            {
-                return GetType().FullName + "::" + typeName;
-            }
-        }
-        
-        /// <summary> Create a FieldScoreQuery - a query that scores each document as the value of the numeric input field.
-        /// <p/>
-        /// The <c>type</c> param tells how to parse the field string values into a numeric score value.
-        /// </summary>
-        /// <param name="field">the numeric field to be used.
-        /// </param>
-        /// <param name="type">the type of the field: either
-        /// <see cref="Type.BYTE" />, <see cref="Type.SHORT" />, <see cref="Type.INT" />, or <see cref="Type.FLOAT" />. 
-        /// </param>
-        public FieldScoreQuery(System.String field, Type type):base(GetValueSource(field, type))
-        {
-        }
-        
-        // create the appropriate (cached) field value source.  
-        private static ValueSource GetValueSource(System.String field, Type type)
-        {
-            if (type == Type.BYTE)
-            {
-                return new ByteFieldSource(field);
-            }
-            if (type == Type.SHORT)
-            {
-                return new ShortFieldSource(field);
-            }
-            if (type == Type.INT)
-            {
-                return new IntFieldSource(field);
-            }
-            if (type == Type.FLOAT)
-            {
-                return new FloatFieldSource(field);
-            }
-            throw new System.ArgumentException(type + " is not a known Field Score Query Type!");
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/Function/FloatFieldSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Function/FloatFieldSource.cs b/src/Lucene.Net.Core/Search/Function/FloatFieldSource.cs
deleted file mode 100644
index 17ecafd..0000000
--- a/src/Lucene.Net.Core/Search/Function/FloatFieldSource.cs
+++ /dev/null
@@ -1,131 +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 float field values from the 
-    /// <see cref="Lucene.Net.Search.FieldCache">FieldCache</see>
-    /// using <c>getFloats()</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 FloatFieldSource:FieldCacheSource
-    {
-        private class AnonymousClassDocValues:DocValues
-        {
-            public AnonymousClassDocValues(float[] arr, FloatFieldSource enclosingInstance)
-            {
-                InitBlock(arr, enclosingInstance);
-            }
-            private void  InitBlock(float[] arr, FloatFieldSource enclosingInstance)
-            {
-                this.arr = arr;
-                this.enclosingInstance = enclosingInstance;
-            }
-            private float[] arr;
-            private FloatFieldSource enclosingInstance;
-            public FloatFieldSource Enclosing_Instance
-            {
-                get
-                {
-                    return enclosingInstance;
-                }
-                
-            }
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.DocValues.floatVal(int) */
-            public override float FloatVal(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() + '=' + arr[doc];
-            }
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.DocValues.getInnerArray() */
-
-            protected internal override object InnerArray
-            {
-                get { return arr; }
-            }
-        }
-        private Lucene.Net.Search.FloatParser parser;
-        
-        /// <summary> Create a cached float field source with default string-to-float parser. </summary>
-        public FloatFieldSource(System.String field):this(field, null)
-        {
-        }
-        
-        /// <summary> Create a cached float field source with a specific string-to-float parser. </summary>
-        public FloatFieldSource(System.String field, Lucene.Net.Search.FloatParser parser):base(field)
-        {
-            this.parser = parser;
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.ValueSource.description() */
-        public override System.String Description()
-        {
-            return "float(" + 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)
-        {
-            float[] arr = cache.GetFloats(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(FloatFieldSource))
-            {
-                return false;
-            }
-            FloatFieldSource other = (FloatFieldSource) 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.Single).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/IntFieldSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Function/IntFieldSource.cs b/src/Lucene.Net.Core/Search/Function/IntFieldSource.cs
deleted file mode 100644
index afeeb34..0000000
--- a/src/Lucene.Net.Core/Search/Function/IntFieldSource.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 int field values from the 
-    /// <see cref="Lucene.Net.Search.FieldCache">FieldCache</see>
-    /// using <c>getInts()</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 IntFieldSource:FieldCacheSource
-    {
-        private class AnonymousClassDocValues:DocValues
-        {
-            public AnonymousClassDocValues(int[] arr, IntFieldSource enclosingInstance)
-            {
-                InitBlock(arr, enclosingInstance);
-            }
-            private void  InitBlock(int[] arr, IntFieldSource enclosingInstance)
-            {
-                this.arr = arr;
-                this.enclosingInstance = enclosingInstance;
-            }
-            private int[] arr;
-            private IntFieldSource enclosingInstance;
-            public IntFieldSource 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.IntParser parser;
-        
-        /// <summary> Create a cached int field source with default string-to-int parser. </summary>
-        public IntFieldSource(System.String field):this(field, null)
-        {
-        }
-        
-        /// <summary> Create a cached int field source with a specific string-to-int parser. </summary>
-        public IntFieldSource(System.String field, Lucene.Net.Search.IntParser parser):base(field)
-        {
-            this.parser = parser;
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.ValueSource.description() */
-        public override System.String Description()
-        {
-            return "int(" + 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)
-        {
-            int[] arr = cache.GetInts(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(IntFieldSource))
-            {
-                return false;
-            }
-            IntFieldSource other = (IntFieldSource) 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.Int32).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/OrdFieldSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Function/OrdFieldSource.cs b/src/Lucene.Net.Core/Search/Function/OrdFieldSource.cs
deleted file mode 100644
index 3108f96..0000000
--- a/src/Lucene.Net.Core/Search/Function/OrdFieldSource.cs
+++ /dev/null
@@ -1,146 +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 the ordinal of the field value from the default Lucene 
-    /// <see cref="Lucene.Net.Search.FieldCache">Fieldcache</see> using getStringIndex().
-    /// <p/>
-    /// The native lucene index order is used to assign an ordinal value for each field value.
-    /// <p/>
-    /// Field values (terms) are lexicographically ordered by unicode value, and numbered starting at 1.
-    /// <p/>
-    /// Example:
-    /// <br/>If there were only three field values: "apple","banana","pear"
-    /// <br/>then ord("apple")=1, ord("banana")=2, ord("pear")=3
-    /// <p/>
-    /// WARNING: 
-    /// ord() depends on the position in an index and can thus change 
-    /// when other documents are inserted or deleted,
-    /// or if a MultiSearcher is used. 
-    /// 
-    /// <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 class OrdFieldSource:ValueSource
-    {
-        private class AnonymousClassDocValues:DocValues
-        {
-            public AnonymousClassDocValues(int[] arr, OrdFieldSource enclosingInstance)
-            {
-                InitBlock(arr, enclosingInstance);
-            }
-            private void  InitBlock(int[] arr, OrdFieldSource enclosingInstance)
-            {
-                this.arr = arr;
-                this.enclosingInstance = enclosingInstance;
-            }
-            private int[] arr;
-            private OrdFieldSource enclosingInstance;
-            public OrdFieldSource 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.strVal(int) */
-            public override System.String StrVal(int doc)
-            {
-                // the string value of the ordinal, not the string itself
-                return System.Convert.ToString(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; }
-            }
-        }
-        protected internal System.String field;
-        
-        /// <summary> Constructor for a certain field.</summary>
-        /// <param name="field">field whose values order is used.  
-        /// </param>
-        public OrdFieldSource(System.String field)
-        {
-            this.field = field;
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.ValueSource.description() */
-        public override System.String Description()
-        {
-            return "ord(" + field + ')';
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.ValueSource.getValues(Lucene.Net.Index.IndexReader) */
-        public override DocValues GetValues(IndexReader reader)
-        {
-            int[] arr = Lucene.Net.Search.FieldCache_Fields.DEFAULT.GetStringIndex(reader, field).order;
-            return new AnonymousClassDocValues(arr, this);
-        }
-        
-        /*(non-Javadoc) <see cref="java.lang.Object.equals(java.lang.Object) */
-        public  override bool Equals(System.Object o)
-        {
-            if (o.GetType() != typeof(OrdFieldSource))
-                return false;
-            OrdFieldSource other = (OrdFieldSource) o;
-            return this.field.Equals(other.field);
-        }
-        
-        private static readonly int hcode;
-        
-        /*(non-Javadoc) <see cref="java.lang.Object.hashCode() */
-        public override int GetHashCode()
-        {
-            return hcode + field.GetHashCode();
-        }
-        static OrdFieldSource()
-        {
-            hcode = typeof(OrdFieldSource).GetHashCode();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/Function/ReverseOrdFieldSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Function/ReverseOrdFieldSource.cs b/src/Lucene.Net.Core/Search/Function/ReverseOrdFieldSource.cs
deleted file mode 100644
index 2719579..0000000
--- a/src/Lucene.Net.Core/Search/Function/ReverseOrdFieldSource.cs
+++ /dev/null
@@ -1,158 +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 the ordinal of the field value from the default Lucene 
-    /// <see cref="Lucene.Net.Search.FieldCache">FieldCache</see> using getStringIndex()
-    /// and reverses the order.
-    /// <p/>
-    /// The native lucene index order is used to assign an ordinal value for each field value.
-    /// <p/>
-    /// Field values (terms) are lexicographically ordered by unicode value, and numbered starting at 1.
-    /// <br/>
-    /// Example of reverse ordinal (rord):
-    /// <br/>If there were only three field values: "apple","banana","pear"
-    /// <br/>then rord("apple")=3, rord("banana")=2, ord("pear")=1
-    /// <p/>
-    /// WARNING: 
-    /// rord() depends on the position in an index and can thus change 
-    /// when other documents are inserted or deleted,
-    /// or if a MultiSearcher is used. 
-    /// 
-    /// <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 class ReverseOrdFieldSource:ValueSource
-    {
-        private class AnonymousClassDocValues:DocValues
-        {
-            public AnonymousClassDocValues(int end, int[] arr, ReverseOrdFieldSource enclosingInstance)
-            {
-                InitBlock(end, arr, enclosingInstance);
-            }
-            private void  InitBlock(int end, int[] arr, ReverseOrdFieldSource enclosingInstance)
-            {
-                this.end = end;
-                this.arr = arr;
-                this.enclosingInstance = enclosingInstance;
-            }
-            private int end;
-            private int[] arr;
-            private ReverseOrdFieldSource enclosingInstance;
-            public ReverseOrdFieldSource Enclosing_Instance
-            {
-                get
-                {
-                    return enclosingInstance;
-                }
-                
-            }
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.DocValues.floatVal(int) */
-            public override float FloatVal(int doc)
-            {
-                return (float) (end - arr[doc]);
-            }
-            /* (non-Javadoc) <see cref="Lucene.Net.Search.Function.DocValues.intVal(int) */
-            public override int IntVal(int doc)
-            {
-                return end - arr[doc];
-            }
-            /* (non-Javadoc) <see cref="Lucene.Net.Search.Function.DocValues.strVal(int) */
-            public override System.String StrVal(int doc)
-            {
-                // the string value of the ordinal, not the string itself
-                return System.Convert.ToString(IntVal(doc));
-            }
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.DocValues.toString(int) */
-            public override System.String ToString(int doc)
-            {
-                return Enclosing_Instance.Description() + '=' + StrVal(doc);
-            }
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.DocValues.getInnerArray() */
-
-            protected internal override object InnerArray
-            {
-                get { return arr; }
-            }
-        }
-        public System.String field;
-        
-        /// <summary> Contructor for a certain field.</summary>
-        /// <param name="field">field whose values reverse order is used.  
-        /// </param>
-        public ReverseOrdFieldSource(System.String field)
-        {
-            this.field = field;
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.ValueSource.description() */
-        public override System.String Description()
-        {
-            return "rord(" + field + ')';
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.ValueSource.getValues(Lucene.Net.Index.IndexReader) */
-        public override DocValues GetValues(IndexReader reader)
-        {
-            Lucene.Net.Search.StringIndex sindex = Lucene.Net.Search.FieldCache_Fields.DEFAULT.GetStringIndex(reader, field);
-            
-            int[] arr = sindex.order;
-            int end = sindex.lookup.Length;
-            
-            return new AnonymousClassDocValues(end, arr, this);
-        }
-        
-        /*(non-Javadoc) <see cref="java.lang.Object.equals(java.lang.Object) */
-        public  override bool Equals(System.Object o)
-        {
-            if (o.GetType() != typeof(ReverseOrdFieldSource))
-                return false;
-            ReverseOrdFieldSource other = (ReverseOrdFieldSource) o;
-            return this.field.Equals(other.field);
-        }
-        
-        private static readonly int hcode;
-        
-        /*(non-Javadoc) <see cref="java.lang.Object.hashCode() */
-        public override int GetHashCode()
-        {
-            return hcode + field.GetHashCode();
-        }
-        static ReverseOrdFieldSource()
-        {
-            hcode = typeof(ReverseOrdFieldSource).GetHashCode();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/Function/ShortFieldSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Function/ShortFieldSource.cs b/src/Lucene.Net.Core/Search/Function/ShortFieldSource.cs
deleted file mode 100644
index 391c71b..0000000
--- a/src/Lucene.Net.Core/Search/Function/ShortFieldSource.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 short field values from the 
-    /// <see cref="Lucene.Net.Search.FieldCache">FieldCache</see>
-    /// using <c>getShorts()</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 ShortFieldSource:FieldCacheSource
-    {
-        private class AnonymousClassDocValues:DocValues
-        {
-            public AnonymousClassDocValues(short[] arr, ShortFieldSource enclosingInstance)
-            {
-                InitBlock(arr, enclosingInstance);
-            }
-            private void  InitBlock(short[] arr, ShortFieldSource enclosingInstance)
-            {
-                this.arr = arr;
-                this.enclosingInstance = enclosingInstance;
-            }
-            private short[] arr;
-            private ShortFieldSource enclosingInstance;
-            public ShortFieldSource 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.ShortParser parser;
-        
-        /// <summary> Create a cached short field source with default string-to-short parser. </summary>
-        public ShortFieldSource(System.String field):this(field, null)
-        {
-        }
-        
-        /// <summary> Create a cached short field source with a specific string-to-short parser. </summary>
-        public ShortFieldSource(System.String field, Lucene.Net.Search.ShortParser parser):base(field)
-        {
-            this.parser = parser;
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Function.ValueSource.description() */
-        public override System.String Description()
-        {
-            return "short(" + 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)
-        {
-            short[] arr = cache.GetShorts(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(ShortFieldSource))
-            {
-                return false;
-            }
-            ShortFieldSource other = (ShortFieldSource) 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.Int16).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/ValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Function/ValueSource.cs b/src/Lucene.Net.Core/Search/Function/ValueSource.cs
deleted file mode 100644
index c9aa286..0000000
--- a/src/Lucene.Net.Core/Search/Function/ValueSource.cs
+++ /dev/null
@@ -1,69 +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;
-
-namespace Lucene.Net.Search.Function
-{
-    
-    /// <summary> Expert: source of values for basic function queries.
-    /// <p/>At its default/simplest form, values - one per doc - are used as the score of that doc.
-    /// <p/>Values are instantiated as 
-    /// <see cref="Lucene.Net.Search.Function.DocValues">DocValues</see> for a particular reader.
-    /// <p/>ValueSource implementations differ in RAM requirements: it would always be a factor
-    /// of the number of documents, but for each document the number of bytes can be 1, 2, 4, or 8. 
-    /// 
-    /// <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 abstract class ValueSource
-    {
-        
-        /// <summary> Return the DocValues used by the function query.</summary>
-        /// <param name="reader">the IndexReader used to read these values.
-        /// If any caching is involved, that caching would also be IndexReader based.  
-        /// </param>
-        /// <throws>  IOException for any error. </throws>
-        public abstract DocValues GetValues(IndexReader reader);
-        
-        /// <summary> description of field, used in explain() </summary>
-        public abstract System.String Description();
-        
-        /* (non-Javadoc) <see cref="java.lang.Object.toString() */
-        public override System.String ToString()
-        {
-            return Description();
-        }
-        
-        /// <summary> Needed for possible caching of query results - used by <see cref="ValueSourceQuery.Equals(Object)" />.</summary>
-        /// <seealso cref="Object.Equals(Object)">
-        /// </seealso>
-        abstract public  override bool Equals(System.Object o);
-        
-        /// <summary> Needed for possible caching of query results - used by <see cref="ValueSourceQuery.GetHashCode()" />.</summary>
-        /// <seealso cref="Object.GetHashCode()">
-        /// </seealso>
-        abstract public override int GetHashCode();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/Function/ValueSourceQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Function/ValueSourceQuery.cs b/src/Lucene.Net.Core/Search/Function/ValueSourceQuery.cs
deleted file mode 100644
index 883517f..0000000
--- a/src/Lucene.Net.Core/Search/Function/ValueSourceQuery.cs
+++ /dev/null
@@ -1,235 +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 IndexReader = Lucene.Net.Index.IndexReader;
-using TermDocs = Lucene.Net.Index.TermDocs;
-using ToStringUtils = Lucene.Net.Util.ToStringUtils;
-using Lucene.Net.Search;
-
-namespace Lucene.Net.Search.Function
-{
-    
-    /// <summary> Expert: A Query that sets the scores of document to the
-    /// values obtained from a <see cref="Lucene.Net.Search.Function.ValueSource">ValueSource</see>.
-    /// <p/>
-    /// This query provides a score for <em>each and every</em> undeleted document in the index.    
-    /// <p/>
-    /// The value source can be based on a (cached) value of an indexed field, but it
-    /// can also be based on an external source, e.g. values read from an external database. 
-    /// <p/>
-    /// Score is set as: Score(doc,query) = query.getBoost()<sup>2</sup> * valueSource(doc).  
-    /// 
-    /// <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 ValueSourceQuery:Query
-    {
-        internal ValueSource valSrc;
-        
-        /// <summary> Create a value source query</summary>
-        /// <param name="valSrc">provides the values defines the function to be used for scoring
-        /// </param>
-        public ValueSourceQuery(ValueSource valSrc)
-        {
-            this.valSrc = valSrc;
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Query.rewrite(Lucene.Net.Index.IndexReader) */
-        public override Query Rewrite(IndexReader reader)
-        {
-            return this;
-        }
-        
-        /*(non-Javadoc) <see cref="Lucene.Net.Search.Query.extractTerms(java.util.Set) */
-        public override void  ExtractTerms(System.Collections.Generic.ISet<Term> terms)
-        {
-            // no terms involved here
-        }
-        
-        [Serializable]
-        internal class ValueSourceWeight:Weight
-        {
-            private void  InitBlock(ValueSourceQuery enclosingInstance)
-            {
-                this.enclosingInstance = enclosingInstance;
-            }
-            private ValueSourceQuery enclosingInstance;
-            public ValueSourceQuery Enclosing_Instance
-            {
-                get
-                {
-                    return enclosingInstance;
-                }
-                
-            }
-            internal Similarity similarity;
-            internal float queryNorm;
-            internal float queryWeight;
-            
-            public ValueSourceWeight(ValueSourceQuery enclosingInstance, Searcher searcher)
-            {
-                InitBlock(enclosingInstance);
-                this.similarity = Enclosing_Instance.GetSimilarity(searcher);
-            }
-            
-            /*(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 queryWeight; }
-            }
-
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Weight.sumOfSquaredWeights() */
-
-            public override float GetSumOfSquaredWeights()
-            {
-                queryWeight = Enclosing_Instance.Boost;
-                return queryWeight*queryWeight;
-            }
-
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Weight.normalize(float) */
-            public override void  Normalize(float norm)
-            {
-                this.queryNorm = norm;
-                queryWeight *= this.queryNorm;
-            }
-            
-            public override Scorer Scorer(IndexReader reader, bool scoreDocsInOrder, bool topScorer)
-            {
-                return new ValueSourceScorer(enclosingInstance, similarity, reader, this);
-            }
-            
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Weight.explain(Lucene.Net.Index.IndexReader, int) */
-            public override Explanation Explain(IndexReader reader, int doc)
-            {
-                DocValues vals = enclosingInstance.valSrc.GetValues(reader);
-                float sc = queryWeight*vals.FloatVal(doc);
-
-                Explanation result = new ComplexExplanation(true, sc, enclosingInstance.ToString() + ", product of:")
-                ;
-                result.AddDetail(vals.Explain(doc));
-                result.AddDetail(new Explanation(enclosingInstance.Boost, "boost"));
-                result.AddDetail(new Explanation(queryNorm, "queryNorm"));
-                return result;
-            }
-        }
-        
-        /// <summary> A scorer that (simply) matches all documents, and scores each document with 
-        /// the value of the value soure in effect. As an example, if the value source 
-        /// is a (cached) field source, then value of that field in that document will 
-        /// be used. (assuming field is indexed for this doc, with a single token.)   
-        /// </summary>
-        private class ValueSourceScorer : Scorer
-        {
-            private void InitBlock(ValueSourceQuery enclosingInstance)
-            {
-                this.enclosingInstance = enclosingInstance;
-            }
-            private ValueSourceQuery enclosingInstance;
-            public ValueSourceQuery Enclosing_Instance
-            {
-                get
-                {
-                    return enclosingInstance;
-                }
-
-            }
-            private ValueSourceWeight weight;
-            private float qWeight;
-            private DocValues vals;
-            private TermDocs termDocs;
-            private int doc = -1;
-
-            // constructor
-            internal ValueSourceScorer(ValueSourceQuery enclosingInstance, Similarity similarity, IndexReader reader, ValueSourceWeight w)
-                : base(similarity)
-            {
-                InitBlock(enclosingInstance);
-                this.weight = w;
-                this.qWeight = w.Value;
-                // this is when/where the values are first created.
-                vals = Enclosing_Instance.valSrc.GetValues(reader);
-                termDocs = reader.TermDocs(null);
-            }
-
-            public override int NextDoc()
-            {
-                return doc = termDocs.Next() ? termDocs.Doc : NO_MORE_DOCS;
-            }
-
-            public override int DocID()
-            {
-                return doc;
-            }
-
-            public override int Advance(int target)
-            {
-                return doc = termDocs.SkipTo(target) ? termDocs.Doc : NO_MORE_DOCS;
-            }
-
-            /*(non-Javadoc) <see cref="Lucene.Net.Search.Scorer.explain(int) */
-            public override float Score()
-            {
-                return qWeight * vals.FloatVal(termDocs.Doc);
-            }
-        }
-
-        public override Weight CreateWeight(Searcher searcher)
-        {
-            return new ValueSourceQuery.ValueSourceWeight(this, searcher);
-        }
-        
-        public override System.String ToString(System.String field)
-        {
-            return valSrc.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;
-            }
-            ValueSourceQuery other = (ValueSourceQuery) o;
-            return this.Boost == other.Boost && this.valSrc.Equals(other.valSrc);
-        }
-        
-        /// <summary>Returns a hash code value for this object. </summary>
-        public override int GetHashCode()
-        {
-            return (GetType().GetHashCode() + valSrc.GetHashCode()) ^ BitConverter.ToInt32(BitConverter.GetBytes(Boost), 0);
-        }
-
-        override public System.Object Clone()
-        {
-            return this.MemberwiseClone();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/FuzzyTermEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FuzzyTermEnum.cs b/src/Lucene.Net.Core/Search/FuzzyTermEnum.cs
deleted file mode 100644
index ecfee17..0000000
--- a/src/Lucene.Net.Core/Search/FuzzyTermEnum.cs
+++ /dev/null
@@ -1,318 +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 Term = Lucene.Net.Index.Term;
-
-namespace Lucene.Net.Search
-{
-    
-    /// <summary>Subclass of FilteredTermEnum for enumerating all terms that are similiar
-    /// to the specified filter term.
-    /// 
-    /// <p/>Term enumerations are always ordered by Term.compareTo().  Each term in
-    /// the enumeration is greater than all that precede it.
-    /// </summary>
-    public sealed class FuzzyTermEnum:FilteredTermEnum
-    {
-        /* Allows us save time required to create a new array
-        * everytime similarity is called.
-        */
-        private int[] p;
-        private int[] d;
-        
-        private float similarity;
-        private bool endEnum = false;
-
-        private bool isDisposed;
-
-        private Term searchTerm = null;
-        private System.String field;
-        private System.String text;
-        private System.String prefix;
-        
-        private float minimumSimilarity;
-        private float scale_factor;
-        
-        /// <summary> Creates a FuzzyTermEnum with an empty prefix and a minSimilarity of 0.5f.
-        /// <p/>
-        /// After calling the constructor the enumeration is already pointing to the first 
-        /// valid term if such a term exists. 
-        /// 
-        /// </summary>
-        /// <param name="reader">
-        /// </param>
-        /// <param name="term">
-        /// </param>
-        /// <throws>  IOException </throws>
-        /// <seealso cref="FuzzyTermEnum(IndexReader, Term, float, int)">
-        /// </seealso>
-        public FuzzyTermEnum(IndexReader reader, Term term):this(reader, term, FuzzyQuery.defaultMinSimilarity, FuzzyQuery.defaultPrefixLength)
-        {
-        }
-        
-        /// <summary> Creates a FuzzyTermEnum with an empty prefix.
-        /// <p/>
-        /// After calling the constructor the enumeration is already pointing to the first 
-        /// valid term if such a term exists. 
-        /// 
-        /// </summary>
-        /// <param name="reader">
-        /// </param>
-        /// <param name="term">
-        /// </param>
-        /// <param name="minSimilarity">
-        /// </param>
-        /// <throws>  IOException </throws>
-        /// <seealso cref="FuzzyTermEnum(IndexReader, Term, float, int)">
-        /// </seealso>
-        public FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity):this(reader, term, minSimilarity, FuzzyQuery.defaultPrefixLength)
-        {
-        }
-        
-        /// <summary> Constructor for enumeration of all terms from specified <c>reader</c> which share a prefix of
-        /// length <c>prefixLength</c> with <c>term</c> and which have a fuzzy similarity &gt;
-        /// <c>minSimilarity</c>.
-        /// <p/>
-        /// After calling the constructor the enumeration is already pointing to the first 
-        /// valid term if such a term exists. 
-        /// 
-        /// </summary>
-        /// <param name="reader">Delivers terms.
-        /// </param>
-        /// <param name="term">Pattern term.
-        /// </param>
-        /// <param name="minSimilarity">Minimum required similarity for terms from the reader. Default value is 0.5f.
-        /// </param>
-        /// <param name="prefixLength">Length of required common prefix. Default value is 0.
-        /// </param>
-        /// <throws>  IOException </throws>
-        public FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity, int prefixLength):base()
-        {
-            
-            if (minSimilarity >= 1.0f)
-                throw new System.ArgumentException("minimumSimilarity cannot be greater than or equal to 1");
-            else if (minSimilarity < 0.0f)
-                throw new System.ArgumentException("minimumSimilarity cannot be less than 0");
-            if (prefixLength < 0)
-                throw new System.ArgumentException("prefixLength cannot be less than 0");
-            
-            this.minimumSimilarity = minSimilarity;
-            this.scale_factor = 1.0f / (1.0f - minimumSimilarity);
-            this.searchTerm = term;
-            this.field = searchTerm.Field;
-            
-            //The prefix could be longer than the word.
-            //It's kind of silly though.  It means we must match the entire word.
-            int fullSearchTermLength = searchTerm.Text.Length;
-            int realPrefixLength = prefixLength > fullSearchTermLength?fullSearchTermLength:prefixLength;
-            
-            this.text = searchTerm.Text.Substring(realPrefixLength);
-            this.prefix = searchTerm.Text.Substring(0, (realPrefixLength) - (0));
-
-            this.p = new int[this.text.Length + 1];
-            this.d = new int[this.text.Length + 1];
-            
-            SetEnum(reader.Terms(new Term(searchTerm.Field, prefix)));
-        }
-        
-        /// <summary> The termCompare method in FuzzyTermEnum uses Levenshtein distance to 
-        /// calculate the distance between the given term and the comparing term. 
-        /// </summary>
-        protected internal override bool TermCompare(Term term)
-        {
-            if ((System.Object) field == (System.Object) term.Field && term.Text.StartsWith(prefix))
-            {
-                System.String target = term.Text.Substring(prefix.Length);
-                this.similarity = Similarity(target);
-                return (similarity > minimumSimilarity);
-            }
-            endEnum = true;
-            return false;
-        }
-        
-        public override float Difference()
-        {
-            return ((similarity - minimumSimilarity) * scale_factor);
-        }
-        
-        public override bool EndEnum()
-        {
-            return endEnum;
-        }
-        
-        // <summary>
-        // ***************************
-        // Compute Levenshtein distance
-        // ****************************
-        // </summary>
-        
-        /// <summary> <p/>Similarity returns a number that is 1.0f or less (including negative numbers)
-        /// based on how similar the Term is compared to a target term.  It returns
-        /// exactly 0.0f when
-        /// <c>
-        /// editDistance &gt; maximumEditDistance</c>  
-        /// Otherwise it returns:
-        /// <c>
-        /// 1 - (editDistance / length)</c>
-        /// where length is the length of the shortest term (text or target) including a
-        /// prefix that are identical and editDistance is the Levenshtein distance for
-        /// the two words.<p/>
-        /// 
-        /// <p/>Embedded within this algorithm is a fail-fast Levenshtein distance
-        /// algorithm.  The fail-fast algorithm differs from the standard Levenshtein
-        /// distance algorithm in that it is aborted if it is discovered that the
-        /// mimimum distance between the words is greater than some threshold.
-        /// 
-        /// <p/>To calculate the maximum distance threshold we use the following formula:
-        /// <c>
-        /// (1 - minimumSimilarity) * length</c>
-        /// where length is the shortest term including any prefix that is not part of the
-        /// similarity comparision.  This formula was derived by solving for what maximum value
-        /// of distance returns false for the following statements:
-        /// <code>
-        /// similarity = 1 - ((float)distance / (float) (prefixLength + Math.min(textlen, targetlen)));
-        /// return (similarity > minimumSimilarity);</code>
-        /// where distance is the Levenshtein distance for the two words.
-        /// <p/>
-        /// <p/>Levenshtein distance (also known as edit distance) is a measure of similiarity
-        /// between two strings where the distance is measured as the number of character
-        /// deletions, insertions or substitutions required to transform one string to
-        /// the other string.
-        /// </summary>
-        /// <param name="target">the target word or phrase
-        /// </param>
-        /// <returns> the similarity,  0.0 or less indicates that it matches less than the required
-        /// threshold and 1.0 indicates that the text and target are identical
-        /// </returns>
-        private float Similarity(System.String target)
-        {
-
-            int m = target.Length;
-            int n = text.Length;
-            if (n == 0)
-            {
-                //we don't have anything to compare.  That means if we just add
-                //the letters for m we get the new word
-                return prefix.Length == 0 ? 0.0f : 1.0f - ((float)m / prefix.Length);
-            }
-            if (m == 0)
-            {
-                return prefix.Length == 0 ? 0.0f : 1.0f - ((float)n / prefix.Length);
-            }
-
-            int maxDistance = CalculateMaxDistance(m);
-
-            if (maxDistance < System.Math.Abs(m - n))
-            {
-                //just adding the characters of m to n or vice-versa results in
-                //too many edits
-                //for example "pre" length is 3 and "prefixes" length is 8.  We can see that
-                //given this optimal circumstance, the edit distance cannot be less than 5.
-                //which is 8-3 or more precisesly Math.abs(3-8).
-                //if our maximum edit distance is 4, then we can discard this word
-                //without looking at it.
-                return 0.0f;
-            }
-
-            // init matrix d
-            for (int i = 0; i < n; ++i)
-            {
-                p[i] = i;
-            }
-
-                // start computing edit distance
-            for (int j = 1; j <= m; ++j)
-            {
-                int bestPossibleEditDistance = m;
-                char t_j = target[j - 1];
-                d[0] = j;
-                for (int i = 1; i <= n; ++i)
-                {
-                    // minimum of cell to the left+1, to the top+1, diagonally left and up +(0|1)
-                    if (t_j != text[i - 1])
-                    {
-                        d[i] = Math.Min(Math.Min(d[i - 1], p[i]), p[i - 1]) + 1;
-                    }
-                    else
-                    {
-                        d[i] = Math.Min(Math.Min(d[i - 1] + 1, p[i] + 1), p[i - 1]);
-                    }
-                    bestPossibleEditDistance = System.Math.Min(bestPossibleEditDistance, d[i]);
-                }
-
-                //After calculating row i, the best possible edit distance
-                //can be found by found by finding the smallest value in a given column.
-                //If the bestPossibleEditDistance is greater than the max distance, abort.
-
-                if (j > maxDistance && bestPossibleEditDistance > maxDistance)
-                {
-                    //equal is okay, but not greater
-                    //the closest the target can be to the text is just too far away.
-                    //this target is leaving the party early.
-                    return 0.0f;
-                }
-
-                // copy current distance counts to 'previous row' distance counts: swap p and d
-                  int[] _d = p;
-                  p = d;
-                  d = _d;
-            }
-
-            // our last action in the above loop was to switch d and p, so p now
-            // actually has the most recent cost counts
-
-            // this will return less than 0.0 when the edit distance is
-            // greater than the number of characters in the shorter word.
-            // but this was the formula that was previously used in FuzzyTermEnum,
-            // so it has not been changed (even though minimumSimilarity must be
-            // greater than 0.0)
-            return 1.0f - (p[n] / (float)(prefix.Length + System.Math.Min(n, m)));
-
-        }
-        
-        /// <summary> The max Distance is the maximum Levenshtein distance for the text
-        /// compared to some other value that results in score that is
-        /// better than the minimum similarity.
-        /// </summary>
-        /// <param name="m">the length of the "other value"
-        /// </param>
-        /// <returns> the maximum levenshtein distance that we care about
-        /// </returns>
-        private int CalculateMaxDistance(int m)
-        {
-            return (int) ((1 - minimumSimilarity) * (System.Math.Min(text.Length, m) + prefix.Length));
-        }
-
-        protected override void Dispose(bool disposing)
-        {
-            if (isDisposed) return;
-
-            if (disposing)
-            {
-                p = null;
-                d = null;
-                searchTerm = null;
-            }
-
-            isDisposed = true;
-            base.Dispose(disposing); //call super.close() and let the garbage collector do its work.
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/Grouping/AbstractDistinctValuesCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Grouping/AbstractDistinctValuesCollector.cs b/src/Lucene.Net.Core/Search/Grouping/AbstractDistinctValuesCollector.cs
deleted file mode 100644
index 39b65b1..0000000
--- a/src/Lucene.Net.Core/Search/Grouping/AbstractDistinctValuesCollector.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using Lucene.Net.Search;
-using Lucene.Net.Util;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-
-namespace Lucene.Net.Search.Grouping
-{
-	public abstract class AbstractDistinctValuesCollector<T> : Collector where T : AbstractDistinctValuesCollector.GroupCount
-	{
-
-		public abstract List<T> getGroups();
-
-		public override bool AcceptsDocsOutOfOrder()
-		{
-			return true;
-		}
-
-		public override Scorer Scorer
-		{
-			set
-			{
-				throw new NotImplementedException();
-			}
-		}
-	}
-
-
-	public abstract class AbstractDistinctValuesCollector
-	{
-		public interface GroupCount
-		{
-		}
-
-		public abstract class GroupCount<GROUP_VALUE_TYPE> : GroupCount
-		{
-			public GROUP_VALUE_TYPE groupValue;
-
-			public HashSet<GROUP_VALUE_TYPE> uniqueValues;
-
-			public GroupCount(GROUP_VALUE_TYPE groupValue)
-			{
-				this.groupValue = groupValue;
-				this.uniqueValues = new HashSet<GROUP_VALUE_TYPE>();
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0cc1473d/src/Lucene.Net.Core/Search/Grouping/TermDistinctValuesCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Grouping/TermDistinctValuesCollector.cs b/src/Lucene.Net.Core/Search/Grouping/TermDistinctValuesCollector.cs
deleted file mode 100644
index fbb2d9a..0000000
--- a/src/Lucene.Net.Core/Search/Grouping/TermDistinctValuesCollector.cs
+++ /dev/null
@@ -1,148 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using Lucene.Net.Util;
-using Lucene.Net;
-using Lucene.Net.Search;
-using System.Collections.ObjectModel;
-using Lucene.Net.Index;
-using Lucene.Net.Support;
-
-
-
-namespace Lucene.Net.Search.Grouping
-{
-	public class TermDistinctValuesCollector : AbstractDistinctValuesCollector<TermDistinctValuesCollector.GroupCount>
-	{
-
-		private String groupField;
-
-		private String countField;
-
-		private List<GroupCount> groups;
-
-		private SentinelIntSet ordSet;
-
-		private GroupCount[] groupCounts;
-
-		private SortedDocValues groupFieldTermIndex;
-
-		private SortedDocValues countFieldTermIndex;
-
-		public TermDistinctValuesCollector(String groupField, String countField, Collection<GroupCount> groups)
-		{
-			this.groupField = groupField;
-			this.countField = countField;
-			this.groups = new List<GroupCount>(groups.Count());
-			foreach(GroupCount group in this.groups)
-			{
-				this.groups.Add(new GroupCount(group.groupValue));
-			}
-
-			this.ordSet = new SentinelIntSet(groups.Count(), -2);
-			groupCounts = new GroupCount[this.ordSet.Keys.Count()];
-		}
-
-		public override void Collect(int doc)
-		{
-			int slot = this.ordSet.Find(this.groupFieldTermIndex.GetOrd(doc));
-			if((slot < 0))
-			{
-				return;
-			}
-
-			GroupCount gc = groupCounts[slot];
-			int countOrd = this.countFieldTermIndex.GetOrd(doc);
-			if(this.doesNotContainOrd(countOrd, gc.ords))
-			{
-				if((countOrd == -1))
-				{
-					gc.uniqueValues.Add(null);
-				}
-				else
-				{
-					BytesRef br = new BytesRef();
-					countFieldTermIndex.LookupOrd(countOrd, br);
-					gc.uniqueValues.Add(br);
-				}
-
-				gc.ords = Arrays.CopyOf(gc.ords, (gc.ords.Length + 1));
-				gc.ords[(gc.ords.Length - 1)] = countOrd;
-				if((gc.ords.Length > 1))
-				{
-					Arrays.Sort(gc.ords);
-				}
-
-			}
-
-		}
-
-		private bool doesNotContainOrd(int ord, int[] ords)
-		{
-			if((ords.Length == 0))
-			{
-				return true;
-			}
-			else if((ords.Length == 1))
-			{
-				return (ord != ords[0]);
-			}
-
-			return (Arrays.BinarySearch(ords, ord) < 0);
-		}
-
-		public override List<GroupCount> getGroups()
-		{
-			return this.groups;
-		}
-
-		public void SetNextReader(AtomicReaderContext context)
-		{
-			this.groupFieldTermIndex = FieldCache.DEFAULT.GetTermsIndex(context.AtomicReader, this.groupField);
-			this.countFieldTermIndex = FieldCache.DEFAULT.GetTermsIndex(context.AtomicReader, this.countField);
-			this.ordSet.Clear();
-			foreach(GroupCount group in this.groups)
-			{
-				int groupOrd = group.groupValue == null ? -1 : groupFieldTermIndex.LookupTerm(group.groupValue);
-				if(group.groupValue != null && groupOrd < 0)
-				{
-					continue;
-				}
-
-				groupCounts[this.ordSet.Put(groupOrd)] = group;
-				group.ords = new int[group.uniqueValues.Count()];
-				Arrays.Fill(group.ords, -2);
-				int i = 0;
-				foreach(BytesRef value in group.uniqueValues)
-				{
-					int countOrd = value == null ? -1 : countFieldTermIndex.LookupTerm(value);
-					if(value == null || countOrd >= 0)
-					{
-						group.ords[i++] = countOrd;
-					}
-				}
-
-			}
-
-		}
-
-		public override AtomicReaderContext NextReader
-		{
-			set
-			{
-				SetNextReader(value);
-			}
-		}
-
-		public class GroupCount : AbstractDistinctValuesCollector.GroupCount<BytesRef>
-		{
-			public int[] ords;
-
-			public GroupCount(BytesRef groupValue)
-				: base(groupValue)
-			{
-			}
-		}
-	}
-}


Mime
View raw message