lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [09/48] lucenenet git commit: Lucene.Net.Search: Fixed up documentation comments
Date Tue, 06 Jun 2017 00:11:42 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/FieldCacheRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldCacheRangeFilter.cs b/src/Lucene.Net/Search/FieldCacheRangeFilter.cs
index 091a60f..405b0a4 100644
--- a/src/Lucene.Net/Search/FieldCacheRangeFilter.cs
+++ b/src/Lucene.Net/Search/FieldCacheRangeFilter.cs
@@ -28,34 +28,34 @@ namespace Lucene.Net.Search
     using SortedDocValues = Lucene.Net.Index.SortedDocValues;
 
     /// <summary>
-    /// A range filter built on top of a cached single term field (in <seealso cref="IFieldCache"/>).
+    /// A range filter built on top of a cached single term field (in <see cref="IFieldCache"/>).
     ///
-    /// <p>{@code FieldCacheRangeFilter} builds a single cache for the field the first time it is used.
-    /// Each subsequent {@code FieldCacheRangeFilter} on the same field then reuses this cache,
+    /// <para/><see cref="FieldCacheRangeFilter"/> builds a single cache for the field the first time it is used.
+    /// Each subsequent <see cref="FieldCacheRangeFilter"/> on the same field then reuses this cache,
     /// even if the range itself changes.
     ///
-    /// <p>this means that {@code FieldCacheRangeFilter} is much faster (sometimes more than 100x as fast)
-    /// as building a <seealso cref="TermRangeFilter"/>, if using a <seealso cref="#newStringRange"/>.
+    /// <para/>this means that <see cref="FieldCacheRangeFilter"/> is much faster (sometimes more than 100x as fast)
+    /// as building a <see cref="TermRangeFilter"/>, if using a <see cref="NewStringRange(string, string, string, bool, bool)"/>.
     /// However, if the range never changes it is slower (around 2x as slow) than building
-    /// a CachingWrapperFilter on top of a single <seealso cref="TermRangeFilter"/>.
+    /// a <see cref="CachingWrapperFilter"/> on top of a single <see cref="TermRangeFilter"/>.
     ///
-    /// For numeric data types, this filter may be significantly faster than <seealso cref="NumericRangeFilter"/>.
+    /// <para/>For numeric data types, this filter may be significantly faster than <see cref="NumericRangeFilter"/>.
     /// Furthermore, it does not need the numeric values encoded
-    /// by <seealso cref="IntField"/>, <seealso cref="FloatField"/>, {@link
-    /// LongField} or <seealso cref="DoubleField"/>. But
+    /// by <see cref="Documents.Int32Field"/>, <see cref="Documents.SingleField"/>,
+    /// <see cref="Documents.Int64Field"/> or <see cref="Documents.DoubleField"/>. But
     /// it has the problem that it only works with exact one value/document (see below).
     ///
-    /// <p>As with all <seealso cref="IFieldCache"/> based functionality, {@code FieldCacheRangeFilter} is only valid for
-    /// fields which exact one term for each document (except for <seealso cref="#newStringRange"/>
-    /// where 0 terms are also allowed). Due to a restriction of <seealso cref="IFieldCache"/>, for numeric ranges
+    /// <para/>As with all <see cref="IFieldCache"/> based functionality, <see cref="FieldCacheRangeFilter"/> is only valid for
+    /// fields which exact one term for each document (except for <see cref="NewStringRange(string, string, string, bool, bool)"/>
+    /// where 0 terms are also allowed). Due to a restriction of <see cref="IFieldCache"/>, for numeric ranges
     /// all terms that do not have a numeric value, 0 is assumed.
     ///
-    /// <p>Thus it works on dates, prices and other single value fields but will not work on
-    /// regular text fields. It is preferable to use a <code>NOT_ANALYZED</code> field to ensure that
+    /// <para/>Thus it works on dates, prices and other single value fields but will not work on
+    /// regular text fields. It is preferable to use a <see cref="Documents.Field.Index.NOT_ANALYZED"/> field to ensure that
     /// there is only a single term.
     ///
-    /// <p>this class does not have an constructor, use one of the static factory methods available,
-    /// that create a correct instance for different data types supported by <seealso cref="IFieldCache"/>.
+    /// <para/>This class does not have an constructor, use one of the static factory methods available,
+    /// that create a correct instance for different data types supported by <see cref="IFieldCache"/>.
     /// </summary>
 #if FEATURE_SERIALIZABLE
     [Serializable]
@@ -683,12 +683,12 @@ namespace Lucene.Net.Search
             }
         }
 
-        //The functions
+        //The functions (Starting on line 84 in Lucene)
 
         /// <summary>
