lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dougs...@apache.org
Subject svn commit: r798995 [18/35] - in /incubator/lucene.net/trunk/C#/src: Lucene.Net/ Lucene.Net/Analysis/ Lucene.Net/Analysis/Standard/ Lucene.Net/Document/ Lucene.Net/Index/ Lucene.Net/QueryParser/ Lucene.Net/Search/ Lucene.Net/Search/Function/ Lucene.Net...
Date Wed, 29 Jul 2009 18:04:24 GMT
Added: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/DocIdSetIterator.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/DocIdSetIterator.cs?rev=798995&view=auto
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/DocIdSetIterator.cs (added)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/DocIdSetIterator.cs Wed Jul 29 18:04:12 2009
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Lucene.Net.Search
+{
+    public abstract class DocIdSetIterator
+    {
+        /// <summary>
+        /// Returns the current document number.  This is invalid until Next() is called for the first time.
+        /// </summary>
+        /// <returns>the current doc number</returns> 
+        public abstract int Doc();
+
+        /// <summary>
+        /// Moves to the next docId in the set.  Returns true, iff there is such a docId.
+        /// </summary>
+        /// <returns>true if there is a next docId</returns>
+        public abstract bool Next();
+
+        /// <summary>
+        /// Skips entries to the first beyond the current whose document number is
+        /// greater than or equal to <i>target</i>.  Returns true iff there is such
+        /// an entry.
+        /// <p>
+        /// Behaves as if written:
+        /// <pre>
+        ///   boolean skipTo(int target) {
+        ///     do {
+        ///       if (!next())
+        ///         return false;
+        ///     } while (target > doc());
+        ///     return true;
+        ///   }
+        /// </pre>
+        /// Some implementations are considerably more efficient than that.
+        /// </p>
+        /// </summary>
+        /// <returns>true if there is a docId greater than or equal to target</returns>
+        public abstract bool SkipTo(int target);
+    }
+}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/ExtendedFieldCacheImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/ExtendedFieldCacheImpl.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/ExtendedFieldCacheImpl.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/ExtendedFieldCacheImpl.cs Wed Jul 29 18:04:12 2009
@@ -24,186 +24,186 @@
 
 namespace Lucene.Net.Search
 {
-	
-	
-	/// <summary> 
-	/// 
-	/// 
-	/// </summary>
-	public class ExtendedFieldCacheImpl : FieldCacheImpl, ExtendedFieldCache
-	{
-		public ExtendedFieldCacheImpl()
-		{
-			InitBlock();
-		}
-		public class AnonymousClassLongParser : LongParser
-		{
-			public virtual long ParseLong(System.String value_Renamed)
-			{
-				return System.Int64.Parse(value_Renamed);
-			}
-		}
-		public class AnonymousClassDoubleParser : DoubleParser
-		{
-			public virtual double ParseDouble(System.String value_Renamed)
-			{
-				return System.Double.Parse(value_Renamed);
-			}
-		}
-		
-		new internal class AnonymousClassCache : Cache
-		{
-			public AnonymousClassCache(Lucene.Net.Search.FieldCacheImpl enclosingInstance)
-			{
-				InitBlock(enclosingInstance);
-			}
-			private void  InitBlock(Lucene.Net.Search.FieldCacheImpl enclosingInstance)
-			{
-				this.enclosingInstance = enclosingInstance;
-			}
-			private Lucene.Net.Search.FieldCacheImpl enclosingInstance;
-			public Lucene.Net.Search.FieldCacheImpl Enclosing_Instance
-			{
-				get
-				{
-					return enclosingInstance;
-				}
-				
-			}
-			
-			protected internal override System.Object CreateValue(IndexReader reader, System.Object entryKey)
-			{
-				Entry entry = (Entry) entryKey;
-				System.String field = entry.field;
-				LongParser parser = (LongParser) entry.custom;
-				long[] retArray = new long[reader.MaxDoc()];
-				TermDocs termDocs = reader.TermDocs();
-				TermEnum termEnum = reader.Terms(new Term(field, ""));
-				try
-				{
-					do 
-					{
-						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
-							break;
-						long termval = parser.ParseLong(term.Text());
-						termDocs.Seek(termEnum);
-						while (termDocs.Next())
-						{
-							retArray[termDocs.Doc()] = termval;
-						}
-					}
-					while (termEnum.Next());
-				}
-				finally
-				{
-					termDocs.Close();
-					termEnum.Close();
-				}
-				return retArray;
-			}
-		}
-		
-		new internal class AnonymousClassCache1:Cache
-		{
-			public AnonymousClassCache1(Lucene.Net.Search.FieldCacheImpl enclosingInstance)
-			{
-				InitBlock(enclosingInstance);
-			}
-			private void  InitBlock(Lucene.Net.Search.FieldCacheImpl enclosingInstance)
-			{
-				this.enclosingInstance = enclosingInstance;
-			}
-			private Lucene.Net.Search.FieldCacheImpl enclosingInstance;
-			public Lucene.Net.Search.FieldCacheImpl Enclosing_Instance
-			{
-				get
-				{
-					return enclosingInstance;
-				}
-				
-			}
-			
-			protected internal override System.Object CreateValue(IndexReader reader, System.Object entryKey)
-			{
-				Entry entry = (Entry) entryKey;
-				System.String field = entry.field;
-				DoubleParser parser = (DoubleParser) entry.custom;
-				double[] retArray = new double[reader.MaxDoc()];
-				TermDocs termDocs = reader.TermDocs();
-				TermEnum termEnum = reader.Terms(new Term(field, ""));
-				try
-				{
-					do 
-					{
-						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
-							break;
-						double termval = parser.ParseDouble(term.Text());
-						termDocs.Seek(termEnum);
-						while (termDocs.Next())
-						{
-							retArray[termDocs.Doc()] = termval;
-						}
-					}
-					while (termEnum.Next());
-				}
-				finally
-				{
-					termDocs.Close();
-					termEnum.Close();
-				}
-				return retArray;
-			}
-		}
-		
-		new internal class AnonymousClassCache2:Cache
-		{
-			public AnonymousClassCache2(Lucene.Net.Search.FieldCacheImpl enclosingInstance)
-			{
-				InitBlock(enclosingInstance);
-			}
-			private void  InitBlock(Lucene.Net.Search.FieldCacheImpl enclosingInstance)
-			{
-				this.enclosingInstance = enclosingInstance;
-			}
-			private Lucene.Net.Search.FieldCacheImpl enclosingInstance;
-			public Lucene.Net.Search.FieldCacheImpl Enclosing_Instance
-			{
-				get
-				{
-					return enclosingInstance;
-				}
-				
-			}
-			
-			protected internal override System.Object CreateValue(IndexReader reader, System.Object fieldKey)
-			{
-				System.String field = String.Intern(((System.String) fieldKey));
-				TermEnum enumerator = reader.Terms(new Term(field, ""));
-				try
-				{
-					Term term = enumerator.Term();
-					if (term == null)
-					{
-						throw new System.SystemException("no terms in field " + field + " - cannot determine sort type");
-					}
-					System.Object ret = null;
-					if ((System.Object) term.Field() == (System.Object) field)
-					{
-						System.String termtext = term.Text().Trim();
-						
-						/**
-						* Java 1.4 level code:
-						
-						if (pIntegers.matcher(termtext).matches())
-						return IntegerSortedHitQueue.comparator (reader, enumerator, field);
+
+
+    /// <summary> 
+    /// 
+    /// 
+    /// </summary>
+    public class ExtendedFieldCacheImpl : FieldCacheImpl, ExtendedFieldCache
+    {
+        public ExtendedFieldCacheImpl()
+        {
+            InitBlock();
+        }
+        public class AnonymousClassLongParser : LongParser
+        {
+            public virtual long ParseLong(System.String value_Renamed)
+            {
+                return System.Int64.Parse(value_Renamed);
+            }
+        }
+        public class AnonymousClassDoubleParser : DoubleParser
+        {
+            public virtual double ParseDouble(System.String value_Renamed)
+            {
+                return System.Double.Parse(value_Renamed);
+            }
+        }
+
+        new internal class AnonymousClassCache : Cache
+        {
+            public AnonymousClassCache(Lucene.Net.Search.FieldCacheImpl enclosingInstance)
+            {
+                InitBlock(enclosingInstance);
+            }
+            private void InitBlock(Lucene.Net.Search.FieldCacheImpl enclosingInstance)
+            {
+                this.enclosingInstance = enclosingInstance;
+            }
+            private Lucene.Net.Search.FieldCacheImpl enclosingInstance;
+            public Lucene.Net.Search.FieldCacheImpl Enclosing_Instance
+            {
+                get
+                {
+                    return enclosingInstance;
+                }
+
+            }
+
+            protected internal override object CreateValue(IndexReader reader, object entryKey)
+            {
+                Entry entry = (Entry)entryKey;
+                System.String field = entry.field;
+                LongParser parser = (LongParser)entry.custom;
+                long[] retArray = new long[reader.MaxDoc()];
+                TermDocs termDocs = reader.TermDocs();
+                TermEnum termEnum = reader.Terms(new Term(field));
+                try
+                {
+                    do
+                    {
+                        Term term = termEnum.Term();
+                        if (term == null || (object)term.Field() != (object)field)
+                            break;
+                        long termval = parser.ParseLong(term.Text());
+                        termDocs.Seek(termEnum);
+                        while (termDocs.Next())
+                        {
+                            retArray[termDocs.Doc()] = termval;
+                        }
+                    }
+                    while (termEnum.Next());
+                }
+                finally
+                {
+                    termDocs.Close();
+                    termEnum.Close();
+                }
+                return retArray;
+            }
+        }
+
+        new internal class AnonymousClassCache1 : Cache
+        {
+            public AnonymousClassCache1(Lucene.Net.Search.FieldCacheImpl enclosingInstance)
+            {
+                InitBlock(enclosingInstance);
+            }
+            private void InitBlock(Lucene.Net.Search.FieldCacheImpl enclosingInstance)
+            {
+                this.enclosingInstance = enclosingInstance;
+            }
+            private Lucene.Net.Search.FieldCacheImpl enclosingInstance;
+            public Lucene.Net.Search.FieldCacheImpl Enclosing_Instance
+            {
+                get
+                {
+                    return enclosingInstance;
+                }
+
+            }
+
+            protected internal override object CreateValue(IndexReader reader, object entryKey)
+            {
+                Entry entry = (Entry)entryKey;
+                System.String field = entry.field;
+                DoubleParser parser = (DoubleParser)entry.custom;
+                double[] retArray = new double[reader.MaxDoc()];
+                TermDocs termDocs = reader.TermDocs();
+                TermEnum termEnum = reader.Terms(new Term(field));
+                try
+                {
+                    do
+                    {
+                        Term term = termEnum.Term();
+                        if (term == null || (object)term.Field() != (object)field)
+                            break;
+                        double termval = parser.ParseDouble(term.Text());
+                        termDocs.Seek(termEnum);
+                        while (termDocs.Next())
+                        {
+                            retArray[termDocs.Doc()] = termval;
+                        }
+                    }
+                    while (termEnum.Next());
+                }
+                finally
+                {
+                    termDocs.Close();
+                    termEnum.Close();
+                }
+                return retArray;
+            }
+        }
+
+        new internal class AnonymousClassCache2 : Cache
+        {
+            public AnonymousClassCache2(Lucene.Net.Search.FieldCacheImpl enclosingInstance)
+            {
+                InitBlock(enclosingInstance);
+            }
+            private void InitBlock(Lucene.Net.Search.FieldCacheImpl enclosingInstance)
+            {
+                this.enclosingInstance = enclosingInstance;
+            }
+            private Lucene.Net.Search.FieldCacheImpl enclosingInstance;
+            public Lucene.Net.Search.FieldCacheImpl Enclosing_Instance
+            {
+                get
+                {
+                    return enclosingInstance;
+                }
+
+            }
+
+            protected internal override object CreateValue(IndexReader reader, object fieldKey)
+            {
+                System.String field = String.Intern(((System.String)fieldKey));
+                TermEnum enumerator = reader.Terms(new Term(field));
+                try
+                {
+                    Term term = enumerator.Term();
+                    if (term == null)
+                    {
+                        throw new System.SystemException("no terms in field " + field + " - cannot determine sort type");
+                    }
+                    object ret = null;
+                    if ((object)term.Field() == (object)field)
+                    {
+                        System.String termtext = term.Text().Trim();
+
+                        /**
+                        * Java 1.4 level code:
 						
-						else if (pFloats.matcher(termtext).matches())
-						return FloatSortedHitQueue.comparator (reader, enumerator, field);
-						*/
+                        if (pIntegers.matcher(termtext).matches())
+                        return IntegerSortedHitQueue.comparator (reader, enumerator, field);
 						
-						// Java 1.3 level code:
+                        else if (pFloats.matcher(termtext).matches())
+                        return FloatSortedHitQueue.comparator (reader, enumerator, field);
+                        */
+
+                        // Java 1.3 level code:
                         try
                         {
                             int parsedIntValue;
@@ -218,12 +218,12 @@
                             }
                             else
                             {
-                                float f = 0.0f;
-                                if (SupportClass.Single.TryParse(termtext, out f))
+                                try
                                 {
+                                    SupportClass.Single.Parse(termtext);
                                     ret = Enclosing_Instance.GetFloats(reader, field);
                                 }
-                                else
+                                catch (System.FormatException)
                                 {
                                     ret = Enclosing_Instance.GetStringIndex(reader, field);
                                 }
@@ -234,68 +234,68 @@
                             ret = Enclosing_Instance.GetStringIndex(reader, field);
                         }
                     }
-					else
-					{
-						throw new System.SystemException("field \"" + field + "\" does not appear to be indexed");
-					}
-					return ret;
-				}
-				finally
-				{
-					enumerator.Close();
-				}
-			}
-		}
-		private void  InitBlock()
-		{
-			longsCache = new AnonymousClassCache(this);
-			doublesCache = new AnonymousClassCache1(this);
-			autoCache = new AnonymousClassCache2(this);
-		}
-		private static readonly LongParser LONG_PARSER;
-		
-		private static readonly DoubleParser DOUBLE_PARSER;
-		
-		
-		public virtual long[] GetLongs(IndexReader reader, System.String field)
-		{
-			return GetLongs(reader, field, LONG_PARSER);
-		}
-		
-		// inherit javadocs
-		public virtual long[] GetLongs(IndexReader reader, System.String field, LongParser parser)
-		{
-			return (long[]) longsCache.Get(reader, new Entry(field, parser));
-		}
-		
-		internal Cache longsCache;
-		
-		// inherit javadocs
-		public virtual double[] GetDoubles(IndexReader reader, System.String field)
-		{
-			return GetDoubles(reader, field, DOUBLE_PARSER);
-		}
-		
-		// inherit javadocs
-		public virtual double[] GetDoubles(IndexReader reader, System.String field, DoubleParser parser)
-		{
-			return (double[]) doublesCache.Get(reader, new Entry(field, parser));
-		}
-		
-		internal Cache doublesCache;
-		
-		
-		// inherit javadocs
-		public override System.Object GetAuto(IndexReader reader, System.String field)
-		{
-			return autoCache.Get(reader, field);
-		}
-		
-		new internal Cache autoCache;
-		static ExtendedFieldCacheImpl()
-		{
-			LONG_PARSER = new AnonymousClassLongParser();
-			DOUBLE_PARSER = new AnonymousClassDoubleParser();
-		}
-	}
-}
+                    else
+                    {
+                        throw new System.SystemException("field \"" + field + "\" does not appear to be indexed");
+                    }
+                    return ret;
+                }
+                finally
+                {
+                    enumerator.Close();
+                }
+            }
+        }
+        private void InitBlock()
+        {
+            longsCache = new AnonymousClassCache(this);
+            doublesCache = new AnonymousClassCache1(this);
+            autoCache = new AnonymousClassCache2(this);
+        }
+        private static readonly LongParser LONG_PARSER;
+
+        private static readonly DoubleParser DOUBLE_PARSER;
+
+
+        public virtual long[] GetLongs(IndexReader reader, System.String field)
+        {
+            return GetLongs(reader, field, LONG_PARSER);
+        }
+
+        // inherit javadocs
+        public virtual long[] GetLongs(IndexReader reader, System.String field, LongParser parser)
+        {
+            return (long[])longsCache.Get(reader, new Entry(field, parser));
+        }
+
+        internal Cache longsCache;
+
+        // inherit javadocs
+        public virtual double[] GetDoubles(IndexReader reader, System.String field)
+        {
+            return GetDoubles(reader, field, DOUBLE_PARSER);
+        }
+
+        // inherit javadocs
+        public virtual double[] GetDoubles(IndexReader reader, System.String field, DoubleParser parser)
+        {
+            return (double[])doublesCache.Get(reader, new Entry(field, parser));
+        }
+
+        internal Cache doublesCache;
+
+
+        // inherit javadocs
+        public override object GetAuto(IndexReader reader, System.String field)
+        {
+            return autoCache.Get(reader, field);
+        }
+
+        new internal Cache autoCache;
+        static ExtendedFieldCacheImpl()
+        {
+            LONG_PARSER = new AnonymousClassLongParser();
+            DOUBLE_PARSER = new AnonymousClassDoubleParser();
+        }
+    }
+}
\ No newline at end of file

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCache.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FieldCache.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCache.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCache.cs Wed Jul 29 18:04:12 2009
@@ -23,31 +23,23 @@
 {
 	
 	/// <summary> Expert: Maintains caches of term values.
-	/// 
-	/// <p>Created: May 19, 2004 11:13:14 AM
-	/// 
 	/// </summary>
-	/// <author>   Tim Jones (Nacimiento Software)
-	/// </author>
-	/// <since>   lucene 1.4
-	/// </since>
-	/// <version>  $Id: FieldCache.java 544546 2007-06-05 16:29:35Z doronc $
-	/// </version>
+	/// <since>lucene 1.4</since>
+	/// <version>$Id:$</version>
 	/// <summary>Expert: Stores term text values and document ordering data. </summary>
 	public class StringIndex
 	{
-		
 		/// <summary>All the term values, in natural order. </summary>
-		public System.String[] Lookup;
+		public System.String[] lookup;
 		
 		/// <summary>For each document, an index into the lookup array. </summary>
-		public int[] Order;
+		public int[] order;
 		
 		/// <summary>Creates one of these objects </summary>
 		public StringIndex(int[] values, System.String[] lookup)
 		{
-			this.Order = values;
-			this.Lookup = lookup;
+			this.order = values;
+			this.lookup = lookup;
 		}
 	}
 	public struct FieldCache_Fields{
@@ -227,7 +219,7 @@
 		/// <returns> int[], float[] or StringIndex.
 		/// </returns>
 		/// <throws>  IOException  If any error occurs. </throws>
-		System.Object GetAuto(IndexReader reader, System.String field);
+		object GetAuto(IndexReader reader, System.String field);
 		
 		/// <summary>Checks the internal cache for an appropriate entry, and if none
 		/// is found reads the terms out of <code>field</code> and calls the given SortComparator

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCacheImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FieldCacheImpl.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCacheImpl.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCacheImpl.cs Wed Jul 29 18:04:12 2009
@@ -25,20 +25,18 @@
 namespace Lucene.Net.Search
 {
 	
-	/// <summary> Expert: The default cache implementation, storing all values in memory.
+	/// <summary>
+    /// Expert: The default cache implementation, storing all values in memory.
 	/// A WeakHashMap is used for storage.
-	/// 
-	/// <p>Created: May 19, 2004 4:40:36 PM
-	/// 
 	/// </summary>
-	/// <author>   Tim Jones (Nacimiento Software)
-	/// </author>
-	/// <since>   lucene 1.4
-	/// </since>
-	/// <version>  $Id: FieldCacheImpl.java 605225 2007-12-18 15:13:05Z gsingers $
-	/// </version>
+	/// <since>lucene 1.4</since>
+	/// <version>$Id:$</version>
 	public class FieldCacheImpl : FieldCache
 	{
+        public virtual void Close(IndexReader reader)
+        {
+        }
+
 		public FieldCacheImpl()
 		{
 			InitBlock();
@@ -92,20 +90,20 @@
 				
 			}
 			
-			protected internal override System.Object CreateValue(IndexReader reader, System.Object entryKey)
+			protected internal override object CreateValue(IndexReader reader, object entryKey)
 			{
 				Entry entry = (Entry) entryKey;
 				System.String field = entry.field;
 				ByteParser parser = (ByteParser) entry.custom;
 				byte[] retArray = new byte[reader.MaxDoc()];
 				TermDocs termDocs = reader.TermDocs();
-				TermEnum termEnum = reader.Terms(new Term(field, ""));
+				TermEnum termEnum = reader.Terms(new Term(field));
 				try
 				{
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (object) term.Field() != (object) field)
 							break;
 						byte termval = parser.ParseByte(term.Text());
 						termDocs.Seek(termEnum);
@@ -145,20 +143,20 @@
 				
 			}
 			
-			protected internal override System.Object CreateValue(IndexReader reader, System.Object entryKey)
+			protected internal override object CreateValue(IndexReader reader, object entryKey)
 			{
 				Entry entry = (Entry) entryKey;
 				System.String field = entry.field;
 				ShortParser parser = (ShortParser) entry.custom;
 				short[] retArray = new short[reader.MaxDoc()];
 				TermDocs termDocs = reader.TermDocs();
-				TermEnum termEnum = reader.Terms(new Term(field, ""));
+				TermEnum termEnum = reader.Terms(new Term(field));
 				try
 				{
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (object) term.Field() != (object) field)
 							break;
 						short termval = parser.ParseShort(term.Text());
 						termDocs.Seek(termEnum);
@@ -198,20 +196,20 @@
 				
 			}
 			
-			protected internal override System.Object CreateValue(IndexReader reader, System.Object entryKey)
+			protected internal override object CreateValue(IndexReader reader, object entryKey)
 			{
 				Entry entry = (Entry) entryKey;
 				System.String field = entry.field;
 				IntParser parser = (IntParser) entry.custom;
 				int[] retArray = new int[reader.MaxDoc()];
 				TermDocs termDocs = reader.TermDocs();
-				TermEnum termEnum = reader.Terms(new Term(field, ""));
+				TermEnum termEnum = reader.Terms(new Term(field));
 				try
 				{
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (object) term.Field() != (object) field)
 							break;
 						int termval = parser.ParseInt(term.Text());
 						termDocs.Seek(termEnum);
@@ -251,20 +249,20 @@
 				
 			}
 			
-			protected internal override System.Object CreateValue(IndexReader reader, System.Object entryKey)
+			protected internal override object CreateValue(IndexReader reader, object entryKey)
 			{
 				Entry entry = (Entry) entryKey;
 				System.String field = entry.field;
 				FloatParser parser = (FloatParser) entry.custom;
 				float[] retArray = new float[reader.MaxDoc()];
 				TermDocs termDocs = reader.TermDocs();
-				TermEnum termEnum = reader.Terms(new Term(field, ""));
+				TermEnum termEnum = reader.Terms(new Term(field));
 				try
 				{
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (object) term.Field() != (object) field)
 							break;
 						float termval = parser.ParseFloat(term.Text());
 						termDocs.Seek(termEnum);
@@ -304,18 +302,18 @@
 				
 			}
 			
-			protected internal override System.Object CreateValue(IndexReader reader, System.Object fieldKey)
+			protected internal override object CreateValue(IndexReader reader, object fieldKey)
 			{
 				System.String field = String.Intern(((System.String) fieldKey));
 				System.String[] retArray = new System.String[reader.MaxDoc()];
 				TermDocs termDocs = reader.TermDocs();
-				TermEnum termEnum = reader.Terms(new Term(field, ""));
+				TermEnum termEnum = reader.Terms(new Term(field));
 				try
 				{
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (object) term.Field() != (object) field)
 							break;
 						System.String termval = term.Text();
 						termDocs.Seek(termEnum);
@@ -355,13 +353,13 @@
 				
 			}
 			
-			protected internal override System.Object CreateValue(IndexReader reader, System.Object fieldKey)
+			protected internal override object CreateValue(IndexReader reader, object fieldKey)
 			{
 				System.String field = String.Intern(((System.String) fieldKey));
 				int[] retArray = new int[reader.MaxDoc()];
 				System.String[] mterms = new System.String[reader.MaxDoc() + 1];
 				TermDocs termDocs = reader.TermDocs();
-				TermEnum termEnum = reader.Terms(new Term(field, ""));
+				TermEnum termEnum = reader.Terms(new Term(field));
 				int t = 0; // current term number
 				
 				// an entry for documents that have no terms in this field
@@ -375,7 +373,7 @@
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (object) term.Field() != (object) field)
 							break;
 						
 						// store term text
@@ -440,10 +438,10 @@
 				
 			}
 			
-			protected internal override System.Object CreateValue(IndexReader reader, System.Object fieldKey)
+			protected internal override object CreateValue(IndexReader reader, object fieldKey)
 			{
 				System.String field = String.Intern(((System.String) fieldKey));
-				TermEnum enumerator = reader.Terms(new Term(field, ""));
+				TermEnum enumerator = reader.Terms(new Term(field));
 				try
 				{
 					Term term = enumerator.Term();
@@ -451,8 +449,8 @@
 					{
 						throw new System.SystemException("no terms in field " + field + " - cannot determine sort type");
 					}
-					System.Object ret = null;
-					if ((System.Object) term.Field() == (System.Object) field)
+					object ret = null;
+					if ((object) term.Field() == (object) field)
 					{
 						System.String termtext = term.Text().Trim();
 						
@@ -472,14 +470,14 @@
 							System.Int32.Parse(termtext);
 							ret = Enclosing_Instance.GetInts(reader, field);
 						}
-						catch (System.FormatException nfe1)
+						catch (System.FormatException)
 						{
 							try
 							{
 								SupportClass.Single.Parse(termtext);
 								ret = Enclosing_Instance.GetFloats(reader, field);
 							}
-							catch (System.FormatException nfe3)
+							catch (System.FormatException)
 							{
 								ret = Enclosing_Instance.GetStringIndex(reader, field);
 							}
@@ -518,20 +516,20 @@
 				
 			}
 			
-			protected internal override System.Object CreateValue(IndexReader reader, System.Object entryKey)
+			protected internal override object CreateValue(IndexReader reader, object entryKey)
 			{
 				Entry entry = (Entry) entryKey;
 				System.String field = entry.field;
 				SortComparator comparator = (SortComparator) entry.custom;
 				System.IComparable[] retArray = new System.IComparable[reader.MaxDoc()];
 				TermDocs termDocs = reader.TermDocs();
-				TermEnum termEnum = reader.Terms(new Term(field, ""));
+				TermEnum termEnum = reader.Terms(new Term(field));
 				try
 				{
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (object) term.Field() != (object) field)
 							break;
 						System.IComparable termval = comparator.GetComparable(term.Text());
 						termDocs.Seek(termEnum);
@@ -565,14 +563,14 @@
 		/// <summary>Expert: Internal cache. </summary>
 		internal abstract class Cache
 		{
-			private System.Collections.IDictionary readerCache = new SupportClass.WeakHashTable();
+			private System.Collections.IDictionary readerCache = new System.Collections.Hashtable();
 			
-			protected internal abstract System.Object CreateValue(IndexReader reader, System.Object key);
+			protected internal abstract object CreateValue(IndexReader reader, object key);
 			
-			public virtual System.Object Get(IndexReader reader, System.Object key)
+			public virtual object Get(IndexReader reader, object key)
 			{
 				System.Collections.IDictionary innerCache;
-				System.Object value_Renamed;
+				object value_Renamed;
 				lock (readerCache.SyncRoot)
 				{
 					innerCache = (System.Collections.IDictionary) readerCache[reader];
@@ -614,7 +612,7 @@
 		
 		internal sealed class CreationPlaceholder
 		{
-			internal System.Object value_Renamed;
+			internal object value_Renamed;
 		}
 		
 		/// <summary>Expert: Every composite-key in the internal cache is of this type. </summary>
@@ -622,7 +620,7 @@
 		{
 			internal System.String field; // which Fieldable
 			internal int type; // which SortField type
-			internal System.Object custom; // which custom comparator
+			internal object custom; // which custom comparator
 			internal System.Globalization.CultureInfo locale; // the locale we're sorting (if string)
 			
 			/// <summary>Creates one of these objects. </summary>
@@ -635,7 +633,7 @@
 			}
 			
 			/// <summary>Creates one of these objects for a custom comparator. </summary>
-			internal Entry(System.String field, System.Object custom)
+			internal Entry(System.String field, object custom)
 			{
 				this.field = String.Intern(field);
 				this.type = SortField.CUSTOM;
@@ -644,12 +642,12 @@
 			}
 			
 			/// <summary>Two of these are equal iff they reference the same field and type. </summary>
-			public  override bool Equals(System.Object o)
+			public  override bool Equals(object o)
 			{
 				if (o is Entry)
 				{
 					Entry other = (Entry) o;
-					if ((System.Object) other.field == (System.Object) field && other.type == type)
+					if ((object) other.field == (object) field && other.type == type)
 					{
 						if (other.locale == null ? locale == null : other.locale.Equals(locale))
 						{
@@ -765,11 +763,11 @@
 		
 		/// <summary>The pattern used to detect float values in a field </summary>
 		/// <summary> removed for java 1.3 compatibility
-		/// protected static final Object pFloats = Pattern.compile ("[0-9+\\-\\.eEfFdD]+");
+		/// protected static final object pFloats = Pattern.compile ("[0-9+\\-\\.eEfFdD]+");
 		/// </summary>
 		
 		// inherit javadocs
-		public virtual System.Object GetAuto(IndexReader reader, System.String field)
+		public virtual object GetAuto(IndexReader reader, System.String field)
 		{
 			return autoCache.Get(reader, field);
 		}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldDoc.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FieldDoc.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldDoc.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldDoc.cs Wed Jul 29 18:04:12 2009
@@ -19,8 +19,6 @@
 
 namespace Lucene.Net.Search
 {
-	
-	
 	/// <summary> Expert: A ScoreDoc which also contains information about
 	/// how to sort the referenced document.  In addition to the
 	/// document number and score, this object contains an array
@@ -32,27 +30,18 @@
 	/// The class of each element in the array will be either
 	/// Integer, Float or String depending on the type of values
 	/// in the terms of each field.
-	/// 
-	/// <p>Created: Feb 11, 2004 1:23:38 PM
-	/// 
 	/// </summary>
-	/// <author>   Tim Jones (Nacimiento Software)
-	/// </author>
-	/// <since>   lucene 1.4
-	/// </since>
-	/// <version>  $Id: FieldDoc.java 472959 2006-11-09 16:21:50Z yonik $
-	/// </version>
-	/// <seealso cref="ScoreDoc">
-	/// </seealso>
-	/// <seealso cref="TopFieldDocs">
-	/// </seealso>
+	/// <since>lucene 1.4</since>
+	/// <version>$Id:$</version>
+	/// <seealso cref="ScoreDoc"/>
+	/// <seealso cref="TopFieldDocs"/>
     [Serializable]
     public class FieldDoc : ScoreDoc
     {
 		
         /// <summary>Expert: The values which are used to sort the referenced document.
         /// The order of these will match the original sort criteria given by a
-        /// Sort object.  Each Object will be either an Integer, Float or String,
+        /// Sort object.  Each object will be either an Integer, Float or String,
         /// depending on the type of values in the terms of the original field.
         /// </summary>
         /// <seealso cref="Sort">

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldDocSortedHitQueue.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FieldDocSortedHitQueue.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldDocSortedHitQueue.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldDocSortedHitQueue.cs Wed Jul 29 18:04:12 2009
@@ -24,12 +24,7 @@
 	
 	/// <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>
-	/// <author>   Tim Jones (Nacimiento Software)
-	/// </author>
 	/// <since>   lucene 1.4
 	/// </since>
     /// <version>  $Id: FieldDocSortedHitQueue.java 590530 2007-10-31 01:28:25Z gsingers $
@@ -116,7 +111,7 @@
 		/// </param>
 		/// <returns> <code>true</code> if document <code>a</code> should be sorted after document <code>b</code>.
 		/// </returns>
-		public override bool LessThan(System.Object a, System.Object b)
+		public override bool LessThan(object a, object b)
 		{
 			FieldDoc docA = (FieldDoc) a;
 			FieldDoc docB = (FieldDoc) b;
@@ -200,8 +195,27 @@
 								c = 1;
 							break;
 						}
-					
-					case SortField.CUSTOM:  {
+
+                    case SortField.BYTE:
+                        {
+                            int i1 = (int)docA.fields[i]; //((Byte)docA.fields[i]).byteValue();
+                            int i2 = (int)docB.fields[i]; //((Byte)docB.fields[i]).byteValue();
+                            if (i1 < i2) c = -1;
+                            if (i1 > i2) c = 1;
+                            break;
+                        }
+
+                    case SortField.SHORT:
+                        {
+                            int i1 = (int)docA.fields[i]; //((Short)docA.fields[i]).shortValue();
+                            int i2 = (int)docB.fields[i]; //((Short)docB.fields[i]).shortValue();
+                            if (i1 < i2) c = -1;
+                            if (i1 > i2) c = 1;
+                            break;
+                        }
+
+                    case SortField.CUSTOM:
+                        {
 							c = docA.fields[i].CompareTo(docB.fields[i]);
 							break;
 						}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldSortedHitQueue.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FieldSortedHitQueue.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldSortedHitQueue.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldSortedHitQueue.cs Wed Jul 29 18:04:12 2009
@@ -25,12 +25,7 @@
 	
 	/// <summary> Expert: A hit queue for sorting by hits by terms in more than one field.
 	/// Uses <code>FieldCache.DEFAULT</code> for maintaining internal term lookup tables.
-	/// 
-	/// <p>Created: Dec 8, 2003 12:56:03 PM
-	/// 
 	/// </summary>
-	/// <author>   Tim Jones (Nacimiento Software)
-	/// </author>
 	/// <since>   lucene 1.4
 	/// </since>
 	/// <version>  $Id: FieldSortedHitQueue.java 605225 2007-12-18 15:13:05Z gsingers $
@@ -44,7 +39,7 @@
 		internal class AnonymousClassCache : FieldCacheImpl.Cache
 		{
 			
-			protected internal override System.Object CreateValue(IndexReader reader, System.Object entryKey)
+			protected internal override object CreateValue(IndexReader reader, object entryKey)
 			{
 				FieldCacheImpl.Entry entry = (FieldCacheImpl.Entry) entryKey;
 				System.String fieldname = entry.field;
@@ -74,8 +69,16 @@
 					case SortField.DOUBLE: 
 						comparator = Lucene.Net.Search.FieldSortedHitQueue.ComparatorDouble(reader, fieldname);
 						break;
-					
-					case SortField.STRING: 
+
+                    case SortField.SHORT:
+                        comparator = Lucene.Net.Search.FieldSortedHitQueue.ComparatorShort(reader, fieldname);
+                        break;
+
+                    case SortField.BYTE:
+                        comparator = Lucene.Net.Search.FieldSortedHitQueue.ComparatorByte(reader, fieldname);
+                        break;
+
+                    case SortField.STRING: 
 						if (locale != null)
 							comparator = Lucene.Net.Search.FieldSortedHitQueue.ComparatorStringLocale(reader, fieldname, locale);
 						else
@@ -239,8 +242,8 @@
 			
 			public int Compare(ScoreDoc i, ScoreDoc j)
 			{
-				int fi = index.Order[i.doc];
-				int fj = index.Order[j.doc];
+				int fi = index.order[i.doc];
+				int fj = index.order[j.doc];
 				if (fi < fj)
 					return - 1;
 				if (fi > fj)
@@ -250,7 +253,7 @@
 			
 			public virtual System.IComparable SortValue(ScoreDoc i)
 			{
-				return index.Lookup[index.Order[i.doc]];
+				return index.lookup[index.order[i.doc]];
 			}
 			
 			public virtual int SortType()
@@ -276,7 +279,7 @@
 			{
 				System.String is_Renamed = index[i.doc];
 				System.String js = index[j.doc];
-				if ((System.Object) is_Renamed == (System.Object) js)
+				if ((object) is_Renamed == (object) js)
 				{
 					return 0;
 				}
@@ -304,8 +307,68 @@
 				return SortField.STRING;
 			}
 		}
-		
-		/// <summary> Creates a hit queue sorted by the given list of fields.</summary>
+
+        private class ByteScoreDocComparator : ScoreDocComparator
+        {
+            public ByteScoreDocComparator(byte[] fieldOrder)
+            {
+                this.fieldOrder = fieldOrder;
+            }
+            private byte[] fieldOrder;
+
+            public int Compare(ScoreDoc i, ScoreDoc j)
+            {
+                byte bi = fieldOrder[i.doc];
+                byte bj = fieldOrder[j.doc];
+                if (bi < bj)
+                    return -1;
+                if (bi > bj)
+                    return 1;
+                return 0;
+            }
+
+            public virtual System.IComparable SortValue(ScoreDoc i)
+            {
+                return fieldOrder[i.doc];
+            }
+
+            public virtual int SortType()
+            {
+                return SortField.BYTE;
+            }
+        }
+
+        private class ShortScoreDocComparator : ScoreDocComparator
+        {
+            public ShortScoreDocComparator(short[] fieldOrder)
+            {
+                this.fieldOrder = fieldOrder;
+            }
+            private short[] fieldOrder;
+
+            public int Compare(ScoreDoc i, ScoreDoc j)
+            {
+                short si = fieldOrder[i.doc];
+                short sj = fieldOrder[j.doc];
+                if (si < sj)
+                    return -1;
+                if (si > sj)
+                    return 1;
+                return 0;
+            }
+
+            public virtual System.IComparable SortValue(ScoreDoc i)
+            {
+                return fieldOrder[i.doc];
+            }
+
+            public virtual int SortType()
+            {
+                return SortField.SHORT;
+            }
+        }
+
+        /// <summary> Creates a hit queue sorted by the given list of fields.</summary>
 		/// <param name="reader"> Index to use.
 		/// </param>
 		/// <param name="fields">Fieldable names, in priority order (highest priority first).  Cannot be <code>null</code> or empty.
@@ -369,7 +432,7 @@
 		// This overrides PriorityQueue.insert() so that insert(FieldDoc) that
 		// keeps track of the score isn't accidentally bypassed.  
 		// inherit javadoc
-		public override bool Insert(System.Object fdoc)
+		public override bool Insert(object fdoc)
 		{
 			return Insert((FieldDoc) fdoc);
 		}
@@ -377,7 +440,7 @@
 		// This overrides PriorityQueue.insertWithOverflow() so that
 		// updateMaxScore(FieldDoc) that keeps track of the score isn't accidentally
 		// bypassed.
-		public override System.Object InsertWithOverflow(System.Object element)
+		public override object InsertWithOverflow(object element)
 		{
 			UpdateMaxScore((FieldDoc) element);
 			return base.InsertWithOverflow(element);
@@ -390,7 +453,7 @@
 		/// </param>
 		/// <returns> <code>true</code> if document <code>a</code> should be sorted after document <code>b</code>.
 		/// </returns>
-		public override bool LessThan(System.Object a, System.Object b)
+		public override bool LessThan(object a, object b)
 		{
 			ScoreDoc docA = (ScoreDoc) a;
 			ScoreDoc docB = (ScoreDoc) b;
@@ -514,8 +577,32 @@
 			double[] fieldOrder = Lucene.Net.Search.ExtendedFieldCache_Fields.EXT_DEFAULT.GetDoubles(reader, field);
 			return new AnonymousClassScoreDocComparator3(fieldOrder);
 		}
-		
-		/// <summary> Returns a comparator for sorting hits according to a field containing strings.</summary>
+
+        /// <summary> Returns a comparator for sorting hits according to a field containing shorts.</summary>
+        /// <param name="reader"> Index to use.</param>
+        /// <param name="fieldname"> Fieldable containg short values.</param>
+        /// <returns>  Comparator for sorting hits.</returns>
+        /// <throws>  IOException If an error occurs reading the index. </throws>
+        internal static ScoreDocComparator ComparatorShort(IndexReader reader, System.String fieldname)
+        {
+            System.String field = String.Intern(fieldname);
+            short[] fieldOrder = Lucene.Net.Search.ExtendedFieldCache_Fields.EXT_DEFAULT.GetShorts(reader, field);
+            return new ShortScoreDocComparator(fieldOrder);
+        }
+
+        /// <summary> Returns a comparator for sorting hits according to a field containing bytes.</summary>
+        /// <param name="reader"> Index to use.</param>
+        /// <param name="fieldname"> Fieldable containg byte values.</param>
+        /// <returns>  Comparator for sorting hits.</returns>
+        /// <throws>  IOException If an error occurs reading the index. </throws>
+        internal static ScoreDocComparator ComparatorByte(IndexReader reader, System.String fieldname)
+        {
+            System.String field = String.Intern(fieldname);
+            byte[] fieldOrder = Lucene.Net.Search.ExtendedFieldCache_Fields.EXT_DEFAULT.GetBytes(reader, field);
+            return new ByteScoreDocComparator(fieldOrder);
+        }
+
+        /// <summary> Returns a comparator for sorting hits according to a field containing strings.</summary>
 		/// <param name="reader"> Index to use.
 		/// </param>
 		/// <param name="fieldname"> Fieldable containg string values.
@@ -561,7 +648,7 @@
 		internal static ScoreDocComparator ComparatorAuto(IndexReader reader, System.String fieldname)
 		{
 			System.String field = String.Intern(fieldname);
-			System.Object lookupArray = Lucene.Net.Search.ExtendedFieldCache_Fields.EXT_DEFAULT.GetAuto(reader, field);
+			object lookupArray = Lucene.Net.Search.ExtendedFieldCache_Fields.EXT_DEFAULT.GetAuto(reader, field);
 			if (lookupArray is Lucene.Net.Search.StringIndex)
 			{
 				return ComparatorString(reader, field);

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Filter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Filter.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Filter.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Filter.cs Wed Jul 29 18:04:12 2009
@@ -18,19 +18,40 @@
 using System;
 
 using IndexReader = Lucene.Net.Index.IndexReader;
+using DocIdBitSet = Lucene.Net.Util.DocIdBitSet;
 
 namespace Lucene.Net.Search
 {
 	
-	/// <summary>Abstract base class providing a mechanism to restrict searches to a subset
-	/// of an index. 
+	/// <summary>
+    /// Abstract base class providing a mechanism to limit index search results
+    /// to a subset of an index.
+	/// <para>
+    /// Note: In Lucene 3.0, Bits(IndexReader) will be removed and GetDocIdSet(IndexReader)
+    /// will be made abstract.  All implementin classes must therefore implement
+    /// GetDocIdSet(IndexReader) in order to work with Lucene 3.0.
+    /// </para>
 	/// </summary>
 	[Serializable]
 	public abstract class Filter
 	{
-		/// <summary>Returns a BitSet with true for documents which should be permitted in
+		/// <summary>
+        /// Returns a BitSet with true for documents which should be permitted in
 		/// search results, and false for those that should not. 
 		/// </summary>
-		public abstract System.Collections.BitArray Bits(IndexReader reader);
+		[System.Obsolete("Use GetDocIdSet(IndexReader) instead.")]
+        public abstract System.Collections.BitArray Bits(IndexReader reader);
+
+        /// <summary>
+        /// Return a DocIdSet that provides the documents which are permitted
+        /// or prohibited in search results.
+        /// </summary>
+        /// <param name="reader"></param>
+        /// <returns></returns>
+        /// <see cref="DocIdBitSet"/>
+        public virtual DocIdSet GetDocIdSet(IndexReader reader)
+        {
+            return new DocIdBitSet(Bits(reader));
+        }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FilterManager.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FilterManager.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FilterManager.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FilterManager.cs Wed Jul 29 18:04:12 2009
@@ -31,8 +31,6 @@
 	/// The cache is periodically cleaned up from a separate thread to ensure the
 	/// cache doesn't exceed the maximum size.
 	/// </summary>
-	/// <author>  Matt Ericson
-	/// </author>
 	public class FilterManager
 	{
 		
@@ -165,7 +163,7 @@
 		/// </summary>
 		protected internal class FilterCleaner : IThreadRunnable
 		{
-			private class AnonymousClassComparator : System.Collections.Generic.IComparer<Object>
+			private class AnonymousClassComparator : System.Collections.Generic.IComparer<object>
 			{
 				public AnonymousClassComparator(FilterCleaner enclosingInstance)
 				{
@@ -184,7 +182,7 @@
 					}
 					
 				}
-				public virtual int Compare(System.Object a, System.Object b)
+				public virtual int Compare(object a, object b)
 				{
 					if (a is System.Collections.DictionaryEntry && b is System.Collections.DictionaryEntry)
 					{
@@ -204,7 +202,7 @@
 					}
 					else
 					{
-						throw new System.InvalidCastException("Objects are not Map.Entry");
+						throw new System.InvalidCastException("objects are not Map.Entry");
 					}
 				}
 			}
@@ -223,12 +221,12 @@
 			}
 			
 			private bool running = true;
-			System.Collections.Generic.SortedDictionary<Object, Object> sortedFilterItems;
+			System.Collections.Generic.SortedDictionary<object, object> sortedFilterItems;
 			
 			public FilterCleaner(FilterManager enclosingInstance)
 			{
 				InitBlock(enclosingInstance);
-				sortedFilterItems = new System.Collections.Generic.SortedDictionary<Object, Object>(new AnonymousClassComparator(this));
+				sortedFilterItems = new System.Collections.Generic.SortedDictionary<object, object>(new AnonymousClassComparator(this));
 			}
 			
 			public virtual void  Run()
@@ -267,7 +265,7 @@
 					{
 						System.Threading.Thread.Sleep(new System.TimeSpan((System.Int64) 10000 * Enclosing_Instance.cleanSleepTime));
 					}
-					catch (System.Threading.ThreadInterruptedException e)
+					catch (System.Threading.ThreadInterruptedException)
 					{
 						// just keep going
 					}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FilteredQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FilteredQuery.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FilteredQuery.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FilteredQuery.cs Wed Jul 29 18:04:12 2009
@@ -24,189 +24,25 @@
 {
 	
 	
-	/// <summary> A query that applies a filter to the results of another query.
-	/// 
-	/// <p>Note: the bits are retrieved from the filter each time this
+	/// <summary>
+    /// A query that applies a filter to the results of another query.
+	/// <para>
+    /// Note: the bits are retrieved from the filter each time this
 	/// query is used in a search - use a CachingWrapperFilter to avoid
 	/// regenerating the bits every time.
-	/// 
-	/// <p>Created: Apr 20, 2004 8:58:29 AM
-	/// 
+	/// </para>
 	/// </summary>
-	/// <author>   Tim Jones
-	/// </author>
-	/// <since>   1.4
-	/// </since>
-    /// <version>  $Id: FilteredQuery.java 544254 2007-06-04 20:41:06Z doronc $
-    /// </version>
-	/// <seealso cref="CachingWrapperFilter">
-	/// </seealso>
+	/// <since>1.4</since>
+    /// <version>$Id:$</version>
+	/// <seealso cref="CachingWrapperFilter"/>
 	[Serializable]
 	public class FilteredQuery : Query
-	{
-		[Serializable]
-		private class AnonymousClassWeight : Weight
-		{
-			public AnonymousClassWeight(Lucene.Net.Search.Weight weight, Lucene.Net.Search.Similarity similarity, FilteredQuery enclosingInstance)
-			{
-				InitBlock(weight, similarity, enclosingInstance);
-			}
-			private class AnonymousClassScorer : Scorer
-			{
-				private void  InitBlock(System.Collections.BitArray bitset, Lucene.Net.Search.Scorer scorer, AnonymousClassWeight enclosingInstance)
-				{
-					this.bitset = bitset;
-					this.scorer = scorer;
-					this.enclosingInstance = enclosingInstance;
-				}
-				private System.Collections.BitArray bitset;
-				private Lucene.Net.Search.Scorer scorer;
-				private AnonymousClassWeight enclosingInstance;
-				public AnonymousClassWeight Enclosing_Instance
-				{
-					get
-					{
-						return enclosingInstance;
-					}
-					
-				}
-				internal AnonymousClassScorer(System.Collections.BitArray bitset, Lucene.Net.Search.Scorer scorer, AnonymousClassWeight enclosingInstance, Lucene.Net.Search.Similarity Param1):base(Param1)
-				{
-					InitBlock(bitset, scorer, enclosingInstance);
-				}
-				
-				public override bool Next()
-				{
-					do 
-					{
-						if (!scorer.Next())
-						{
-							return false;
-						}
-					}
-					while (!bitset.Get(scorer.Doc()));
-					/* When skipTo() is allowed on scorer it should be used here
-					* in combination with bitset.nextSetBit(...)
-					* See the while loop in skipTo() below.
-					*/
-					return true;
-				}
-				public override int Doc()
-				{
-					return scorer.Doc();
-				}
-				
-				public override bool SkipTo(int i)
-				{
-					if (!scorer.SkipTo(i))
-					{
-						return false;
-					}
-					while (!bitset.Get(scorer.Doc()))
-					{
-						int nextFiltered = SupportClass.Number.NextSetBit(bitset, scorer.Doc() + 1);
-						if (nextFiltered == - 1)
-						{
-							return false;
-						}
-						else if (!scorer.SkipTo(nextFiltered))
-						{
-							return false;
-						}
-					}
-					return true;
-				}
-				
-				public override float Score()
-				{
-					return Enclosing_Instance.Enclosing_Instance.GetBoost() * scorer.Score();
-				}
-				
-				// add an explanation about whether the document was filtered
-				public override Explanation Explain(int i)
-				{
-					Explanation exp = scorer.Explain(i);
-					exp.SetValue(Enclosing_Instance.Enclosing_Instance.GetBoost() * exp.GetValue());
-					
-					if (bitset.Get(i))
-						exp.SetDescription("allowed by filter: " + exp.GetDescription());
-					else
-						exp.SetDescription("removed by filter: " + exp.GetDescription());
-					return exp;
-				}
-			}
-			private void  InitBlock(Lucene.Net.Search.Weight weight, Lucene.Net.Search.Similarity similarity, FilteredQuery enclosingInstance)
-			{
-				this.weight = weight;
-				this.similarity = similarity;
-				this.enclosingInstance = enclosingInstance;
-			}
-			private Lucene.Net.Search.Weight weight;
-			private Lucene.Net.Search.Similarity similarity;
-			private FilteredQuery enclosingInstance;
-			public FilteredQuery Enclosing_Instance
-			{
-				get
-				{
-					return enclosingInstance;
-				}
-				
-			}
-			private float value_Renamed;
-			
-			// pass these methods through to enclosed query's weight
-			public virtual float GetValue()
-			{
-                return value_Renamed;
-            }
-			public virtual float SumOfSquaredWeights()
-			{
-				return weight.SumOfSquaredWeights() * Enclosing_Instance.GetBoost() * Enclosing_Instance.GetBoost();
-			}
-			public virtual void  Normalize(float v)
-			{
-				weight.Normalize(v);
-				value_Renamed = weight.GetValue() * Enclosing_Instance.GetBoost();
-			}
-			public virtual Explanation Explain(IndexReader ir, int i)
-			{
-				Explanation inner = weight.Explain(ir, i);
-				if (Enclosing_Instance.GetBoost() != 1)
-				{
-					Explanation preBoost = inner;
-					inner = new Explanation(inner.GetValue() * Enclosing_Instance.GetBoost(), "product of:");
-					inner.AddDetail(new Explanation(Enclosing_Instance.GetBoost(), "boost"));
-					inner.AddDetail(preBoost);
-				}
-				Filter f = Enclosing_Instance.filter;
-				System.Collections.BitArray matches = f.Bits(ir);
-				if (matches.Get(i))
-					return inner;
-				Explanation result = new Explanation(0.0f, "failure to match filter: " + f.ToString());
-				result.AddDetail(inner);
-				return result;
-			}
-			
-			// return this query
-			public virtual Query GetQuery()
-			{
-				return Enclosing_Instance;
-			}
-			
-			// return a filtering scorer
-			public virtual Scorer Scorer(IndexReader indexReader)
-			{
-				Scorer scorer = weight.Scorer(indexReader);
-				System.Collections.BitArray bitset = Enclosing_Instance.filter.Bits(indexReader);
-				return new AnonymousClassScorer(bitset, scorer, this, similarity);
-			}
-		}
-		
+	{		
 		internal Query query;
 		internal Filter filter;
 		
 		/// <summary> Constructs a new query which applies a filter to the results of the original query.
-		/// Filter.bits() will be called every time this query is used in a search.
+		/// Filter.GetDocIdSet() will be called every time this query is used in a search.
 		/// </summary>
 		/// <param name="query"> Query to be filtered, cannot be <code>null</code>.
 		/// </param>
@@ -229,8 +65,166 @@
 			Similarity similarity = query.GetSimilarity(searcher);
 			return new AnonymousClassWeight(weight, similarity, this);
 		}
-		
-		/// <summary>Rewrites the wrapped query. </summary>
+
+        [Serializable]
+        private class AnonymousClassWeight : Weight
+        {
+            private Lucene.Net.Search.Weight weight;
+            private Lucene.Net.Search.Similarity similarity;
+            private FilteredQuery enclosingInstance;
+            private float value_Renamed;
+
+            public FilteredQuery Enclosing_Instance
+            {
+                get
+                {
+                    return enclosingInstance;
+                }
+            }
+
+            public AnonymousClassWeight(Lucene.Net.Search.Weight weight, Lucene.Net.Search.Similarity similarity, FilteredQuery enclosingInstance)
+            {
+                this.weight = weight;
+                this.similarity = similarity;
+                this.enclosingInstance = enclosingInstance;
+            }
+
+            // pass these methods through to enclosed query's weight
+            public virtual float GetValue()
+            {
+                return value_Renamed;
+            }
+
+            public virtual float SumOfSquaredWeights()
+            {
+                return weight.SumOfSquaredWeights() * Enclosing_Instance.GetBoost() * Enclosing_Instance.GetBoost();
+            }
+            
+            public virtual void Normalize(float v)
+            {
+                weight.Normalize(v);
+                value_Renamed = weight.GetValue() * Enclosing_Instance.GetBoost();
+            }
+            
+            public virtual Explanation Explain(IndexReader ir, int i)
+            {
+                Explanation inner = weight.Explain(ir, i);
+                if (Enclosing_Instance.GetBoost() != 1)
+                {
+                    Explanation preBoost = inner;
+                    inner = new Explanation(inner.GetValue() * Enclosing_Instance.GetBoost(), "product of:");
+                    inner.AddDetail(new Explanation(Enclosing_Instance.GetBoost(), "boost"));
+                    inner.AddDetail(preBoost);
+                }
+                Filter f = Enclosing_Instance.filter;
+                DocIdSetIterator docIdSetIterator = f.GetDocIdSet(ir).Iterator();
+                if (docIdSetIterator.SkipTo(i) && docIdSetIterator.Doc() == i)
+                {
+                    return inner;
+                }
+                else
+                {
+                    Explanation result = new Explanation(0.0f, "failure to match filter: " + f.ToString());
+                    result.AddDetail(inner);
+                    return result;
+                }
+            }
+
+            // return this query
+            public virtual Query GetQuery()
+            {
+                return Enclosing_Instance;
+            }
+
+            // return a filtering scorer
+            public virtual Scorer Scorer(IndexReader indexReader)
+            {
+                Scorer scorer = weight.Scorer(indexReader);
+                DocIdSetIterator docIdSetIterator = Enclosing_Instance.filter.GetDocIdSet(indexReader).Iterator();
+                return new AnonymousClassScorer(docIdSetIterator, scorer, this, similarity);
+            }
+
+            private class AnonymousClassScorer : Scorer
+            {
+                private DocIdSetIterator docIdSetIterator;
+                private Lucene.Net.Search.Scorer scorer;
+                private AnonymousClassWeight enclosingInstance;
+
+                internal AnonymousClassScorer(DocIdSetIterator docIdSetIterator, Lucene.Net.Search.Scorer scorer, AnonymousClassWeight enclosingInstance, Lucene.Net.Search.Similarity similarity)
+                    : base(similarity)
+                {
+                    this.docIdSetIterator = docIdSetIterator;
+                    this.scorer = scorer;
+                    this.enclosingInstance = enclosingInstance;
+                }
+
+                public AnonymousClassWeight Enclosing_Instance
+                {
+                    get
+                    {
+                        return enclosingInstance;
+                    }
+                }
+
+                private bool AdvanceToCommon()
+                {
+                    while (scorer.Doc() != docIdSetIterator.Doc())
+                    {
+                        if (scorer.Doc() < docIdSetIterator.Doc())
+                        {
+                            if (!scorer.SkipTo(docIdSetIterator.Doc()))
+                            {
+                                return false;
+                            }
+                        }
+                        else if (!docIdSetIterator.SkipTo(scorer.Doc()))
+                        {
+                            return false;
+                        }
+                    }
+                    return true;
+                }
+
+                public override bool Next()
+                {
+                    return docIdSetIterator.Next() && scorer.Next() && AdvanceToCommon();
+                }
+
+                public override int Doc()
+                {
+                    return scorer.Doc();
+                }
+
+                public override bool SkipTo(int i)
+                {
+                    return docIdSetIterator.SkipTo(i) && scorer.SkipTo(docIdSetIterator.Doc()) && AdvanceToCommon();
+                }
+
+                public override float Score()
+                {
+                    return Enclosing_Instance.Enclosing_Instance.GetBoost() * scorer.Score();
+                }
+
+                // add an explanation about whether the document was filtered
+                public override Explanation Explain(int i)
+                {
+                    Explanation exp = scorer.Explain(i);
+                    if (docIdSetIterator.SkipTo(i) && docIdSetIterator.Doc() == i)
+                    {
+                        exp.SetDescription("allowed by filter: " + exp.GetDescription());
+                        exp.SetValue(Enclosing_Instance.Enclosing_Instance.GetBoost() * exp.GetValue());
+                    }
+                    else
+                    {
+                        exp.SetDescription("removed by filter: " + exp.GetDescription());
+                        exp.SetValue(0.0F);
+                    }
+                    return exp;
+                }
+            }
+        }
+        
+        /// <summary>Rewrites the wrapped query. </summary>
 		public override Query Rewrite(IndexReader reader)
 		{
 			Query rewritten = query.Rewrite(reader);
@@ -275,7 +269,7 @@
 		}
 		
 		/// <summary>Returns true iff <code>o</code> is equal to this. </summary>
-		public  override bool Equals(System.Object o)
+		public  override bool Equals(object o)
 		{
 			if (o is FilteredQuery)
 			{
@@ -291,7 +285,7 @@
 			return query.GetHashCode() ^ filter.GetHashCode() + System.Convert.ToInt32(GetBoost());
 		}
 
-		override public System.Object Clone()
+		override public object Clone()
 		{
             // {{Aroush-2.0}} is this Clone() OK?
             FilteredQuery clone = (FilteredQuery) base.Clone();

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ByteFieldSource.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/ByteFieldSource.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ByteFieldSource.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ByteFieldSource.cs Wed Jul 29 18:04:12 2009
@@ -77,7 +77,7 @@
 				return Enclosing_Instance.Description() + '=' + IntVal(doc);
 			}
 			/*(non-Javadoc) @see Lucene.Net.Search.Function.DocValues#getInnerArray() */
-			public /*internal*/ override System.Object GetInnerArray()
+			public /*internal*/ override object GetInnerArray()
 			{
 				return arr;
 			}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/CustomScoreQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/CustomScoreQuery.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/CustomScoreQuery.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/CustomScoreQuery.cs Wed Jul 29 18:04:12 2009
@@ -33,8 +33,8 @@
 	/// <summary> Query that sets document score as a programmatic function of several (sub) scores.
 	/// <ol>
 	/// <li>the score of its subQuery (any query)</li>
-	/// <li>(optional) the score of its ValueSourtceQuery (or queries),
-	/// for most simple/convineient use case this query would be a 
+	/// <li>(optional) the score of its ValueSourtceQuery (or queries).
+	/// For most simple/convineient use case this query is likely to be a 
 	/// {@link Lucene.Net.Search.Function.FieldScoreQuery FieldScoreQuery}</li>
 	/// </ol>
 	/// Subclasses can modify the computation by overriding {@link #CustomScore(int, float, float)}.
@@ -109,7 +109,7 @@
 		}
 		
 		/*(non-Javadoc) @see Lucene.Net.Search.Query#clone() */
-		public override System.Object Clone()
+		public override object Clone()
 		{
 			CustomScoreQuery clone = (CustomScoreQuery) base.Clone();
 			clone.subQuery = (Query) subQuery.Clone();
@@ -136,7 +136,7 @@
 		}
 		
 		/// <summary>Returns true if <code>o</code> is equal to this. </summary>
-		public  override bool Equals(System.Object o)
+		public  override bool Equals(object o)
 		{
 			if (GetType() != o.GetType())
 			{
@@ -524,7 +524,7 @@
 		}
 		
 		/// <summary> Checks if this is strict custom scoring.
-		/// In strict custom scoring, the ValueSource part of does not participate in weight normalization.
+		/// 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.   

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/DocValues.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/DocValues.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/DocValues.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/DocValues.cs Wed Jul 29 18:04:12 2009
@@ -112,7 +112,7 @@
 		/// these test elements to be tested, Otherwise the test would not fail, just 
 		/// print a warning.
 		/// </summary>
-		public /*internal*/ virtual System.Object GetInnerArray()
+		public /*internal*/ virtual object GetInnerArray()
 		{
 			throw new System.NotSupportedException("this optional method is for test purposes only");
 		}
@@ -140,7 +140,7 @@
 				{
 					val = FloatVal(n);
 				}
-				catch (System.IndexOutOfRangeException e)
+				catch (System.IndexOutOfRangeException)
 				{
 					break;
 				}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/FieldCacheSource.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/FieldCacheSource.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/FieldCacheSource.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/FieldCacheSource.cs Wed Jul 29 18:04:12 2009
@@ -39,8 +39,6 @@
 	/// supported anymore in such a case.</font>
 	/// 
 	/// </summary>
-	/// <author>  yonik
-	/// </author>
 	[Serializable]
 	public abstract class FieldCacheSource : ValueSource
 	{
@@ -73,8 +71,8 @@
 		/// </seealso>
 		public abstract DocValues GetCachedFieldValues(FieldCache cache, System.String field, IndexReader reader);
 		
-		/*(non-Javadoc) @see java.lang.Object#equals(java.lang.Object) */
-		public  override bool Equals(System.Object o)
+		/*(non-Javadoc) @see java.lang.object#equals(java.lang.object) */
+		public  override bool Equals(object o)
 		{
 			if (!(o is FieldCacheSource))
 			{
@@ -84,21 +82,21 @@
 			return this.field.Equals(other.field) && CachedFieldSourceEquals(other);
 		}
 		
-		/*(non-Javadoc) @see java.lang.Object#hashCode() */
+		/*(non-Javadoc) @see java.lang.object#hashCode() */
 		public override int GetHashCode()
 		{
 			return field.GetHashCode() + CachedFieldSourceHashCode();
 		}
 		
 		/// <summary> Check if equals to another {@link FieldCacheSource}, already knowing that cache and field are equal.  </summary>
-		/// <seealso cref="Object.equals(java.lang.Object)">
+		/// <seealso cref="object.equals(java.lang.object)">
 		/// </seealso>
 		public abstract bool CachedFieldSourceEquals(FieldCacheSource other);
 		
 		/// <summary> Return a hash code of a {@link FieldCacheSource}, without the hash-codes of the field 
 		/// and the cache (those are taken care of elsewhere).  
 		/// </summary>
-		/// <seealso cref="Object.hashCode()">
+		/// <seealso cref="object.hashCode()">
 		/// </seealso>
 		public abstract int CachedFieldSourceHashCode();
 	}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/FieldScoreQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/FieldScoreQuery.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/FieldScoreQuery.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/FieldScoreQuery.cs Wed Jul 29 18:04:12 2009
@@ -52,7 +52,7 @@
 	/// 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 
-	/// payd for loading the field values into memory over and over again!
+	/// 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. 
@@ -94,7 +94,7 @@
 			{
 				this.typeName = name;
 			}
-			/*(non-Javadoc) @see java.lang.Object#toString() */
+			/*(non-Javadoc) @see java.lang.object#toString() */
 			public override System.String ToString()
 			{
 				return GetType().FullName + "::" + typeName;

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/FloatFieldSource.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/FloatFieldSource.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/FloatFieldSource.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/FloatFieldSource.cs Wed Jul 29 18:04:12 2009
@@ -38,8 +38,6 @@
 	/// on the field.
 	/// 
 	/// </seealso>
-	/// <author>  yonik
-	/// </author>
 	[Serializable]
 	public class FloatFieldSource : FieldCacheSource
 	{
@@ -75,7 +73,7 @@
 				return Enclosing_Instance.Description() + '=' + arr[doc];
 			}
 			/*(non-Javadoc) @see Lucene.Net.Search.Function.DocValues#getInnerArray() */
-			public /*internal*/ override System.Object GetInnerArray()
+			public /*internal*/ override object GetInnerArray()
 			{
 				return arr;
 			}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/IntFieldSource.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/IntFieldSource.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/IntFieldSource.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/IntFieldSource.cs Wed Jul 29 18:04:12 2009
@@ -79,7 +79,7 @@
 				return Enclosing_Instance.Description() + '=' + IntVal(doc);
 			}
 			/*(non-Javadoc) @see Lucene.Net.Search.Function.DocValues#getInnerArray() */
-			public /*internal*/ override System.Object GetInnerArray()
+			public /*internal*/ override object GetInnerArray()
 			{
 				return arr;
 			}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/OrdFieldSource.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/OrdFieldSource.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/OrdFieldSource.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/OrdFieldSource.cs Wed Jul 29 18:04:12 2009
@@ -44,8 +44,6 @@
 	/// supported anymore in such a case.</font>
 	/// 
 	/// </summary>
-	/// <author>  yonik
-	/// </author>
 	
 	[Serializable]
 	public class OrdFieldSource : ValueSource
@@ -88,7 +86,7 @@
 				return Enclosing_Instance.Description() + '=' + IntVal(doc);
 			}
 			/*(non-Javadoc) @see Lucene.Net.Search.Function.DocValues#getInnerArray() */
-			public /*internal*/ override System.Object GetInnerArray()
+			public /*internal*/ override object GetInnerArray()
 			{
 				return arr;
 			}
@@ -112,12 +110,12 @@
 		/*(non-Javadoc) @see 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;
+			int[] arr = Lucene.Net.Search.FieldCache_Fields.DEFAULT.GetStringIndex(reader, field).order;
 			return new AnonymousClassDocValues(arr, this);
 		}
 		
-		/*(non-Javadoc) @see java.lang.Object#equals(java.lang.Object) */
-		public  override bool Equals(System.Object o)
+		/*(non-Javadoc) @see java.lang.object#equals(java.lang.object) */
+		public  override bool Equals(object o)
 		{
 			if (o.GetType() != typeof(OrdFieldSource))
 				return false;
@@ -127,7 +125,7 @@
 		
 		private static readonly int hcode;
 		
-		/*(non-Javadoc) @see java.lang.Object#hashCode() */
+		/*(non-Javadoc) @see java.lang.object#hashCode() */
 		public override int GetHashCode()
 		{
 			return hcode + field.GetHashCode();

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ReverseOrdFieldSource.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/ReverseOrdFieldSource.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ReverseOrdFieldSource.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ReverseOrdFieldSource.cs Wed Jul 29 18:04:12 2009
@@ -45,9 +45,6 @@
 	/// supported anymore in such a case.</font>
 	/// 
 	/// </summary>
-	/// <author>  yonik
-	/// </author>
-	
 	[Serializable]
 	public class ReverseOrdFieldSource : ValueSource
 	{
@@ -96,7 +93,7 @@
 				return Enclosing_Instance.Description() + '=' + StrVal(doc);
 			}
 			/*(non-Javadoc) @see Lucene.Net.Search.Function.DocValues#getInnerArray() */
-			public /*internal*/ override System.Object GetInnerArray()
+			public /*internal*/ override object GetInnerArray()
 			{
 				return arr;
 			}
@@ -122,14 +119,14 @@
 		{
 			Lucene.Net.Search.StringIndex sindex = Lucene.Net.Search.FieldCache_Fields.DEFAULT.GetStringIndex(reader, field);
 			
-			int[] arr = sindex.Order;
-			int end = sindex.Lookup.Length;
+			int[] arr = sindex.order;
+			int end = sindex.lookup.Length;
 			
 			return new AnonymousClassDocValues(end, arr, this);
 		}
 		
-		/*(non-Javadoc) @see java.lang.Object#equals(java.lang.Object) */
-		public  override bool Equals(System.Object o)
+		/*(non-Javadoc) @see java.lang.object#equals(java.lang.object) */
+		public  override bool Equals(object o)
 		{
 			if (o.GetType() != typeof(ReverseOrdFieldSource))
 				return false;
@@ -139,7 +136,7 @@
 		
 		private static readonly int hcode;
 		
-		/*(non-Javadoc) @see java.lang.Object#hashCode() */
+		/*(non-Javadoc) @see java.lang.object#hashCode() */
 		public override int GetHashCode()
 		{
 			return hcode + field.GetHashCode();

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ShortFieldSource.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/ShortFieldSource.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ShortFieldSource.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ShortFieldSource.cs Wed Jul 29 18:04:12 2009
@@ -76,7 +76,7 @@
 				return Enclosing_Instance.Description() + '=' + IntVal(doc);
 			}
 			/*(non-Javadoc) @see Lucene.Net.Search.Function.DocValues#getInnerArray() */
-			public /*internal*/ override System.Object GetInnerArray()
+			public /*internal*/ override object GetInnerArray()
 			{
 				return arr;
 			}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ValueSource.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/ValueSource.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ValueSource.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ValueSource.cs Wed Jul 29 18:04:12 2009
@@ -49,19 +49,19 @@
 		/// <summary> description of field, used in explain() </summary>
 		public abstract System.String Description();
 		
-		/* (non-Javadoc) @see java.lang.Object#toString() */
+		/* (non-Javadoc) @see java.lang.object#toString() */
 		public override System.String ToString()
 		{
 			return Description();
 		}
 		
-		/// <summary> Needed for possible caching of query results - used by {@link ValueSourceQuery#equals(Object)}.</summary>
-		/// <seealso cref="Object.equals(Object)">
+		/// <summary> Needed for possible caching of query results - used by {@link ValueSourceQuery#equals(object)}.</summary>
+		/// <seealso cref="object.equals(object)">
 		/// </seealso>
-		abstract public  override bool Equals(System.Object o);
+		abstract public  override bool Equals(object o);
 		
 		/// <summary> Needed for possible caching of query results - used by {@link ValueSourceQuery#hashCode()}.</summary>
-		/// <seealso cref="Object.hashCode()">
+		/// <seealso cref="object.hashCode()">
 		/// </seealso>
 		abstract public override int GetHashCode();
 	}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ValueSourceQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/ValueSourceQuery.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ValueSourceQuery.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ValueSourceQuery.cs Wed Jul 29 18:04:12 2009
@@ -27,7 +27,7 @@
 	/// <summary> Expert: A Query that sets the scores of document to the
 	/// values obtained from a {@link Lucene.Net.Search.Function.ValueSource ValueSource}.
 	/// <p>   
-	/// The value source can be based on a (cached) value of an indexd  field, but it
+	/// 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).  
@@ -38,8 +38,6 @@
 	/// supported anymore in such a case.</font>
 	/// 
 	/// </summary>
-	/// <author>  yonik
-	/// </author>
 	[Serializable]
 	public class ValueSourceQuery : Query
 	{
@@ -240,7 +238,7 @@
 		}
 		
 		/// <summary>Returns true if <code>o</code> is equal to this. </summary>
-		public  override bool Equals(System.Object o)
+		public  override bool Equals(object o)
 		{
 			if (GetType() != o.GetType())
 			{
@@ -255,7 +253,7 @@
 		{
 			return (GetType().GetHashCode() + valSrc.GetHashCode()) ^ BitConverter.ToInt32(BitConverter.GetBytes(GetBoost()), 0);
 		}
-		override public System.Object Clone()
+		override public object Clone()
 		{
 			return this.MemberwiseClone();
 		}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FuzzyQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FuzzyQuery.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FuzzyQuery.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FuzzyQuery.cs Wed Jul 29 18:04:12 2009
@@ -196,9 +196,9 @@
 			}
 			
 			/* (non-Javadoc)
-			* @see Lucene.Net.Util.PriorityQueue#lessThan(java.lang.Object, java.lang.Object)
+			* @see Lucene.Net.Util.PriorityQueue#lessThan(java.lang.object, java.lang.object)
 			*/
-			public override bool LessThan(System.Object a, System.Object b)
+			public override bool LessThan(object a, object b)
 			{
 				ScoreTerm termA = (ScoreTerm) a;
 				ScoreTerm termB = (ScoreTerm) b;
@@ -209,7 +209,7 @@
 			}
 		}
 		
-		public  override bool Equals(System.Object o)
+		public  override bool Equals(object o)
 		{
 			if (this == o)
 				return true;

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Hit.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Hit.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Hit.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Hit.cs Wed Jul 29 18:04:12 2009
@@ -23,14 +23,12 @@
 namespace Lucene.Net.Search
 {
 	
-	/// <summary> Wrapper used by {@link HitIterator} to provide a lazily loaded hit
-	/// from {@link Hits}.
-	/// 
+	/// <summary>
+    /// Wrapper used by {@link HitIterator} to provide a lazily loaded hit from {@link Hits}.
 	/// </summary>
-	/// <author>  Jeremy Rayner
-	/// </author>
 	[Serializable]
-	public class Hit
+    [System.Obsolete("Hits will be removed indexer Lucene 3.0.  Use TopDocCollector and TopDocs instead.")]
+    public class Hit
 	{
 		
 		private Document doc = null;

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/HitIterator.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/HitIterator.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/HitIterator.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/HitIterator.cs Wed Jul 29 18:04:12 2009
@@ -20,13 +20,12 @@
 namespace Lucene.Net.Search
 {
 	
-	/// <summary> An iterator over {@link Hits} that provides lazy fetching of each document.
+	/// <summary>
+    /// An iterator over {@link Hits} that provides lazy fetching of each document.
 	/// {@link Hits#Iterator()} returns an instance of this class.  Calls to {@link #Next()}
 	/// return a {@link Hit} instance.
-	/// 
 	/// </summary>
-	/// <author>  Jeremy Rayner
-	/// </author>
+    [System.Obsolete("Hits will be removed in Lucene 3.0.  Use TopDocCollector and TopDocs instead.")]
 	public class HitIterator : System.Collections.IEnumerator
 	{
 		/// <summary> Returns a {@link Hit} instance representing the next hit in {@link Hits}.
@@ -34,14 +33,14 @@
 		/// </summary>
 		/// <returns> Next {@link Hit}.
 		/// </returns>
-		public virtual System.Object Current
+		public virtual object Current
 		{
 			get
 			{
 				if (hitNumber == hits.Length())
 					throw new System.ArgumentOutOfRangeException();
 				
-				System.Object next = new Hit(hits, hitNumber);
+				object next = new Hit(hits, hitNumber);
 				hitNumber++;
 				return next;
 			}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/HitQueue.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/HitQueue.cs?rev=798995&r1=798994&r2=798995&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/HitQueue.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/HitQueue.cs Wed Jul 29 18:04:12 2009
@@ -29,7 +29,7 @@
 			Initialize(size);
 		}
 		
-		public override bool LessThan(System.Object a, System.Object b)
+		public override bool LessThan(object a, object b)
 		{
 			ScoreDoc hitA = (ScoreDoc) a;
 			ScoreDoc hitB = (ScoreDoc) b;



Mime
View raw message