-        /// Creates a string range filter using <seealso cref="IFieldCache#getTermsIndex"/>. this works with all
+        /// Creates a string range filter using <see cref="IFieldCache.GetTermsIndex(Index.AtomicReader, string, float)"/>. This works with all
         /// fields containing zero or one term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// of the values to <c>null</c>.
         /// </summary>
         public static FieldCacheRangeFilter<string> NewStringRange(string field, string lowerVal, string upperVal, bool includeLower, bool includeUpper)
         {
@@ -696,9 +696,9 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Creates a BytesRef range filter using <seealso cref="IFieldCache#getTermsIndex"/>. this works with all
+        /// Creates a <see cref="BytesRef"/> range filter using <see cref="IFieldCache.GetTermsIndex(Index.AtomicReader, string, float)"/>. This works with all
         /// fields containing zero or one term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// of the values to <c>null</c>.
         /// </summary>
         // TODO: bogus that newStringRange doesnt share this code... generics hell
         public static FieldCacheRangeFilter<BytesRef> NewBytesRefRange(string field, BytesRef lowerVal, BytesRef upperVal, bool includeLower, bool includeUpper)
@@ -707,9 +707,9 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Creates a numeric range filter using <seealso cref="IFieldCache#getBytes(AtomicReader,String,boolean)"/>. this works with all
-        /// byte fields containing exactly one numeric term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// Creates a numeric range filter using <see cref="IFieldCache.GetBytes(Index.AtomicReader,string,bool)"/>. This works with all
+        /// <see cref="byte"/> fields containing exactly one numeric term in the field. The range can be half-open by setting one
+        /// of the values to <c>null</c>.
         /// </summary>
         [Obsolete, CLSCompliant(false)] // LUCENENET NOTE: marking non-CLS compliant because it is sbyte, but obsolete anyway
         public static FieldCacheRangeFilter<sbyte?> NewByteRange(string field, sbyte? lowerVal, sbyte? upperVal, bool includeLower, bool includeUpper)
@@ -718,9 +718,9 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Creates a numeric range filter using <seealso cref="IFieldCache#getBytes(AtomicReader,String,FieldCache.ByteParser,boolean)"/>. this works with all
-        /// byte fields containing exactly one numeric term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// Creates a numeric range filter using <see cref="IFieldCache.GetBytes(Index.AtomicReader,string,FieldCache.IByteParser,bool)"/>. This works with all
+        /// <see cref="byte"/> fields containing exactly one numeric term in the field. The range can be half-open by setting one
+        /// of the values to <c>null</c>.
         /// </summary>
         [Obsolete, CLSCompliant(false)]  // LUCENENET NOTE: marking non-CLS compliant because it is sbyte, but obsolete anyway
         public static FieldCacheRangeFilter<sbyte?> NewByteRange(string field, FieldCache.IByteParser parser, sbyte? lowerVal, sbyte? upperVal, bool includeLower, bool includeUpper)
@@ -729,9 +729,9 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Creates a numeric range filter using <seealso cref="IFieldCache#getShorts(AtomicReader,String,boolean)"/>. this works with all
-        /// short fields containing exactly one numeric term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// Creates a numeric range filter using <see cref="IFieldCache.GetInt16s(Index.AtomicReader,string,bool)"/>. This works with all
+        /// <see cref="short"/> fields containing exactly one numeric term in the field. The range can be half-open by setting one
+        /// of the values to <c>null</c>.
         /// <para/>
         /// NOTE: this was newShortRange() in Lucene
         /// </summary>
@@ -742,9 +742,9 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Creates a numeric range filter using <seealso cref="IFieldCache#getShorts(AtomicReader,String,FieldCache.ShortParser,boolean)"/>. this works with all
-        /// short fields containing exactly one numeric term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// Creates a numeric range filter using <see cref="IFieldCache.GetInt16s(Index.AtomicReader, string, FieldCache.IInt16Parser, bool)"/>. This works with all
+        /// <see cref="short"/> fields containing exactly one numeric term in the field. The range can be half-open by setting one
+        /// of the values to <c>null</c>.
         /// <para/>
         /// NOTE: this was newShortRange() in Lucene
         /// </summary>
@@ -755,9 +755,9 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Creates a numeric range filter using <seealso cref="IFieldCache#getInts(AtomicReader,String,boolean)"/>. this works with all
-        /// int fields containing exactly one numeric term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// Creates a numeric range filter using <see cref="IFieldCache.GetInt32s(Index.AtomicReader,string,bool)"/>. This works with all
+        /// <see cref="int"/> fields containing exactly one numeric term in the field. The range can be half-open by setting one
+        /// of the values to <c>null</c>.
         /// <para/>
         /// NOTE: this was newIntRange() in Lucene
         /// </summary>
@@ -767,9 +767,9 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Creates a numeric range filter using <seealso cref="IFieldCache#getInts(AtomicReader,String,FieldCache.IntParser,boolean)"/>. this works with all
-        /// int fields containing exactly one numeric term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// Creates a numeric range filter using <see cref="IFieldCache.GetInt32s(Index.AtomicReader,string,FieldCache.IInt32Parser,bool)"/>. This works with all
+        /// <see cref="int"/> fields containing exactly one numeric term in the field. The range can be half-open by setting one
+        /// of the values to <c>null</c>.
         /// <para/>
         /// NOTE: this was newIntRange() in Lucene
         /// </summary>
@@ -779,9 +779,9 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Creates a numeric range filter using <seealso cref="IFieldCache#getLongs(AtomicReader,String,boolean)"/>. this works with all
-        /// long fields containing exactly one numeric term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// Creates a numeric range filter using <see cref="IFieldCache.GetInt64s(Index.AtomicReader,string,bool)"/>. This works with all
+        /// <see cref="long"/> fields containing exactly one numeric term in the field. The range can be half-open by setting one
+        /// of the values to <c>null</c>.
         /// </summary>
         public static FieldCacheRangeFilter<long?> NewInt64Range(string field, long? lowerVal, long? upperVal, bool includeLower, bool includeUpper)
         {
@@ -789,9 +789,9 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Creates a numeric range filter using <seealso cref="IFieldCache#getLongs(AtomicReader,String,FieldCache.LongParser,boolean)"/>. this works with all
-        /// long fields containing exactly one numeric term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// Creates a numeric range filter using <see cref="IFieldCache.GetInt64s(Index.AtomicReader,string,FieldCache.IInt64Parser,bool)"/>. This works with all
+        /// <see cref="long"/> fields containing exactly one numeric term in the field. The range can be half-open by setting one
+        /// of the values to <c>null</c>.
         /// <para/>
         /// NOTE: this was newLongRange() in Lucene
         /// </summary>
@@ -801,9 +801,9 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Creates a numeric range filter using <seealso cref="IFieldCache#getFloats(AtomicReader,String,boolean)"/>. this works with all
-        /// float fields containing exactly one numeric term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// Creates a numeric range filter using <see cref="IFieldCache.GetSingles(Index.AtomicReader,string,bool)"/>. This works with all
+        /// <see cref="float"/> fields containing exactly one numeric term in the field. The range can be half-open by setting one
+        /// of the values to <c>null</c>.
         /// <para/>
         /// NOTE: this was newFloatRange() in Lucene
         /// </summary>
@@ -813,9 +813,9 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Creates a numeric range filter using <seealso cref="IFieldCache#getFloats(AtomicReader,String,FieldCache.FloatParser,boolean)"/>. this works with all
-        /// float fields containing exactly one numeric term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// Creates a numeric range filter using <see cref="IFieldCache.GetSingles(Index.AtomicReader,string,FieldCache.ISingleParser,bool)"/>. This works with all
+        /// <see cref="float"/> fields containing exactly one numeric term in the field. The range can be half-open by setting one
+        /// of the values to <c>null</c>.
         /// <para/>
         /// NOTE: this was newFloatRange() in Lucene
         /// </summary>
@@ -825,9 +825,9 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Creates a numeric range filter using <seealso cref="IFieldCache#getDoubles(AtomicReader,String,boolean)"/>. this works with all
-        /// double fields containing exactly one numeric term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// Creates a numeric range filter using <see cref="IFieldCache.GetDoubles(Index.AtomicReader,string,bool)"/>. This works with all
+        /// <see cref="double"/> fields containing exactly one numeric term in the field. The range can be half-open by setting one
+        /// of the values to <c>null</c>.
         /// </summary>
         public static FieldCacheRangeFilter<double?> NewDoubleRange(string field, double? lowerVal, double? upperVal, bool includeLower, bool includeUpper)
         {
@@ -835,9 +835,9 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Creates a numeric range filter using <seealso cref="IFieldCache#getDoubles(AtomicReader,String,FieldCache.DoubleParser,boolean)"/>. this works with all
-        /// double fields containing exactly one numeric term in the field. The range can be half-open by setting one
-        /// of the values to <code>null</code>.
+        /// Creates a numeric range filter using <see cref="IFieldCache.GetDoubles(Index.AtomicReader,string,FieldCache.IDoubleParser,bool)"/>. This works with all
+        /// <see cref="double"/> fields containing exactly one numeric term in the field. The range can be half-open by setting one
+        /// of the values to <c>null</c>.
         /// </summary>
         public static FieldCacheRangeFilter<double?> NewDoubleRange(string field, FieldCache.IDoubleParser parser, double? lowerVal, double? upperVal, bool includeLower, bool includeUpper)
         {
@@ -868,862 +868,12 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// this method is implemented for each data type </summary>
+        /// This method is implemented for each data type </summary>
         public override abstract DocIdSet GetDocIdSet(AtomicReaderContext context, IBits acceptDocs);
 
-        /*
-	  /// <summary>
-	  /// Creates a string range filter using <seealso cref="FieldCache#getTermsIndex"/>. this works with all
-	  /// fields containing zero or one term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-	  public static FieldCacheRangeFilter<string> NewStringRange(string field, string lowerVal, string upperVal, bool includeLower, bool includeUpper)
-	  {
-		return new FieldCacheRangeFilterAnonymousInnerClassHelper(field, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  private class FieldCacheRangeFilterAnonymousInnerClassHelper : FieldCacheRangeFilter<string>
-	  {
-		  private string Field;
-		  private string LowerVal;
-		  private string UpperVal;
-		  private bool IncludeLower;
-		  private bool IncludeUpper;
-
-		  public FieldCacheRangeFilterAnonymousInnerClassHelper(string field, string lowerVal, string upperVal, bool includeLower, bool includeUpper) : base(field, null, lowerVal, upperVal, includeLower, includeUpper)
-		  {
-			  this.Field = field;
-			  this.LowerVal = lowerVal;
-			  this.UpperVal = upperVal;
-			  this.IncludeLower = includeLower;
-			  this.IncludeUpper = includeUpper;
-		  }
-
-		  public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
-		  {
-			SortedDocValues fcsi = FieldCache_Fields.DEFAULT.GetTermsIndex((context.AtomicReader), Field);
-			int lowerPoint = LowerVal == null ? - 1 : fcsi.LookupTerm(new BytesRef(LowerVal));
-			int upperPoint = UpperVal == null ? - 1 : fcsi.LookupTerm(new BytesRef(UpperVal));
-
-			int inclusiveLowerPoint, inclusiveUpperPoint;
-
-			// Hints:
-			// * binarySearchLookup returns -1, if value was null.
-			// * the value is <0 if no exact hit was found, the returned value
-			//   is (-(insertion point) - 1)
-			if (lowerPoint == -1 && LowerVal == null)
-			{
-			  inclusiveLowerPoint = 0;
-			}
-			else if (IncludeLower && lowerPoint >= 0)
-			{
-			  inclusiveLowerPoint = lowerPoint;
-			}
-			else if (lowerPoint >= 0)
-			{
-			  inclusiveLowerPoint = lowerPoint + 1;
-			}
-			else
-			{
-			  inclusiveLowerPoint = Math.Max(0, -lowerPoint - 1);
-			}
-
-			if (upperPoint == -1 && UpperVal == null)
-			{
-			  inclusiveUpperPoint = int.MaxValue;
-			}
-			else if (IncludeUpper && upperPoint >= 0)
-			{
-			  inclusiveUpperPoint = upperPoint;
-			}
-			else if (upperPoint >= 0)
-			{
-			  inclusiveUpperPoint = upperPoint - 1;
-			}
-			else
-			{
-			  inclusiveUpperPoint = -upperPoint - 2;
-			}
-
-			if (inclusiveUpperPoint < 0 || inclusiveLowerPoint > inclusiveUpperPoint)
-			{
-			  return null;
-			}
-
-			Debug.Assert(inclusiveLowerPoint >= 0 && inclusiveUpperPoint >= 0);
-
-			return new FieldCacheDocIdSetAnonymousInnerClassHelper(this, context.Reader.MaxDoc, acceptDocs, fcsi, inclusiveLowerPoint, inclusiveUpperPoint);
-		  }
-
-		  private class FieldCacheDocIdSetAnonymousInnerClassHelper : FieldCacheDocIdSet
-		  {
-			  private readonly FieldCacheRangeFilterAnonymousInnerClassHelper OuterInstance;
-
-			  private SortedDocValues Fcsi;
-			  private int InclusiveLowerPoint;
-			  private int InclusiveUpperPoint;
-
-			  public FieldCacheDocIdSetAnonymousInnerClassHelper(FieldCacheRangeFilterAnonymousInnerClassHelper outerInstance, int maxDoc, Bits acceptDocs, SortedDocValues fcsi, int inclusiveLowerPoint, int inclusiveUpperPoint) : base(maxDoc, acceptDocs)
-			  {
-                  this.OuterInstance = outerInstance;
-				  this.Fcsi = fcsi;
-				  this.InclusiveLowerPoint = inclusiveLowerPoint;
-				  this.InclusiveUpperPoint = inclusiveUpperPoint;
-			  }
-
-			  protected internal override sealed bool MatchDoc(int doc)
-			  {
-				int docOrd = Fcsi.GetOrd(doc);
-				return docOrd >= InclusiveLowerPoint && docOrd <= InclusiveUpperPoint;
-			  }
-		  }
-	  }
-
-	  /// <summary>
-	  /// Creates a BytesRef range filter using <seealso cref="FieldCache#getTermsIndex"/>. this works with all
-	  /// fields containing zero or one term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-	  // TODO: bogus that newStringRange doesnt share this code... generics hell
-	  public static FieldCacheRangeFilter<BytesRef> NewBytesRefRange(string field, BytesRef lowerVal, BytesRef upperVal, bool includeLower, bool includeUpper)
-	  {
-		return new FieldCacheRangeFilterAnonymousInnerClassHelper2(field, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  private class FieldCacheRangeFilterAnonymousInnerClassHelper2 : FieldCacheRangeFilter<BytesRef>
-	  {
-		  private string Field;
-		  private BytesRef LowerVal;
-		  private BytesRef UpperVal;
-		  private bool IncludeLower;
-		  private bool IncludeUpper;
-
-		  public FieldCacheRangeFilterAnonymousInnerClassHelper2(string field, BytesRef lowerVal, BytesRef upperVal, bool includeLower, bool includeUpper) : base(field, null, lowerVal, upperVal, includeLower, includeUpper)
-		  {
-			  this.Field = field;
-			  this.LowerVal = lowerVal;
-			  this.UpperVal = upperVal;
-			  this.IncludeLower = includeLower;
-			  this.IncludeUpper = includeUpper;
-		  }
-
-		  public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
-		  {
-			SortedDocValues fcsi = FieldCache_Fields.DEFAULT.GetTermsIndex((context.AtomicReader), Field);
-			int lowerPoint = LowerVal == null ? - 1 : fcsi.LookupTerm(LowerVal);
-			int upperPoint = UpperVal == null ? - 1 : fcsi.LookupTerm(UpperVal);
-
-			int inclusiveLowerPoint, inclusiveUpperPoint;
-
-			// Hints:
-			// * binarySearchLookup returns -1, if value was null.
-			// * the value is <0 if no exact hit was found, the returned value
-			//   is (-(insertion point) - 1)
-			if (lowerPoint == -1 && LowerVal == null)
-			{
-			  inclusiveLowerPoint = 0;
-			}
-			else if (IncludeLower && lowerPoint >= 0)
-			{
-			  inclusiveLowerPoint = lowerPoint;
-			}
-			else if (lowerPoint >= 0)
-			{
-			  inclusiveLowerPoint = lowerPoint + 1;
-			}
-			else
-			{
-			  inclusiveLowerPoint = Math.Max(0, -lowerPoint - 1);
-			}
-
-			if (upperPoint == -1 && UpperVal == null)
-			{
-			  inclusiveUpperPoint = int.MaxValue;
-			}
-			else if (IncludeUpper && upperPoint >= 0)
-			{
-			  inclusiveUpperPoint = upperPoint;
-			}
-			else if (upperPoint >= 0)
-			{
-			  inclusiveUpperPoint = upperPoint - 1;
-			}
-			else
-			{
-			  inclusiveUpperPoint = -upperPoint - 2;
-			}
-
-			if (inclusiveUpperPoint < 0 || inclusiveLowerPoint > inclusiveUpperPoint)
-			{
-			  return null;
-			}
-
-			Debug.Assert(inclusiveLowerPoint >= 0 && inclusiveUpperPoint >= 0);
-
-			return new FieldCacheDocIdSetAnonymousInnerClassHelper2(this, context.Reader.MaxDoc, acceptDocs, fcsi, inclusiveLowerPoint, inclusiveUpperPoint);
-		  }
-
-		  private class FieldCacheDocIdSetAnonymousInnerClassHelper2 : FieldCacheDocIdSet
-		  {
-			  private readonly FieldCacheRangeFilterAnonymousInnerClassHelper2 OuterInstance;
-
-			  private SortedDocValues Fcsi;
-			  private int InclusiveLowerPoint;
-			  private int InclusiveUpperPoint;
-
-			  public FieldCacheDocIdSetAnonymousInnerClassHelper2(FieldCacheRangeFilterAnonymousInnerClassHelper2 outerInstance, int maxDoc, Bits acceptDocs, SortedDocValues fcsi, int inclusiveLowerPoint, int inclusiveUpperPoint) : base(maxDoc, acceptDocs)
-			  {
-                  this.OuterInstance = outerInstance;
-				  this.Fcsi = fcsi;
-				  this.InclusiveLowerPoint = inclusiveLowerPoint;
-				  this.InclusiveUpperPoint = inclusiveUpperPoint;
-			  }
-
-			  protected internal override sealed bool MatchDoc(int doc)
-			  {
-				int docOrd = Fcsi.GetOrd(doc);
-				return docOrd >= InclusiveLowerPoint && docOrd <= InclusiveUpperPoint;
-			  }
-		  }
-	  }
-
-	  /// <summary>
-	  /// Creates a numeric range filter using <seealso cref="FieldCache#getBytes(AtomicReader,String,boolean)"/>. this works with all
-	  /// byte fields containing exactly one numeric term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-	  [Obsolete]
-	  public static FieldCacheRangeFilter<sbyte?> NewByteRange(string field, sbyte? lowerVal, sbyte? upperVal, bool includeLower, bool includeUpper)
-	  {
-		return NewByteRange(field, null, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  /// <summary>
-	  /// Creates a numeric range filter using <seealso cref="FieldCache#getBytes(AtomicReader,String,FieldCache.ByteParser,boolean)"/>. this works with all
-	  /// byte fields containing exactly one numeric term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-	  [Obsolete]
-      public static FieldCacheRangeFilter<sbyte?> NewByteRange(string field, FieldCache_Fields.IByteParser parser, sbyte? lowerVal, sbyte? upperVal, bool includeLower, bool includeUpper)
-	  {
-		return new FieldCacheRangeFilterAnonymousInnerClassHelper3(field, parser, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  private class FieldCacheRangeFilterAnonymousInnerClassHelper3 : FieldCacheRangeFilter<sbyte?>
-	  {
-		  private string Field;
-          private FieldCache_Fields.IByteParser Parser;
-		  private sbyte? LowerVal;
-		  private sbyte? UpperVal;
-		  private bool IncludeLower;
-		  private bool IncludeUpper;
-
-          public FieldCacheRangeFilterAnonymousInnerClassHelper3(string field, FieldCache_Fields.IByteParser parser, sbyte? lowerVal, sbyte? upperVal, bool includeLower, bool includeUpper)
-              : base(field, parser, lowerVal, upperVal, includeLower, includeUpper)
-		  {
-			  this.Field = field;
-			  this.Parser = parser;
-			  this.LowerVal = lowerVal;
-			  this.UpperVal = upperVal;
-			  this.IncludeLower = includeLower;
-			  this.IncludeUpper = includeUpper;
-		  }
-
-		  public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
-		  {
-			sbyte inclusiveLowerPoint, inclusiveUpperPoint;
-			if (LowerVal != null)
-			{
-			  sbyte i = (sbyte)LowerVal;
-			  if (!IncludeLower && i == sbyte.MaxValue)
-			  {
-				return null;
-			  }
-			  inclusiveLowerPoint = (sbyte)(IncludeLower ? i : (i + 1));
-			}
-			else
-			{
-			  inclusiveLowerPoint = sbyte.MinValue;
-			}
-			if (UpperVal != null)
-			{
-			  sbyte i = (sbyte)UpperVal;
-			  if (!IncludeUpper && i == sbyte.MinValue)
-			  {
-				return null;
-			  }
-			  inclusiveUpperPoint = (sbyte)(IncludeUpper ? i : (i - 1));
-			}
-			else
-			{
-			  inclusiveUpperPoint = sbyte.MaxValue;
-			}
-
-			if (inclusiveLowerPoint > inclusiveUpperPoint)
-			{
-			  return null;
-			}
-
-            FieldCache_Fields.Bytes values = FieldCache_Fields.DEFAULT.GetBytes((context.AtomicReader), Field, (FieldCache_Fields.IByteParser)Parser, false);
-			return new FieldCacheDocIdSetAnonymousInnerClassHelper3(this, context.Reader.MaxDoc, acceptDocs, inclusiveLowerPoint, inclusiveUpperPoint, values);
-		  }
-
-		  private class FieldCacheDocIdSetAnonymousInnerClassHelper3 : FieldCacheDocIdSet
-		  {
-			  private readonly FieldCacheRangeFilterAnonymousInnerClassHelper3 OuterInstance;
-
-			  private sbyte InclusiveLowerPoint;
-			  private sbyte InclusiveUpperPoint;
-              private FieldCache_Fields.Bytes Values;
-
-              public FieldCacheDocIdSetAnonymousInnerClassHelper3(FieldCacheRangeFilterAnonymousInnerClassHelper3 outerInstance, int maxDoc, Bits acceptDocs, sbyte inclusiveLowerPoint, sbyte inclusiveUpperPoint, FieldCache_Fields.Bytes values)
-                  : base(maxDoc, acceptDocs)
-			  {
-                  this.OuterInstance = outerInstance;
-				  this.InclusiveLowerPoint = inclusiveLowerPoint;
-				  this.InclusiveUpperPoint = inclusiveUpperPoint;
-				  this.Values = values;
-			  }
-
-			  protected internal override bool MatchDoc(int doc)
-			  {
-				sbyte value = Values.Get(doc);
-				return value >= InclusiveLowerPoint && value <= InclusiveUpperPoint;
-			  }
-		  }
-	  }
-
-	  /// <summary>
-	  /// Creates a numeric range filter using <seealso cref="FieldCache#getShorts(AtomicReader,String,boolean)"/>. this works with all
-	  /// short fields containing exactly one numeric term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-	  [Obsolete]
-	  public static FieldCacheRangeFilter<short?> NewShortRange(string field, short? lowerVal, short? upperVal, bool includeLower, bool includeUpper)
-	  {
-		return NewShortRange(field, null, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  /// <summary>
-	  /// Creates a numeric range filter using <seealso cref="FieldCache#getShorts(AtomicReader,String,FieldCache.ShortParser,boolean)"/>. this works with all
-	  /// short fields containing exactly one numeric term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-	  [Obsolete]
-      public static FieldCacheRangeFilter<short?> NewShortRange(string field, FieldCache_Fields.IShortParser parser, short? lowerVal, short? upperVal, bool includeLower, bool includeUpper)
-	  {
-		return new FieldCacheRangeFilterAnonymousInnerClassHelper4(field, parser, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  private class FieldCacheRangeFilterAnonymousInnerClassHelper4 : FieldCacheRangeFilter<short?>
-	  {
-		  private string Field;
-          private FieldCache_Fields.IShortParser Parser;
-		  private short? LowerVal;
-		  private short? UpperVal;
-		  private bool IncludeLower;
-		  private bool IncludeUpper;
-
-          public FieldCacheRangeFilterAnonymousInnerClassHelper4(string field, FieldCache_Fields.IShortParser parser, short? lowerVal, short? upperVal, bool includeLower, bool includeUpper)
-              : base(field, parser, lowerVal, upperVal, includeLower, includeUpper)
-		  {
-			  this.Field = field;
-			  this.Parser = parser;
-			  this.LowerVal = lowerVal;
-			  this.UpperVal = upperVal;
-			  this.IncludeLower = includeLower;
-			  this.IncludeUpper = includeUpper;
-		  }
-
-		  public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
-		  {
-			short inclusiveLowerPoint, inclusiveUpperPoint;
-			if (LowerVal != null)
-			{
-			  short i = (short)LowerVal;
-			  if (!IncludeLower && i == short.MaxValue)
-			  {
-				return null;
-			  }
-			  inclusiveLowerPoint = (short)(IncludeLower ? i : (i + 1));
-			}
-			else
-			{
-			  inclusiveLowerPoint = short.MinValue;
-			}
-			if (UpperVal != null)
-			{
-			  short i = (short)UpperVal;
-			  if (!IncludeUpper && i == short.MinValue)
-			  {
-				return null;
-			  }
-			  inclusiveUpperPoint = (short)(IncludeUpper ? i : (i - 1));
-			}
-			else
-			{
-			  inclusiveUpperPoint = short.MaxValue;
-			}
-
-			if (inclusiveLowerPoint > inclusiveUpperPoint)
-			{
-			  return null;
-			}
-
-            FieldCache_Fields.Shorts values = FieldCache_Fields.DEFAULT.GetShorts((context.AtomicReader), Field, (FieldCache_Fields.IShortParser)Parser, false);
-			return new FieldCacheDocIdSetAnonymousInnerClassHelper4(this, context.Reader.MaxDoc, acceptDocs, inclusiveLowerPoint, inclusiveUpperPoint, values);
-		  }
-
-		  private class FieldCacheDocIdSetAnonymousInnerClassHelper4 : FieldCacheDocIdSet
-		  {
-			  private readonly FieldCacheRangeFilterAnonymousInnerClassHelper4 OuterInstance;
-
-			  private short InclusiveLowerPoint;
-			  private short InclusiveUpperPoint;
-              private FieldCache_Fields.Shorts Values;
-
-              public FieldCacheDocIdSetAnonymousInnerClassHelper4(FieldCacheRangeFilterAnonymousInnerClassHelper4 outerInstance, int maxDoc, Bits acceptDocs, short inclusiveLowerPoint, short inclusiveUpperPoint, FieldCache_Fields.Shorts values)
-                  : base(maxDoc, acceptDocs)
-			  {
-                  this.OuterInstance = outerInstance;
-				  this.InclusiveLowerPoint = inclusiveLowerPoint;
-				  this.InclusiveUpperPoint = inclusiveUpperPoint;
-				  this.Values = values;
-			  }
-
-			  protected internal override bool MatchDoc(int doc)
-			  {
-				short value = Values.Get(doc);
-				return value >= InclusiveLowerPoint && value <= InclusiveUpperPoint;
-			  }
-		  }
-	  }
-
-	  /// <summary>
-	  /// Creates a numeric range filter using <seealso cref="FieldCache#getInts(AtomicReader,String,boolean)"/>. this works with all
-	  /// int fields containing exactly one numeric term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-	  public static FieldCacheRangeFilter<int?> NewIntRange(string field, int? lowerVal, int? upperVal, bool includeLower, bool includeUpper)
-	  {
-		return NewIntRange(field, null, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  /// <summary>
-	  /// Creates a numeric range filter using <seealso cref="FieldCache#getInts(AtomicReader,String,FieldCache.IntParser,boolean)"/>. this works with all
-	  /// int fields containing exactly one numeric term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-      public static FieldCacheRangeFilter<int?> NewIntRange(string field, FieldCache_Fields.IIntParser parser, int? lowerVal, int? upperVal, bool includeLower, bool includeUpper)
-	  {
-		return new FieldCacheRangeFilterAnonymousInnerClassHelper5(field, parser, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  private class FieldCacheRangeFilterAnonymousInnerClassHelper5 : FieldCacheRangeFilter<int?>
-	  {
-		  private string Field;
-          private FieldCache_Fields.IIntParser Parser;
-		  private int? LowerVal;
-		  private int? UpperVal;
-		  private bool IncludeLower;
-		  private bool IncludeUpper;
-
-          public FieldCacheRangeFilterAnonymousInnerClassHelper5(string field, FieldCache_Fields.IIntParser parser, int? lowerVal, int? upperVal, bool includeLower, bool includeUpper)
-              : base(field, parser, lowerVal, upperVal, includeLower, includeUpper)
-		  {
-			  this.Field = field;
-			  this.Parser = parser;
-			  this.LowerVal = lowerVal;
-			  this.UpperVal = upperVal;
-			  this.IncludeLower = includeLower;
-			  this.IncludeUpper = includeUpper;
-		  }
-
-		  public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
-		  {
-			int inclusiveLowerPoint, inclusiveUpperPoint;
-			if (LowerVal != null)
-			{
-			  int i = (int)LowerVal;
-			  if (!IncludeLower && i == int.MaxValue)
-			  {
-				return null;
-			  }
-			  inclusiveLowerPoint = IncludeLower ? i : (i + 1);
-			}
-			else
-			{
-			  inclusiveLowerPoint = int.MinValue;
-			}
-			if (UpperVal != null)
-			{
-			  int i = (int)UpperVal;
-			  if (!IncludeUpper && i == int.MinValue)
-			  {
-				return null;
-			  }
-			  inclusiveUpperPoint = IncludeUpper ? i : (i - 1);
-			}
-			else
-			{
-			  inclusiveUpperPoint = int.MaxValue;
-			}
-
-			if (inclusiveLowerPoint > inclusiveUpperPoint)
-			{
-			  return null;
-			}
-
-            FieldCache_Fields.Ints values = FieldCache_Fields.DEFAULT.GetInts((context.AtomicReader), Field, (FieldCache_Fields.IIntParser)Parser, false);
-			return new FieldCacheDocIdSetAnonymousInnerClassHelper5(this, context.Reader.MaxDoc, acceptDocs, inclusiveLowerPoint, inclusiveUpperPoint, values);
-		  }
-
-		  private class FieldCacheDocIdSetAnonymousInnerClassHelper5 : FieldCacheDocIdSet
-		  {
-			  private readonly FieldCacheRangeFilterAnonymousInnerClassHelper5 OuterInstance;
-
-			  private int InclusiveLowerPoint;
-			  private int InclusiveUpperPoint;
-              private FieldCache_Fields.Ints Values;
-
-              public FieldCacheDocIdSetAnonymousInnerClassHelper5(FieldCacheRangeFilterAnonymousInnerClassHelper5 outerInstance, int maxDoc, Bits acceptDocs, int inclusiveLowerPoint, int inclusiveUpperPoint, FieldCache_Fields.Ints values)
-                  : base(maxDoc, acceptDocs)
-			  {
-                  this.OuterInstance = outerInstance;
-				  this.InclusiveLowerPoint = inclusiveLowerPoint;
-				  this.InclusiveUpperPoint = inclusiveUpperPoint;
-				  this.Values = values;
-			  }
-
-			  protected internal override bool MatchDoc(int doc)
-			  {
-				int value = Values.Get(doc);
-				return value >= InclusiveLowerPoint && value <= InclusiveUpperPoint;
-			  }
-		  }
-	  }
-
-	  /// <summary>
-	  /// Creates a numeric range filter using <seealso cref="FieldCache#getLongs(AtomicReader,String,boolean)"/>. this works with all
-	  /// long fields containing exactly one numeric term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-	  public static FieldCacheRangeFilter<long?> NewLongRange(string field, long? lowerVal, long? upperVal, bool includeLower, bool includeUpper)
-	  {
-		return NewLongRange(field, null, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  /// <summary>
-	  /// Creates a numeric range filter using <seealso cref="FieldCache#getLongs(AtomicReader,String,FieldCache.LongParser,boolean)"/>. this works with all
-	  /// long fields containing exactly one numeric term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-      public static FieldCacheRangeFilter<long?> NewLongRange(string field, FieldCache_Fields.ILongParser parser, long? lowerVal, long? upperVal, bool includeLower, bool includeUpper)
-	  {
-		return new FieldCacheRangeFilterAnonymousInnerClassHelper6(field, parser, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  private class FieldCacheRangeFilterAnonymousInnerClassHelper6 : FieldCacheRangeFilter<long?>
-	  {
-		  private string Field;
-          private FieldCache_Fields.ILongParser Parser;
-		  private long? LowerVal;
-		  private long? UpperVal;
-		  private bool IncludeLower;
-		  private bool IncludeUpper;
-
-          public FieldCacheRangeFilterAnonymousInnerClassHelper6(string field, FieldCache_Fields.ILongParser parser, long? lowerVal, long? upperVal, bool includeLower, bool includeUpper)
-              : base(field, parser, lowerVal, upperVal, includeLower, includeUpper)
-		  {
-			  this.Field = field;
-			  this.Parser = parser;
-			  this.LowerVal = lowerVal;
-			  this.UpperVal = upperVal;
-			  this.IncludeLower = includeLower;
-			  this.IncludeUpper = includeUpper;
-		  }
-
-		  public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
-		  {
-			long inclusiveLowerPoint, inclusiveUpperPoint;
-			if (LowerVal != null)
-			{
-			  long i = (long)LowerVal;
-			  if (!IncludeLower && i == long.MaxValue)
-			  {
-				return null;
-			  }
-			  inclusiveLowerPoint = IncludeLower ? i : (i + 1L);
-			}
-			else
-			{
-			  inclusiveLowerPoint = long.MinValue;
-			}
-			if (UpperVal != null)
-			{
-			  long i = (long)UpperVal;
-			  if (!IncludeUpper && i == long.MinValue)
-			  {
-				return null;
-			  }
-			  inclusiveUpperPoint = IncludeUpper ? i : (i - 1L);
-			}
-			else
-			{
-			  inclusiveUpperPoint = long.MaxValue;
-			}
-
-			if (inclusiveLowerPoint > inclusiveUpperPoint)
-			{
-			  return null;
-			}
-
-            FieldCache_Fields.Longs values = FieldCache_Fields.DEFAULT.GetLongs((context.AtomicReader), Field, (FieldCache_Fields.ILongParser)Parser, false);
-			return new FieldCacheDocIdSetAnonymousInnerClassHelper6(this, context.Reader.MaxDoc, acceptDocs, inclusiveLowerPoint, inclusiveUpperPoint, values);
-		  }
-
-		  private class FieldCacheDocIdSetAnonymousInnerClassHelper6 : FieldCacheDocIdSet
-		  {
-			  private readonly FieldCacheRangeFilterAnonymousInnerClassHelper6 OuterInstance;
-
-			  private long InclusiveLowerPoint;
-			  private long InclusiveUpperPoint;
-              private FieldCache_Fields.Longs Values;
-
-              public FieldCacheDocIdSetAnonymousInnerClassHelper6(FieldCacheRangeFilterAnonymousInnerClassHelper6 outerInstance, int maxDoc, Bits acceptDocs, long inclusiveLowerPoint, long inclusiveUpperPoint, FieldCache_Fields.Longs values)
-                  : base(maxDoc, acceptDocs)
-			  {
-                  this.OuterInstance = outerInstance;
-				  this.InclusiveLowerPoint = inclusiveLowerPoint;
-				  this.InclusiveUpperPoint = inclusiveUpperPoint;
-				  this.Values = values;
-			  }
-
-			  protected internal override bool MatchDoc(int doc)
-			  {
-				long value = Values.Get(doc);
-				return value >= InclusiveLowerPoint && value <= InclusiveUpperPoint;
-			  }
-		  }
-	  }
-
-	  /// <summary>
-	  /// Creates a numeric range filter using <seealso cref="FieldCache#getFloats(AtomicReader,String,boolean)"/>. this works with all
-	  /// float fields containing exactly one numeric term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-	  public static FieldCacheRangeFilter<float?> NewFloatRange(string field, float? lowerVal, float? upperVal, bool includeLower, bool includeUpper)
-	  {
-		return NewFloatRange(field, null, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  /// <summary>
-	  /// Creates a numeric range filter using <seealso cref="FieldCache#getFloats(AtomicReader,String,FieldCache.FloatParser,boolean)"/>. this works with all
-	  /// float fields containing exactly one numeric term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-      public static FieldCacheRangeFilter<float?> NewFloatRange(string field, FieldCache_Fields.IFloatParser parser, float? lowerVal, float? upperVal, bool includeLower, bool includeUpper)
-	  {
-		return new FieldCacheRangeFilterAnonymousInnerClassHelper7(field, parser, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  private class FieldCacheRangeFilterAnonymousInnerClassHelper7 : FieldCacheRangeFilter<float?>
-	  {
-		  private string Field;
-          private FieldCache_Fields.IFloatParser Parser;
-		  private float? LowerVal;
-		  private float? UpperVal;
-		  private bool IncludeLower;
-		  private bool IncludeUpper;
-
-          public FieldCacheRangeFilterAnonymousInnerClassHelper7(string field, FieldCache_Fields.IFloatParser parser, float? lowerVal, float? upperVal, bool includeLower, bool includeUpper)
-              : base(field, parser, lowerVal, upperVal, includeLower, includeUpper)
-		  {
-			  this.Field = field;
-			  this.Parser = parser;
-			  this.LowerVal = lowerVal;
-			  this.UpperVal = upperVal;
-			  this.IncludeLower = includeLower;
-			  this.IncludeUpper = includeUpper;
-		  }
-
-		  public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
-		  {
-			// we transform the floating point numbers to sortable integers
-			// using NumericUtils to easier find the next bigger/lower value
-			float inclusiveLowerPoint, inclusiveUpperPoint;
-			if (LowerVal != null)
-			{
-			  float f = (float)LowerVal;
-			  if (!IncludeUpper && f > 0.0f && float.IsInfinity(f))
-			  {
-				return null;
-			  }
-			  int i = NumericUtils.FloatToSortableInt(f);
-			  inclusiveLowerPoint = NumericUtils.SortableIntToFloat(IncludeLower ? i : (i + 1));
-			}
-			else
-			{
-			  inclusiveLowerPoint = float.NegativeInfinity;
-			}
-			if (UpperVal != null)
-			{
-			  float f = (float)UpperVal;
-			  if (!IncludeUpper && f < 0.0f && float.IsInfinity(f))
-			  {
-				return null;
-			  }
-			  int i = NumericUtils.FloatToSortableInt(f);
-			  inclusiveUpperPoint = NumericUtils.SortableIntToFloat(IncludeUpper ? i : (i - 1));
-			}
-			else
-			{
-			  inclusiveUpperPoint = float.PositiveInfinity;
-			}
-
-			if (inclusiveLowerPoint > inclusiveUpperPoint)
-			{
-			  return null;
-			}
-
-            FieldCache_Fields.Floats values = FieldCache_Fields.DEFAULT.GetFloats((context.AtomicReader), Field, (FieldCache_Fields.IFloatParser)Parser, false);
-			return new FieldCacheDocIdSetAnonymousInnerClassHelper7(this, context.Reader.MaxDoc, acceptDocs, inclusiveLowerPoint, inclusiveUpperPoint, values);
-		  }
-
-		  private class FieldCacheDocIdSetAnonymousInnerClassHelper7 : FieldCacheDocIdSet
-		  {
-			  private readonly FieldCacheRangeFilterAnonymousInnerClassHelper7 OuterInstance;
-
-			  private float InclusiveLowerPoint;
-			  private float InclusiveUpperPoint;
-              private FieldCache_Fields.Floats Values;
-
-              public FieldCacheDocIdSetAnonymousInnerClassHelper7(FieldCacheRangeFilterAnonymousInnerClassHelper7 outerInstance, int maxDoc, Bits acceptDocs, float inclusiveLowerPoint, float inclusiveUpperPoint, FieldCache_Fields.Floats values)
-                  : base(maxDoc, acceptDocs)
-			  {
-                  this.OuterInstance = outerInstance;
-				  this.InclusiveLowerPoint = inclusiveLowerPoint;
-				  this.InclusiveUpperPoint = inclusiveUpperPoint;
-				  this.Values = values;
-			  }
-
-			  protected internal override bool MatchDoc(int doc)
-			  {
-				float value = Values.Get(doc);
-				return value >= InclusiveLowerPoint && value <= InclusiveUpperPoint;
-			  }
-		  }
-	  }
-
-	  /// <summary>
-	  /// Creates a numeric range filter using <seealso cref="FieldCache#getDoubles(AtomicReader,String,boolean)"/>. this works with all
-	  /// double fields containing exactly one numeric term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-	  public static FieldCacheRangeFilter<double?> NewDoubleRange(string field, double? lowerVal, double? upperVal, bool includeLower, bool includeUpper)
-	  {
-		return NewDoubleRange(field, null, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  /// <summary>
-	  /// Creates a numeric range filter using <seealso cref="FieldCache#getDoubles(AtomicReader,String,FieldCache.DoubleParser,boolean)"/>. this works with all
-	  /// double fields containing exactly one numeric term in the field. The range can be half-open by setting one
-	  /// of the values to <code>null</code>.
-	  /// </summary>
-      public static FieldCacheRangeFilter<double?> NewDoubleRange(string field, FieldCache_Fields.IDoubleParser parser, double? lowerVal, double? upperVal, bool includeLower, bool includeUpper)
-	  {
-		return new FieldCacheRangeFilterAnonymousInnerClassHelper8(field, parser, lowerVal, upperVal, includeLower, includeUpper);
-	  }
-
-	  private class FieldCacheRangeFilterAnonymousInnerClassHelper8 : FieldCacheRangeFilter<double?>
-	  {
-		  private string Field;
-          private FieldCache_Fields.IDoubleParser Parser;
-		  private double? LowerVal;
-		  private double? UpperVal;
-		  private bool IncludeLower;
-		  private bool IncludeUpper;
-
-          public FieldCacheRangeFilterAnonymousInnerClassHelper8(string field, FieldCache_Fields.IDoubleParser parser, double? lowerVal, double? upperVal, bool includeLower, bool includeUpper)
-              : base(field, parser, lowerVal, upperVal, includeLower, includeUpper)
-		  {
-			  this.Field = field;
-			  this.Parser = parser;
-			  this.LowerVal = lowerVal;
-			  this.UpperVal = upperVal;
-			  this.IncludeLower = includeLower;
-			  this.IncludeUpper = includeUpper;
-		  }
-
-		  public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
-		  {
-			// we transform the floating point numbers to sortable integers
-			// using NumericUtils to easier find the next bigger/lower value
-			double inclusiveLowerPoint, inclusiveUpperPoint;
-			if (LowerVal != null)
-			{
-			  double f = (double)LowerVal;
-			  if (!IncludeUpper && f > 0.0 && double.IsInfinity(f))
-			  {
-				return null;
-			  }
-			  long i = NumericUtils.DoubleToSortableLong(f);
-			  inclusiveLowerPoint = NumericUtils.SortableLongToDouble(IncludeLower ? i : (i + 1L));
-			}
-			else
-			{
-			  inclusiveLowerPoint = double.NegativeInfinity;
-			}
-			if (UpperVal != null)
-			{
-			  double f = (double)UpperVal;
-			  if (!IncludeUpper && f < 0.0 && double.IsInfinity(f))
-			  {
-				return null;
-			  }
-			  long i = NumericUtils.DoubleToSortableLong(f);
-			  inclusiveUpperPoint = NumericUtils.SortableLongToDouble(IncludeUpper ? i : (i - 1L));
-			}
-			else
-			{
-			  inclusiveUpperPoint = double.PositiveInfinity;
-			}
-
-			if (inclusiveLowerPoint > inclusiveUpperPoint)
-			{
-			  return null;
-			}
-
-            FieldCache_Fields.Doubles values = FieldCache_Fields.DEFAULT.GetDoubles((context.AtomicReader), Field, (FieldCache_Fields.IDoubleParser)Parser, false);
-			// ignore deleted docs if range doesn't contain 0
-			return new FieldCacheDocIdSetAnonymousInnerClassHelper8(this, context.Reader.MaxDoc, acceptDocs, inclusiveLowerPoint, inclusiveUpperPoint, values);
-		  }
-
-		  private class FieldCacheDocIdSetAnonymousInnerClassHelper8 : FieldCacheDocIdSet
-		  {
-			  private readonly FieldCacheRangeFilterAnonymousInnerClassHelper8 OuterInstance;
-
-			  private double InclusiveLowerPoint;
-			  private double InclusiveUpperPoint;
-              private FieldCache_Fields.Doubles Values;
-
-              public FieldCacheDocIdSetAnonymousInnerClassHelper8(FieldCacheRangeFilterAnonymousInnerClassHelper8 outerInstance, int maxDoc, Bits acceptDocs, double inclusiveLowerPoint, double inclusiveUpperPoint, FieldCache_Fields.Doubles values)
-                  : base(maxDoc, acceptDocs)
-			  {
-                  this.OuterInstance = outerInstance;
-				  this.InclusiveLowerPoint = inclusiveLowerPoint;
-				  this.InclusiveUpperPoint = inclusiveUpperPoint;
-				  this.Values = values;
-			  }
-
-			  protected internal override bool MatchDoc(int doc)
-			  {
-				double value = Values.Get(doc);
-				return value >= InclusiveLowerPoint && value <= InclusiveUpperPoint;
-			  }
-		  }
-	  }*/
 
+
+        // From line 516 in Lucene
         public override sealed string ToString()
         {
             StringBuilder sb = (new StringBuilder(field)).Append(":");
@@ -1783,14 +933,14 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Returns <code>true</code> if the lower endpoint is inclusive </summary>
+        /// Returns <c>true</c> if the lower endpoint is inclusive </summary>
         public virtual bool IncludesLower
         {
             get { return includeLower; }
         }
 
         /// <summary>
-        /// Returns <code>true</code> if the upper endpoint is inclusive </summary>
+        /// Returns <c>true</c> if the upper endpoint is inclusive </summary>
         public virtual bool IncludesUpper
         {
             get { return includeUpper; }
@@ -1817,7 +967,7 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
-        /// Returns the current numeric parser ({@code null} for {@code T} is {@code String}} </summary>
+        /// Returns the current numeric parser (<c>null</c> for <typeparamref name="T"/> is <see cref="string"/>) </summary>
         public virtual FieldCache.IParser Parser
         {
             get

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/FieldCacheRewriteMethod.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldCacheRewriteMethod.cs b/src/Lucene.Net/Search/FieldCacheRewriteMethod.cs
index d222765..e51248b 100644
--- a/src/Lucene.Net/Search/FieldCacheRewriteMethod.cs
+++ b/src/Lucene.Net/Search/FieldCacheRewriteMethod.cs
@@ -31,9 +31,10 @@ namespace Lucene.Net.Search
     using TermsEnum = Lucene.Net.Index.TermsEnum;
 
     /// <summary>
-    /// Rewrites MultiTermQueries into a filter, using the FieldCache for term enumeration.
-    /// <p>
-    /// this can be used to perform these queries against an unindexed docvalues field.
+    /// Rewrites <see cref="MultiTermQuery"/>s into a filter, using the <see cref="IFieldCache"/> for term enumeration.
+    /// <para/>
+    /// This can be used to perform these queries against an unindexed docvalues field.
+    /// <para/>
     /// @lucene.experimental
     /// </summary>
 #if FEATURE_SERIALIZABLE
@@ -56,7 +57,7 @@ namespace Lucene.Net.Search
             protected internal readonly MultiTermQuery m_query;
 
             /// <summary>
-            /// Wrap a <seealso cref="MultiTermQuery"/> as a Filter.
+            /// Wrap a <see cref="MultiTermQuery"/> as a Filter.
             /// </summary>
             protected internal MultiTermQueryFieldCacheWrapperFilter(MultiTermQuery query)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/FieldCacheTermsFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldCacheTermsFilter.cs b/src/Lucene.Net/Search/FieldCacheTermsFilter.cs
index 24c018c..9998866 100644
--- a/src/Lucene.Net/Search/FieldCacheTermsFilter.cs
+++ b/src/Lucene.Net/Search/FieldCacheTermsFilter.cs
@@ -26,71 +26,71 @@ namespace Lucene.Net.Search
     using SortedDocValues = Lucene.Net.Index.SortedDocValues;
 
     /// <summary>
-    /// A <seealso cref="Filter"/> that only accepts documents whose single
+    /// A <see cref="Filter"/> that only accepts documents whose single
     /// term value in the specified field is contained in the
     /// provided set of allowed terms.
     ///
-    /// <p/>
+    /// <para/>
     ///
-    /// this is the same functionality as TermsFilter (from
+    /// This is the same functionality as TermsFilter (from
     /// queries/), except this filter requires that the
     /// field contains only a single term for all documents.
     /// Because of drastically different implementations, they
     /// also have different performance characteristics, as
     /// described below.
     ///
-    /// <p/>
+    /// <para/>
     ///
     /// The first invocation of this filter on a given field will
-    /// be slower, since a <seealso cref="SortedDocValues"/> must be
+    /// be slower, since a <see cref="SortedDocValues"/> must be
     /// created.  Subsequent invocations using the same field
     /// will re-use this cache.  However, as with all
-    /// functionality based on <seealso cref="FieldCache"/>, persistent RAM
+    /// functionality based on <see cref="IFieldCache"/>, persistent RAM
     /// is consumed to hold the cache, and is not freed until the
-    /// <seealso cref="IndexReader"/> is closed.  In contrast, TermsFilter
+    /// <see cref="Index.IndexReader"/> is disposed.  In contrast, TermsFilter
     /// has no persistent RAM consumption.
     ///
     ///
-    /// <p/>
+    /// <para/>
     ///
     /// With each search, this filter translates the specified
-    /// set of Terms into a private <seealso cref="FixedBitSet"/> keyed by
-    /// term number per unique <seealso cref="IndexReader"/> (normally one
+    /// set of <see cref="Index.Terms"/> into a private <see cref="FixedBitSet"/> keyed by
+    /// term number per unique <see cref="Index.IndexReader"/> (normally one
     /// reader per segment).  Then, during matching, the term
     /// number for each docID is retrieved from the cache and
-    /// then checked for inclusion using the <seealso cref="FixedBitSet"/>.
+    /// then checked for inclusion using the <see cref="FixedBitSet"/>.
     /// Since all testing is done using RAM resident data
     /// structures, performance should be very fast, most likely
     /// fast enough to not require further caching of the
-    /// DocIdSet for each possible combination of terms.
+    /// <see cref="DocIdSet"/> for each possible combination of terms.
     /// However, because docIDs are simply scanned linearly, an
     /// index with a great many small documents may find this
     /// linear scan too costly.
     ///
-    /// <p/>
+    /// <para/>
     ///
-    /// In contrast, TermsFilter builds up an <seealso cref="FixedBitSet"/>,
+    /// In contrast, TermsFilter builds up a <see cref="FixedBitSet"/>,
     /// keyed by docID, every time it's created, by enumerating
-    /// through all matching docs using <seealso cref="DocsEnum"/> to seek
+    /// through all matching docs using <see cref="Index.DocsEnum"/> to seek
     /// and scan through each term's docID list.  While there is
     /// no linear scan of all docIDs, besides the allocation of
-    /// the underlying array in the <seealso cref="FixedBitSet"/>, this
+    /// the underlying array in the <see cref="FixedBitSet"/>, this
     /// approach requires a number of "disk seeks" in proportion
     /// to the number of terms, which can be exceptionally costly
     /// when there are cache misses in the OS's IO cache.
     ///
-    /// <p/>
+    /// <para/>
     ///
     /// Generally, this filter will be slower on the first
     /// invocation for a given field, but subsequent invocations,
-    /// even if you change the allowed set of Terms, should be
+    /// even if you change the allowed set of <see cref="Index.Terms"/>, should be
     /// faster than TermsFilter, especially as the number of
-    /// Terms being matched increases.  If you are matching only
+    /// <see cref="Index.Terms"/> being matched increases.  If you are matching only
     /// a very small number of terms, and those terms in turn
     /// match a very small number of documents, TermsFilter may
     /// perform faster.
     ///
-    /// <p/>
+    /// <para/>
     ///
     /// Which filter is best is very application dependent.
     /// </summary>


Mime
View raw message