You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/06/06 00:11:41 UTC
[08/48] lucenenet git commit: Lucene.Net.Search: Fixed up
documentation comments
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/FieldComparator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldComparator.cs b/src/Lucene.Net/Search/FieldComparator.cs
index dd7b64e..1ff68b3 100644
--- a/src/Lucene.Net/Search/FieldComparator.cs
+++ b/src/Lucene.Net/Search/FieldComparator.cs
@@ -30,66 +30,63 @@ namespace Lucene.Net.Search
using SortedDocValues = Lucene.Net.Index.SortedDocValues;
/// <summary>
- /// Expert: a FieldComparer compares hits so as to determine their
- /// sort order when collecting the top results with {@link
- /// TopFieldCollector}. The concrete public FieldComparer
- /// classes here correspond to the SortField types.
+ /// Expert: a <see cref="FieldComparer"/> compares hits so as to determine their
+ /// sort order when collecting the top results with
+ /// <see cref="TopFieldCollector"/>. The concrete public <see cref="FieldComparer"/>
+ /// classes here correspond to the <see cref="SortField"/> types.
///
- /// <p>this API is designed to achieve high performance
- /// sorting, by exposing a tight interaction with {@link
- /// FieldValueHitQueue} as it visits hits. Whenever a hit is
+ /// <para>This API is designed to achieve high performance
+ /// sorting, by exposing a tight interaction with
+ /// <see cref="FieldValueHitQueue"/> as it visits hits. Whenever a hit is
/// competitive, it's enrolled into a virtual slot, which is
- /// an int ranging from 0 to numHits-1. The {@link
- /// FieldComparer} is made aware of segment transitions
+ /// an <see cref="int"/> ranging from 0 to numHits-1. The
+ /// <see cref="FieldComparer"/> is made aware of segment transitions
/// during searching in case any internal state it's tracking
- /// needs to be recomputed during these transitions.</p>
+ /// needs to be recomputed during these transitions.</para>
///
- /// <p>A comparer must define these functions:</p>
+ /// <para>A comparer must define these functions:</para>
///
- /// <ul>
+ /// <list type="bullet">
///
- /// <li> <seealso cref="#compare"/> Compare a hit at 'slot a'
- /// with hit 'slot b'.
+ /// <item><term><see cref="Compare(int, int)"/></term> <description> Compare a hit at 'slot a'
+ /// with hit 'slot b'.</description></item>
///
- /// <li> <seealso cref="#setBottom"/> this method is called by
- /// <seealso cref="FieldValueHitQueue"/> to notify the
- /// FieldComparer of the current weakest ("bottom")
+ /// <item><term><see cref="SetBottom(int)"/></term> <description>This method is called by
+ /// <see cref="FieldValueHitQueue"/> to notify the
+ /// <see cref="FieldComparer"/> of the current weakest ("bottom")
/// slot. Note that this slot may not hold the weakest
/// value according to your comparer, in cases where
/// your comparer is not the primary one (ie, is only
- /// used to break ties from the comparers before it).
+ /// used to break ties from the comparers before it).</description></item>
///
- /// <li> <seealso cref="#compareBottom"/> Compare a new hit (docID)
- /// against the "weakest" (bottom) entry in the queue.
+ /// <item><term><see cref="CompareBottom(int)"/></term> <description>Compare a new hit (docID)
+ /// against the "weakest" (bottom) entry in the queue.</description></item>
///
- /// <li> <seealso cref="#setTopValue"/> this method is called by
- /// <seealso cref="TopFieldCollector"/> to notify the
- /// FieldComparer of the top most value, which is
- /// used by future calls to <seealso cref="#compareTop"/>.
+ /// <item><term><see cref="SetTopValue(object)"/></term> <description>This method is called by
+ /// <see cref="TopFieldCollector"/> to notify the
+ /// <see cref="FieldComparer"/> of the top most value, which is
+ /// used by future calls to <see cref="CompareTop(int)"/>.</description></item>
///
- /// <li> <seealso cref="#compareBottom"/> Compare a new hit (docID)
- /// against the "weakest" (bottom) entry in the queue.
- ///
- /// <li> <seealso cref="#compareTop"/> Compare a new hit (docID)
+ /// <item><term><see cref="CompareTop(int)"/></term> <description>Compare a new hit (docID)
/// against the top value previously set by a call to
- /// <seealso cref="#setTopValue"/>.
+ /// <see cref="SetTopValue(object)"/>.</description></item>
///
- /// <li> <seealso cref="#copy"/> Installs a new hit into the
- /// priority queue. The <seealso cref="FieldValueHitQueue"/>
- /// calls this method when a new hit is competitive.
+ /// <item><term><see cref="Copy(int, int)"/></term> <description>Installs a new hit into the
+ /// priority queue. The <see cref="FieldValueHitQueue"/>
+ /// calls this method when a new hit is competitive.</description></item>
///
- /// <li> <seealso cref="#setNextReader(AtomicReaderContext)"/> Invoked
+ /// <item><term><see cref="SetNextReader(AtomicReaderContext)"/></term> <description>Invoked
/// when the search is switching to the next segment.
/// You may need to update internal state of the
/// comparer, for example retrieving new values from
- /// the <seealso cref="IFieldCache"/>.
- ///
- /// <li> <seealso cref="#value"/> Return the sort value stored in
- /// the specified slot. this is only called at the end
- /// of the search, in order to populate {@link
- /// FieldDoc#fields} when returning the top results.
- /// </ul>
+ /// the <see cref="IFieldCache"/>.</description></item>
///
+ /// <item><term><see cref="FieldComparer.this[int]"/></term> <description>Return the sort value stored in
+ /// the specified slot. This is only called at the end
+ /// of the search, in order to populate
+ /// <see cref="FieldDoc.Fields"/> when returning the top results.</description></item>
+ /// </list>
+ /// <para/>
/// @lucene.experimental
/// </summary>
#if FEATURE_SERIALIZABLE
@@ -98,93 +95,93 @@ namespace Lucene.Net.Search
public abstract class FieldComparer<T> : FieldComparer
{
/// <summary>
- /// Compare hit at slot1 with hit at slot2.
+ /// Compare hit at <paramref name="slot1"/> with hit at <paramref name="slot2"/>.
/// </summary>
/// <param name="slot1"> first slot to compare </param>
/// <param name="slot2"> second slot to compare </param>
- /// <returns> any N < 0 if slot2's value is sorted after
- /// slot1, any N > 0 if the slot2's value is sorted before
- /// slot1 and 0 if they are equal </returns>
+ /// <returns> any N < 0 if <paramref name="slot2"/>'s value is sorted after
+ /// <paramref name="slot1"/>, any N > 0 if the <paramref name="slot2"/>'s value is sorted before
+ /// <paramref name="slot1"/> and 0 if they are equal </returns>
public abstract override int Compare(int slot1, int slot2);
/// <summary>
/// Set the bottom slot, ie the "weakest" (sorted last)
- /// entry in the queue. When <seealso cref="#compareBottom"/> is
- /// called, you should compare against this slot. this
- /// will always be called before <seealso cref="#compareBottom"/>.
+ /// entry in the queue. When <see cref="CompareBottom(int)"/> is
+ /// called, you should compare against this slot. This
+ /// will always be called before <see cref="CompareBottom(int)"/>.
/// </summary>
/// <param name="slot"> the currently weakest (sorted last) slot in the queue </param>
public abstract override void SetBottom(int slot);
/// <summary>
- /// Record the top value, for future calls to {@link
- /// #compareTop}. this is only called for searches that
- /// use searchAfter (deep paging), and is called before any
- /// calls to <seealso cref="#setNextReader"/>.
+ /// Record the top value, for future calls to
+ /// <see cref="CompareTop(int)"/>. This is only called for searches that
+ /// use SearchAfter (deep paging), and is called before any
+ /// calls to <see cref="SetNextReader(AtomicReaderContext)"/>.
/// </summary>
public abstract override void SetTopValue(object value);
/// <summary>
- /// Compare the bottom of the queue with this doc. this will
- /// only invoked after setBottom has been called. this
- /// should return the same result as {@link
- /// #compare(int,int)}} as if bottom were slot1 and the new
+ /// Compare the bottom of the queue with this doc. This will
+ /// only invoked after <see cref="SetBottom(int)"/> has been called. This
+ /// should return the same result as
+ /// <see cref="Compare(int, int)"/> as if bottom were slot1 and the new
/// document were slot 2.
///
- /// <p>For a search that hits many results, this method
+ /// <para>For a search that hits many results, this method
/// will be the hotspot (invoked by far the most
- /// frequently).</p>
+ /// frequently).</para>
/// </summary>
- /// <param name="doc"> that was hit </param>
- /// <returns> any N < 0 if the doc's value is sorted after
- /// the bottom entry (not competitive), any N > 0 if the
+ /// <param name="doc"> Doc that was hit </param>
+ /// <returns> Any N < 0 if the doc's value is sorted after
+ /// the bottom entry (not competitive), any N > 0 if the
/// doc's value is sorted before the bottom entry and 0 if
/// they are equal. </returns>
public abstract override int CompareBottom(int doc);
/// <summary>
- /// Compare the top value with this doc. this will
- /// only invoked after setTopValue has been called. this
- /// should return the same result as {@link
- /// #compare(int,int)}} as if topValue were slot1 and the new
- /// document were slot 2. this is only called for searches that
- /// use searchAfter (deep paging).
+ /// Compare the top value with this doc. This will
+ /// only invoked after <see cref="SetTopValue(object)"/> has been called. This
+ /// should return the same result as
+ /// <see cref="Compare(int, int)"/> as if topValue were slot1 and the new
+ /// document were slot 2. This is only called for searches that
+ /// use SearchAfter (deep paging).
/// </summary>
- /// <param name="doc"> that was hit </param>
- /// <returns> any N < 0 if the doc's value is sorted after
- /// the bottom entry (not competitive), any N > 0 if the
+ /// <param name="doc"> Doc that was hit </param>
+ /// <returns> Any N < 0 if the doc's value is sorted after
+ /// the bottom entry (not competitive), any N > 0 if the
/// doc's value is sorted before the bottom entry and 0 if
/// they are equal. </returns>
public abstract override int CompareTop(int doc);
/// <summary>
- /// this method is called when a new hit is competitive.
+ /// This method is called when a new hit is competitive.
/// You should copy any state associated with this document
/// that will be required for future comparisons, into the
/// specified slot.
/// </summary>
- /// <param name="slot"> which slot to copy the hit to </param>
- /// <param name="doc"> docID relative to current reader </param>
+ /// <param name="slot"> Which slot to copy the hit to </param>
+ /// <param name="doc"> DocID relative to current reader </param>
public abstract override void Copy(int slot, int doc);
/// <summary>
- /// Set a new <seealso cref="AtomicReaderContext"/>. All subsequent docIDs are relative to
+ /// Set a new <see cref="AtomicReaderContext"/>. All subsequent docIDs are relative to
/// the current reader (you must add docBase if you need to
/// map it to a top-level docID).
/// </summary>
- /// <param name="context"> current reader context </param>
- /// <returns> the comparer to use for this segment; most
+ /// <param name="context"> Current reader context </param>
+ /// <returns> The comparer to use for this segment; most
/// comparers can just return "this" to reuse the same
/// comparer across segments </returns>
- /// <exception cref="IOException"> if there is a low-level IO error </exception>
+ /// <exception cref="System.IO.IOException"> If there is a low-level IO error </exception>
public abstract override FieldComparer SetNextReader(AtomicReaderContext context);
/// <summary>
/// Returns -1 if first is less than second. Default
- /// impl to assume the type implements Comparable and
- /// invoke .compareTo; be sure to override this method if
- /// your FieldComparer's type isn't a Comparable or
- /// if your values may sometimes be null
+ /// impl to assume the type implements <see cref="IComparable{T}"/> and
+ /// invoke <see cref="IComparable{T}.CompareTo(T)"/>; be sure to override this method if
+ /// your FieldComparer's type isn't a <see cref="IComparable{T}"/> or
+ /// if your values may sometimes be <c>null</c>
/// </summary>
public virtual int CompareValues(T first, T second)
{
@@ -204,6 +201,13 @@ namespace Lucene.Net.Search
}
}
+ /// <summary>
+ /// Returns -1 if first is less than second. Default
+ /// impl to assume the type implements <see cref="IComparable{T}"/> and
+ /// invoke <see cref="IComparable{T}.CompareTo(T)"/>; be sure to override this method if
+ /// your FieldComparer's type isn't a <see cref="IComparable{T}"/> or
+ /// if your values may sometimes be <c>null</c>
+ /// </summary>
public override int CompareValues(object first, object second)
{
return CompareValues((T)first, (T)second);
@@ -221,92 +225,92 @@ namespace Lucene.Net.Search
//Set up abstract methods
/// <summary>
- /// Compare hit at slot1 with hit at slot2.
+ /// Compare hit at <paramref name="slot1"/> with hit at <paramref name="slot2"/>.
/// </summary>
/// <param name="slot1"> first slot to compare </param>
/// <param name="slot2"> second slot to compare </param>
- /// <returns> any N < 0 if slot2's value is sorted after
- /// slot1, any N > 0 if the slot2's value is sorted before
- /// slot1 and 0 if they are equal </returns>
+ /// <returns> any N < 0 if <paramref name="slot2"/>'s value is sorted after
+ /// <paramref name="slot1"/>, any N > 0 if the <paramref name="slot2"/>'s value is sorted before
+ /// <paramref name="slot1"/> and 0 if they are equal </returns>
public abstract int Compare(int slot1, int slot2);
/// <summary>
/// Set the bottom slot, ie the "weakest" (sorted last)
- /// entry in the queue. When <seealso cref="#compareBottom"/> is
- /// called, you should compare against this slot. this
- /// will always be called before <seealso cref="#compareBottom"/>.
+ /// entry in the queue. When <see cref="CompareBottom(int)"/> is
+ /// called, you should compare against this slot. This
+ /// will always be called before <see cref="CompareBottom(int)"/>.
/// </summary>
- /// <param name="slot"> the currently weakest (sorted last) slot in the queue </param>
+ /// <param name="slot"> The currently weakest (sorted last) slot in the queue </param>
public abstract void SetBottom(int slot);
/// <summary>
- /// Record the top value, for future calls to {@link
- /// #compareTop}. this is only called for searches that
- /// use searchAfter (deep paging), and is called before any
- /// calls to <seealso cref="#setNextReader"/>.
+ /// Record the top value, for future calls to
+ /// <see cref="CompareTop(int)"/>. This is only called for searches that
+ /// use SearchAfter (deep paging), and is called before any
+ /// calls to <see cref="SetNextReader(AtomicReaderContext)"/>.
/// </summary>
public abstract void SetTopValue(object value);
/// <summary>
- /// Compare the bottom of the queue with this doc. this will
- /// only invoked after setBottom has been called. this
- /// should return the same result as {@link
- /// #compare(int,int)}} as if bottom were slot1 and the new
+ /// Compare the bottom of the queue with this doc. This will
+ /// only invoked after setBottom has been called. This
+ /// should return the same result as
+ /// <see cref="Compare(int, int)"/> as if bottom were slot1 and the new
/// document were slot 2.
///
- /// <p>For a search that hits many results, this method
+ /// <para>For a search that hits many results, this method
/// will be the hotspot (invoked by far the most
- /// frequently).</p>
+ /// frequently).</para>
/// </summary>
- /// <param name="doc"> that was hit </param>
- /// <returns> any N < 0 if the doc's value is sorted after
- /// the bottom entry (not competitive), any N > 0 if the
+ /// <param name="doc"> Doc that was hit </param>
+ /// <returns> Any N < 0 if the doc's value is sorted after
+ /// the bottom entry (not competitive), any N > 0 if the
/// doc's value is sorted before the bottom entry and 0 if
/// they are equal. </returns>
public abstract int CompareBottom(int doc);
/// <summary>
- /// Compare the top value with this doc. this will
- /// only invoked after setTopValue has been called. this
- /// should return the same result as {@link
- /// #compare(int,int)}} as if topValue were slot1 and the new
- /// document were slot 2. this is only called for searches that
- /// use searchAfter (deep paging).
+ /// Compare the top value with this doc. This will
+ /// only invoked after <see cref="SetTopValue(object)"/> has been called. This
+ /// should return the same result as
+ /// <see cref="Compare(int, int)"/> as if topValue were slot1 and the new
+ /// document were slot 2. This is only called for searches that
+ /// use SearchAfter (deep paging).
/// </summary>
- /// <param name="doc"> that was hit </param>
- /// <returns> any N < 0 if the doc's value is sorted after
- /// the bottom entry (not competitive), any N > 0 if the
+ /// <param name="doc"> Doc that was hit </param>
+ /// <returns> Any N < 0 if the doc's value is sorted after
+ /// the bottom entry (not competitive), any N > 0 if the
/// doc's value is sorted before the bottom entry and 0 if
/// they are equal. </returns>
public abstract int CompareTop(int doc);
/// <summary>
- /// this method is called when a new hit is competitive.
+ /// This method is called when a new hit is competitive.
/// You should copy any state associated with this document
/// that will be required for future comparisons, into the
/// specified slot.
/// </summary>
- /// <param name="slot"> which slot to copy the hit to </param>
- /// <param name="doc"> docID relative to current reader </param>
+ /// <param name="slot"> Which slot to copy the hit to </param>
+ /// <param name="doc"> DocID relative to current reader </param>
public abstract void Copy(int slot, int doc);
/// <summary>
- /// Set a new <seealso cref="AtomicReaderContext"/>. All subsequent docIDs are relative to
+ /// Set a new <see cref="AtomicReaderContext"/>. All subsequent docIDs are relative to
/// the current reader (you must add docBase if you need to
/// map it to a top-level docID).
/// </summary>
- /// <param name="context"> current reader context </param>
- /// <returns> the comparer to use for this segment; most
+ /// <param name="context"> Current reader context </param>
+ /// <returns> The comparer to use for this segment; most
/// comparers can just return "this" to reuse the same
/// comparer across segments </returns>
- /// <exception cref="IOException"> if there is a low-level IO error </exception>
+ /// <exception cref="System.IO.IOException"> if there is a low-level IO error </exception>
public abstract FieldComparer SetNextReader(AtomicReaderContext context);
/// <summary>
- /// Sets the Scorer to use in case a document's score is
- /// needed.
+ /// Sets the <see cref="Scorer"/> to use in case a document's score is
+ /// needed.
/// </summary>
- /// <param name="scorer"> Scorer instance that you should use to
+ /// <param name="scorer"> <see cref="Scorer"/> instance that you should use to
/// obtain the current hit's score, if necessary. </param>
public virtual void SetScorer(Scorer scorer)
{
@@ -318,15 +322,13 @@ namespace Lucene.Net.Search
/// Return the actual value in the slot.
/// LUCENENET NOTE: This was value(int) in Lucene.
/// </summary>
- /// <param name="slot"> the value </param>
- /// <returns> value in this slot </returns>
+ /// <param name="slot"> The value </param>
+ /// <returns> Value in this slot </returns>
public abstract IComparable this[int slot] { get; }
internal static readonly IComparer<double> SIGNED_ZERO_COMPARER = new SignedZeroComparer();
-
-
/// <summary>
/// Base FieldComparer class for numeric types
/// </summary>
@@ -366,8 +368,8 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Parses field's values as byte (using {@link
- /// FieldCache#getBytes} and sorts by ascending value
+ /// Parses field's values as <see cref="byte"/> (using
+ /// <see cref="IFieldCache.GetBytes(Index.AtomicReader, string, FieldCache.IByteParser, bool)"/> and sorts by ascending value
/// </summary>
[Obsolete, CLSCompliant(false)] // LUCENENET NOTE: marking non-CLS compliant because of sbyte - it is obsolete, anyway
#if FEATURE_SERIALIZABLE
@@ -457,8 +459,8 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Parses field's values as double (using {@link
- /// FieldCache#getDoubles} and sorts by ascending value
+ /// Parses field's values as <see cref="double"/> (using
+ /// <see cref="IFieldCache.GetDoubles(Index.AtomicReader, string, FieldCache.IDoubleParser, bool)"/> and sorts by ascending value
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
@@ -559,8 +561,8 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Parses field's values as float (using {@link
- /// FieldCache#getFloats} and sorts by ascending value
+ /// Parses field's values as <see cref="float"/> (using
+ /// <see cref="IFieldCache.GetSingles(Index.AtomicReader, string, FieldCache.ISingleParser, bool)"/> and sorts by ascending value
/// <para/>
/// NOTE: This was FloatComparator in Lucene
/// </summary>
@@ -664,8 +666,8 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Parses field's values as short (using {@link
- /// FieldCache#getShorts} and sorts by ascending value
+ /// Parses field's values as <see cref="short"/> (using
+ /// <see cref="IFieldCache.GetInt16s(Index.AtomicReader, string, FieldCache.IInt16Parser, bool)"/> and sorts by ascending value
/// <para/>
/// NOTE: This was ShortComparator in Lucene
/// </summary>
@@ -758,8 +760,8 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Parses field's values as int (using {@link
- /// FieldCache#getInts} and sorts by ascending value
+ /// Parses field's values as <see cref="int"/> (using
+ /// <see cref="IFieldCache.GetInt32s(Index.AtomicReader, string, FieldCache.IInt32Parser, bool)"/> and sorts by ascending value
/// <para/>
/// NOTE: This was IntComparator in Lucene
/// </summary>
@@ -848,8 +850,8 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Parses field's values as long (using {@link
- /// FieldCache#getLongs} and sorts by ascending value
+ /// Parses field's values as <see cref="long"/> (using
+ /// <see cref="IFieldCache.GetInt64s(Index.AtomicReader, string, FieldCache.IInt64Parser, bool)"/> and sorts by ascending value
/// <para/>
/// NOTE: This was LongComparator in Lucene
/// </summary>
@@ -944,11 +946,11 @@ namespace Lucene.Net.Search
/// <summary>
/// Sorts by descending relevance. NOTE: if you are
- /// sorting only by descending relevance and then
- /// secondarily by ascending docID, performance is faster
- /// using <seealso cref="TopScoreDocCollector"/> directly (which {@link
- /// IndexSearcher#search} uses when no <seealso cref="Sort"/> is
- /// specified).
+ /// sorting only by descending relevance and then
+ /// secondarily by ascending docID, performance is faster
+ /// using <see cref="TopScoreDocCollector"/> directly (which all overloads of
+ /// <see cref="IndexSearcher.Search(Query, int)"/> use when no <see cref="Sort"/> is
+ /// specified).
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
@@ -1101,63 +1103,90 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Sorts by field's natural Term sort order, using
- /// ordinals. this is functionally equivalent to {@link
- /// Lucene.Net.Search.FieldComparer.TermValComparer}, but it first resolves the string
- /// to their relative ordinal positions (using the index
- /// returned by <seealso cref="IFieldCache#getTermsIndex"/>), and
- /// does most comparisons using the ordinals. For medium
- /// to large results, this comparer will be much faster
- /// than <seealso cref="Lucene.Net.Search.FieldComparer.TermValComparer"/>. For very small
- /// result sets it may be slower.
+ /// Sorts by field's natural <see cref="Index.Term"/> sort order, using
+ /// ordinals. This is functionally equivalent to
+ /// <see cref="Lucene.Net.Search.FieldComparer.TermValComparer"/>, but it first resolves the string
+ /// to their relative ordinal positions (using the index
+ /// returned by <see cref="IFieldCache.GetTermsIndex(Index.AtomicReader, string, float)"/>), and
+ /// does most comparisons using the ordinals. For medium
+ /// to large results, this comparer will be much faster
+ /// than <see cref="Lucene.Net.Search.FieldComparer.TermValComparer"/>. For very small
+ /// result sets it may be slower.
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
public class TermOrdValComparer : FieldComparer<BytesRef>
{
- /* Ords for each slot.
- @lucene.internal */
+ /// <summary>
+ /// Ords for each slot.
+ /// <para/>
+ /// @lucene.internal
+ /// </summary>
internal readonly int[] ords;
- /* Values for each slot.
- @lucene.internal */
+ /// <summary>
+ /// Values for each slot.
+ /// <para/>
+ /// @lucene.internal
+ /// </summary>
internal readonly BytesRef[] values;
- /* Which reader last copied a value into the slot. When
- we compare two slots, we just compare-by-ord if the
- readerGen is the same; else we must compare the
- values (slower).
- @lucene.internal */
+ /// <summary>
+ /// Which reader last copied a value into the slot. When
+ /// we compare two slots, we just compare-by-ord if the
+ /// readerGen is the same; else we must compare the
+ /// values(slower).
+ /// <para/>
+ /// @lucene.internal
+ /// </summary>
internal readonly int[] readerGen;
- /* Gen of current reader we are on.
- @lucene.internal */
+ /// <summary>
+ /// Gen of current reader we are on.
+ /// <para/>
+ /// @lucene.internal
+ /// </summary>
internal int currentReaderGen = -1;
- /* Current reader's doc ord/values.
- @lucene.internal */
+ /// <summary>
+ /// Current reader's doc ord/values.
+ /// <para/>
+ /// @lucene.internal
+ /// </summary>
internal SortedDocValues termsIndex;
internal readonly string field;
- /* Bottom slot, or -1 if queue isn't full yet
- @lucene.internal */
+ /// <summary>
+ /// Bottom slot, or -1 if queue isn't full yet
+ /// <para/>
+ /// @lucene.internal
+ /// </summary>
internal int bottomSlot = -1;
- /* Bottom ord (same as ords[bottomSlot] once bottomSlot
- is set). Cached for faster compares.
- @lucene.internal */
+ /// <summary>
+ /// Bottom ord (same as ords[bottomSlot] once bottomSlot
+ /// is set). Cached for faster compares.
+ /// <para/>
+ /// @lucene.internal
+ /// </summary>
internal int bottomOrd;
- /* True if current bottom slot matches the current
- reader.
- @lucene.internal */
+ /// <summary>
+ /// True if current bottom slot matches the current
+ /// reader.
+ /// <para/>
+ /// @lucene.internal
+ /// </summary>
internal bool bottomSameReader;
- /* Bottom value (same as values[bottomSlot] once
- bottomSlot is set). Cached for faster compares.
- @lucene.internal */
+ /// <summary>
+ /// Bottom value (same as values[bottomSlot] once
+ /// bottomSlot is set). Cached for faster compares.
+ /// <para/>
+ /// @lucene.internal
+ /// </summary>
internal BytesRef bottomValue;
/// <summary>
@@ -1188,8 +1217,8 @@ namespace Lucene.Net.Search
/// <summary>
/// Creates this, with control over how missing values
- /// are sorted. Pass sortMissingLast=true to put
- /// missing values at the end.
+ /// are sorted. Pass true for <paramref name="sortMissingLast"/> to put
+ /// missing values at the end.
/// </summary>
public TermOrdValComparer(int numHits, string field, bool sortMissingLast)
{
@@ -1281,7 +1310,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Retrieves the SortedDocValues for the field in this segment </summary>
+ /// Retrieves the <see cref="SortedDocValues"/> for the field in this segment </summary>
protected virtual SortedDocValues GetSortedDocValues(AtomicReaderContext context, string field)
{
return FieldCache.DEFAULT.GetTermsIndex((context.AtomicReader), field);
@@ -1422,10 +1451,10 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Sorts by field's natural Term sort order. All
- /// comparisons are done using BytesRef.compareTo, which is
- /// slow for medium to large result sets but possibly
- /// very fast for very small results sets.
+ /// Sorts by field's natural <see cref="Index.Term"/> sort order. All
+ /// comparisons are done using <see cref="BytesRef.CompareTo(BytesRef)"/>, which is
+ /// slow for medium to large result sets but possibly
+ /// very fast for very small results sets.
/// </summary>
// TODO: should we remove this? who really uses it?
#if FEATURE_SERIALIZABLE
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/FieldComparatorSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldComparatorSource.cs b/src/Lucene.Net/Search/FieldComparatorSource.cs
index a4b864b..2fb448b 100644
--- a/src/Lucene.Net/Search/FieldComparatorSource.cs
+++ b/src/Lucene.Net/Search/FieldComparatorSource.cs
@@ -20,10 +20,9 @@ namespace Lucene.Net.Search
*/
/// <summary>
- /// Provides a <seealso cref="FieldComparer"/> for custom field sorting.
- ///
+ /// Provides a <see cref="FieldComparer"/> for custom field sorting.
+ /// <para/>
/// @lucene.experimental
- ///
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
@@ -35,8 +34,8 @@ namespace Lucene.Net.Search
/// </summary>
/// <param name="fieldname">
/// Name of the field to create comparer for. </param>
- /// <returns> FieldComparer. </returns>
- /// <exception cref="IOException">
+ /// <returns> <see cref="FieldComparer"/>. </returns>
+ /// <exception cref="System.IO.IOException">
/// If an error occurs reading the index. </exception>
public abstract FieldComparer NewComparer(string fieldname, int numHits, int sortPos, bool reversed);
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/FieldDoc.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldDoc.cs b/src/Lucene.Net/Search/FieldDoc.cs
index d4c3f55..9b6b7e3 100644
--- a/src/Lucene.Net/Search/FieldDoc.cs
+++ b/src/Lucene.Net/Search/FieldDoc.cs
@@ -23,23 +23,23 @@ namespace Lucene.Net.Search
*/
/// <summary>
- /// Expert: A ScoreDoc which also contains information about
+ /// Expert: A <see cref="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
/// of values for the document from the field(s) used to sort.
/// For example, if the sort criteria was to sort by fields
- /// "a", "b" then "c", the <code>fields</code> object array
+ /// "a", "b" then "c", the <c>fields</c> object array
/// will have three elements, corresponding respectively to
/// the term values for the document in fields "a", "b" and "c".
/// The class of each element in the array will be either
- /// Integer, Float or String depending on the type of values
+ /// <see cref="int"/>, <see cref="float"/> or <see cref="string"/> depending on the type of values
/// in the terms of each field.
///
- /// <p>Created: Feb 11, 2004 1:23:38 PM
- ///
+ /// <para/>Created: Feb 11, 2004 1:23:38 PM
+ /// <para/>
/// @since lucene 1.4 </summary>
- /// <seealso cref= ScoreDoc </seealso>
- /// <seealso cref= TopFieldDocs </seealso>
+ /// <seealso cref="ScoreDoc"/>
+ /// <seealso cref="TopFieldDocs"/>
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
@@ -48,11 +48,11 @@ namespace Lucene.Net.Search
/// <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 have been returned from
- /// the <code>value</code> method corresponding
+ /// <see cref="Sort"/> object. Each Object will have been returned from
+ /// the <see cref="FieldComparer.this[int]"/> method corresponding
/// FieldComparer used to sort this field. </summary>
- /// <seealso cref= Sort </seealso>
- /// <seealso cref= IndexSearcher#search(Query,Filter,int,Sort) </seealso>
+ /// <seealso cref="Sort"/>
+ /// <seealso cref="IndexSearcher.Search(Query,Filter,int,Sort)"/>
[WritableArray]
[SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
public object[] Fields
@@ -85,7 +85,9 @@ namespace Lucene.Net.Search
this.fields = fields;
}
- // A convenience method for debugging.
+ /// <summary>
+ /// A convenience method for debugging.
+ /// </summary>
public override string ToString()
{
// super.toString returns the doc and score information, so just add the
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/FieldValueFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldValueFilter.cs b/src/Lucene.Net/Search/FieldValueFilter.cs
index 906720a..90abf55 100644
--- a/src/Lucene.Net/Search/FieldValueFilter.cs
+++ b/src/Lucene.Net/Search/FieldValueFilter.cs
@@ -26,9 +26,9 @@ namespace Lucene.Net.Search
using MatchNoBits = Lucene.Net.Util.Bits.MatchNoBits;
/// <summary>
- /// A <seealso cref="Filter"/> that accepts all documents that have one or more values in a
- /// given field. this <seealso cref="Filter"/> request <seealso cref="IBits"/> from the
- /// <seealso cref="IFieldCache"/> and build the bits if not present.
+ /// A <see cref="Filter"/> that accepts all documents that have one or more values in a
+ /// given field. this <see cref="Filter"/> request <see cref="IBits"/> from the
+ /// <see cref="IFieldCache"/> and build the bits if not present.
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
@@ -39,22 +39,22 @@ namespace Lucene.Net.Search
private readonly bool negate;
/// <summary>
- /// Creates a new <seealso cref="FieldValueFilter"/>
+ /// Creates a new <see cref="FieldValueFilter"/>
/// </summary>
/// <param name="field">
- /// the field to filter </param>
+ /// The field to filter </param>
public FieldValueFilter(string field)
: this(field, false)
{
}
/// <summary>
- /// Creates a new <seealso cref="FieldValueFilter"/>
+ /// Creates a new <see cref="FieldValueFilter"/>
/// </summary>
/// <param name="field">
- /// the field to filter </param>
+ /// The field to filter </param>
/// <param name="negate">
- /// iff <code>true</code> all documents with no value in the given
+ /// If <c>true</c> all documents with no value in the given
/// field are accepted.
/// </param>
public FieldValueFilter(string field, bool negate)
@@ -65,15 +65,15 @@ namespace Lucene.Net.Search
/// <summary>
/// Returns the field this filter is applied on. </summary>
- /// <returns> the field this filter is applied on. </returns>
+ /// <returns> The field this filter is applied on. </returns>
public virtual string Field
{
get { return field; }
}
/// <summary>
- /// Returns <code>true</code> iff this filter is negated, otherwise <code>false</code> </summary>
- /// <returns> <code>true</code> iff this filter is negated, otherwise <code>false</code> </returns>
+ /// Returns <c>true</c> if this filter is negated, otherwise <c>false</c> </summary>
+ /// <returns> <c>true</c> if this filter is negated, otherwise <c>false</c> </returns>
public virtual bool Negate
{
get { return negate; }
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/FieldValueHitQueue.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldValueHitQueue.cs b/src/Lucene.Net/Search/FieldValueHitQueue.cs
index 439a755..b0d29ac 100644
--- a/src/Lucene.Net/Search/FieldValueHitQueue.cs
+++ b/src/Lucene.Net/Search/FieldValueHitQueue.cs
@@ -135,17 +135,15 @@ namespace Lucene.Net.Search
}
/// <summary> Creates a hit queue sorted by the given list of fields.
- ///
- /// <p/><b>NOTE</b>: The instances returned by this method
+ /// <para/><b>NOTE</b>: The instances returned by this method
/// pre-allocate a full array of length <c>numHits</c>.
- ///
/// </summary>
- /// <param name="fields">SortField array we are sorting by in priority order (highest
+ /// <param name="fields"><see cref="SortField"/> array we are sorting by in priority order (highest
/// priority first); cannot be <c>null</c> or empty
/// </param>
/// <param name="size">The number of hits to retain. Must be greater than zero.
/// </param>
- /// <throws> IOException </throws>
+ /// <exception cref="System.IO.IOException">If there is a low-level IO error</exception>
public static FieldValueHitQueue<T> Create<T>(SortField[] fields, int size)
where T : FieldValueHitQueue.Entry
{
@@ -167,13 +165,13 @@ namespace Lucene.Net.Search
/// <summary>
/// Expert: A hit queue for sorting by hits by terms in more than one field.
- /// Uses <code>FieldCache.DEFAULT</code> for maintaining
+ /// Uses <c>FieldCache.DEFAULT</c> for maintaining
/// internal term lookup tables.
- ///
+ /// <para/>
/// @lucene.experimental
/// @since 2.9 </summary>
- /// <seealso cref= IndexSearcher#search(Query,Filter,int,Sort) </seealso>
- /// <seealso cref= FieldCache </seealso>
+ /// <seealso cref="IndexSearcher.Search(Query,Filter,int,Sort)"/>
+ /// <seealso cref="FieldCache"/>
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
@@ -237,15 +235,15 @@ namespace Lucene.Net.Search
//public abstract bool LessThan(FieldValueHitQueue.Entry a, FieldValueHitQueue.Entry b);
/// <summary>
- /// Given a queue Entry, creates a corresponding FieldDoc
+ /// Given a queue <see cref="FieldValueHitQueue.Entry"/>, creates a corresponding <see cref="FieldDoc"/>
/// that contains the values used to sort the given document.
/// These values are not the raw values out of the index, but the internal
- /// representation of them. this is so the given search hit can be collated by
+ /// representation of them. This is so the given search hit can be collated by
/// a MultiSearcher with other search hits.
/// </summary>
- /// <param name="entry"> The Entry used to create a FieldDoc </param>
- /// <returns> The newly created FieldDoc </returns>
- /// <seealso cref= IndexSearcher#search(Query,Filter,int,Sort) </seealso>
+ /// <param name="entry"> The <see cref="FieldValueHitQueue.Entry"/> used to create a <see cref="FieldDoc"/> </param>
+ /// <returns> The newly created <see cref="FieldDoc"/> </returns>
+ /// <seealso cref="IndexSearcher.Search(Query,Filter,int,Sort)"/>
internal virtual FieldDoc FillFields(FieldValueHitQueue.Entry entry)
{
int n = m_comparers.Length;
@@ -259,7 +257,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Returns the SortFields being used by this hit queue. </summary>
+ /// Returns the <see cref="SortField"/>s being used by this hit queue. </summary>
[WritableArray]
[SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
internal virtual SortField[] Fields
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/Filter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Filter.cs b/src/Lucene.Net/Search/Filter.cs
index b2d7aa6..ad0d726 100644
--- a/src/Lucene.Net/Search/Filter.cs
+++ b/src/Lucene.Net/Search/Filter.cs
@@ -24,40 +24,40 @@ namespace Lucene.Net.Search
using IBits = Lucene.Net.Util.IBits;
/// <summary>
- /// Abstract base class for restricting which documents may
- /// be returned during searching.
+ /// Abstract base class for restricting which documents may
+ /// be returned during searching.
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
- public abstract class Filter
+ public abstract class Filter // LUCENENET TODO: API - Make static NewAnonymous() factory method with delegate method for GetDocIdSet()
{
/// <summary>
- /// Creates a <seealso cref="DocIdSet"/> enumerating the documents that should be
- /// permitted in search results. <b>NOTE:</b> null can be
- /// returned if no documents are accepted by this Filter.
- /// <p>
+ /// Creates a <see cref="DocIdSet"/> enumerating the documents that should be
+ /// permitted in search results. <b>NOTE:</b> <c>null</c> can be
+ /// returned if no documents are accepted by this <see cref="Filter"/>.
+ /// <para/>
/// Note: this method will be called once per segment in
- /// the index during searching. The returned <seealso cref="DocIdSet"/>
+ /// the index during searching. The returned <see cref="DocIdSet"/>
/// must refer to document IDs for that segment, not for
/// the top-level reader.
/// </summary>
- /// <param name="context"> a <seealso cref="AtomicReaderContext"/> instance opened on the index currently
+ /// <param name="context"> a <see cref="AtomicReaderContext"/> instance opened on the index currently
/// searched on. Note, it is likely that the provided reader info does not
/// represent the whole underlying index i.e. if the index has more than
/// one segment the given reader only represents a single segment.
/// The provided context is always an atomic context, so you can call
- /// <seealso cref="AtomicReader#fields()"/>
+ /// <see cref="AtomicReader.Fields"/>
/// on the context's reader, for example.
/// </param>
/// <param name="acceptDocs">
- /// Bits that represent the allowable docs to match (typically deleted docs
+ /// <see cref="IBits"/> that represent the allowable docs to match (typically deleted docs
/// but possibly filtering other documents)
/// </param>
- /// <returns> a DocIdSet that provides the documents which should be permitted or
- /// prohibited in search results. <b>NOTE:</b> <code>null</code> should be returned if
+ /// <returns> A <see cref="DocIdSet"/> that provides the documents which should be permitted or
+ /// prohibited in search results. <b>NOTE:</b> <c>null</c> should be returned if
/// the filter doesn't accept any documents otherwise internal optimization might not apply
- /// in the case an <i>empty</i> <seealso cref="DocIdSet"/> is returned. </returns>
+ /// in the case an <i>empty</i> <see cref="DocIdSet"/> is returned. </returns>
public abstract DocIdSet GetDocIdSet(AtomicReaderContext context, IBits acceptDocs);
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/FilteredDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FilteredDocIdSet.cs b/src/Lucene.Net/Search/FilteredDocIdSet.cs
index a528232..53e1a98 100644
--- a/src/Lucene.Net/Search/FilteredDocIdSet.cs
+++ b/src/Lucene.Net/Search/FilteredDocIdSet.cs
@@ -22,22 +22,22 @@ namespace Lucene.Net.Search
using IBits = Lucene.Net.Util.IBits;
/// <summary>
- /// Abstract decorator class for a DocIdSet implementation
+ /// Abstract decorator class for a <see cref="DocIdSet"/> implementation
/// that provides on-demand filtering/validation
- /// mechanism on a given DocIdSet.
+ /// mechanism on a given <see cref="DocIdSet"/>.
///
- /// <p/>
+ /// <para/>
///
/// Technically, this same functionality could be achieved
/// with ChainedFilter (under queries/), however the
/// benefit of this class is it never materializes the full
- /// bitset for the filter. Instead, the <seealso cref="#match"/>
+ /// bitset for the filter. Instead, the <see cref="Match(int)"/>
/// method is invoked on-demand, per docID visited during
/// searching. If you know few docIDs will be visited, and
- /// the logic behind <seealso cref="#match"/> is relatively costly,
+ /// the logic behind <see cref="Match(int)"/> is relatively costly,
/// this may be a better way to filter than ChainedFilter.
/// </summary>
- /// <seealso cref= DocIdSet </seealso>
+ /// <seealso cref="DocIdSet"/>
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
@@ -47,14 +47,14 @@ namespace Lucene.Net.Search
/// <summary>
/// Constructor. </summary>
- /// <param name="innerSet"> Underlying DocIdSet </param>
+ /// <param name="innerSet"> Underlying <see cref="DocIdSet"/> </param>
public FilteredDocIdSet(DocIdSet innerSet)
{
this.innerSet = innerSet;
}
/// <summary>
- /// this DocIdSet implementation is cacheable if the inner set is cacheable. </summary>
+ /// This <see cref="DocIdSet"/> implementation is cacheable if the inner set is cacheable. </summary>
public override bool IsCacheable
{
get
@@ -101,13 +101,13 @@ namespace Lucene.Net.Search
/// <summary>
/// Validation method to determine whether a docid should be in the result set. </summary>
/// <param name="docid"> docid to be tested </param>
- /// <returns> true if input docid should be in the result set, false otherwise. </returns>
+ /// <returns> <c>true</c> if input docid should be in the result set, false otherwise. </returns>
protected abstract bool Match(int docid);
/// <summary>
- /// Implementation of the contract to build a DocIdSetIterator. </summary>
- /// <seealso cref= DocIdSetIterator </seealso>
- /// <seealso cref= FilteredDocIdSetIterator </seealso>
+ /// Implementation of the contract to build a <see cref="DocIdSetIterator"/>. </summary>
+ /// <seealso cref="DocIdSetIterator"/>
+ /// <seealso cref="FilteredDocIdSetIterator"/>
public override DocIdSetIterator GetIterator()
{
DocIdSetIterator iterator = innerSet.GetIterator();
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/FilteredDocIdSetIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FilteredDocIdSetIterator.cs b/src/Lucene.Net/Search/FilteredDocIdSetIterator.cs
index 8f4881b..eb2f2bf 100644
--- a/src/Lucene.Net/Search/FilteredDocIdSetIterator.cs
+++ b/src/Lucene.Net/Search/FilteredDocIdSetIterator.cs
@@ -20,10 +20,10 @@ namespace Lucene.Net.Search
*/
/// <summary>
- /// Abstract decorator class of a DocIdSetIterator
+ /// Abstract decorator class of a <see cref="DocIdSetIterator"/>
/// implementation that provides on-demand filter/validation
- /// mechanism on an underlying DocIdSetIterator. See {@link
- /// FilteredDocIdSet}.
+ /// mechanism on an underlying <see cref="DocIdSetIterator"/>. See
+ /// <see cref="DocIdSetIterator"/>.
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
@@ -35,7 +35,7 @@ namespace Lucene.Net.Search
/// <summary>
/// Constructor. </summary>
- /// <param name="innerIter"> Underlying DocIdSetIterator. </param>
+ /// <param name="innerIter"> Underlying <see cref="DocIdSetIterator"/>. </param>
public FilteredDocIdSetIterator(DocIdSetIterator innerIter)
{
if (innerIter == null)
@@ -49,8 +49,8 @@ namespace Lucene.Net.Search
/// <summary>
/// Validation method to determine whether a docid should be in the result set. </summary>
/// <param name="doc"> docid to be tested </param>
- /// <returns> true if input docid should be in the result set, false otherwise. </returns>
- /// <seealso cref= #FilteredDocIdSetIterator(DocIdSetIterator) </seealso>
+ /// <returns> <c>true</c> if input docid should be in the result set, <c>false</c> otherwise. </returns>
+ /// <seealso cref="FilteredDocIdSetIterator(DocIdSetIterator)"/>
protected abstract bool Match(int doc);
public override int DocID
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/FilteredQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FilteredQuery.cs b/src/Lucene.Net/Search/FilteredQuery.cs
index 654cc72..ebae4de 100644
--- a/src/Lucene.Net/Search/FilteredQuery.cs
+++ b/src/Lucene.Net/Search/FilteredQuery.cs
@@ -31,11 +31,12 @@ namespace Lucene.Net.Search
/// <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
- /// query is used in a search - use a CachingWrapperFilter to avoid
+ /// <para/>Note: the bits are retrieved from the filter each time this
+ /// query is used in a search - use a <see cref="CachingWrapperFilter"/> to avoid
/// regenerating the bits every time.
+ /// <para/>
/// @since 1.4 </summary>
- /// <seealso cref= CachingWrapperFilter </seealso>
+ /// <seealso cref="CachingWrapperFilter"/>
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
@@ -47,9 +48,9 @@ namespace Lucene.Net.Search
/// <summary>
/// Constructs a new query which applies a filter to the results of the original query.
- /// <seealso cref="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>
- /// <param name="filter"> Filter to apply to query results, cannot be <code>null</code>. </param>
+ /// <see cref="Filter.GetDocIdSet(AtomicReaderContext, IBits)"/> will be called every time this query is used in a search. </summary>
+ /// <param name="query"> Query to be filtered, cannot be <c>null</c>. </param>
+ /// <param name="filter"> Filter to apply to query results, cannot be <c>null</c>. </param>
public FilteredQuery(Query query, Filter filter)
: this(query, filter, RANDOM_ACCESS_FILTER_STRATEGY)
{
@@ -57,12 +58,12 @@ namespace Lucene.Net.Search
/// <summary>
/// Expert: Constructs a new query which applies a filter to the results of the original query.
- /// <seealso cref="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>
- /// <param name="filter"> Filter to apply to query results, cannot be <code>null</code>. </param>
- /// <param name="strategy"> a filter strategy used to create a filtered scorer.
+ /// <see cref="Filter.GetDocIdSet(AtomicReaderContext, IBits)"/> will be called every time this query is used in a search. </summary>
+ /// <param name="query"> Query to be filtered, cannot be <c>null</c>. </param>
+ /// <param name="filter"> Filter to apply to query results, cannot be <c>null</c>. </param>
+ /// <param name="strategy"> A filter strategy used to create a filtered scorer.
/// </param>
- /// <seealso cref= FilterStrategy </seealso>
+ /// <seealso cref="FilterStrategy"/>
public FilteredQuery(Query query, Filter filter, FilterStrategy strategy)
{
if (query == null || filter == null)
@@ -79,8 +80,8 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Returns a Weight that applies the filter to the enclosed query's Weight.
- /// this is accomplished by overriding the Scorer returned by the Weight.
+ /// Returns a <see cref="Weight"/> that applies the filter to the enclosed query's <see cref="Weight"/>.
+ /// this is accomplished by overriding the <see cref="Scorer"/> returned by the <see cref="Weight"/>.
/// </summary>
public override Weight CreateWeight(IndexSearcher searcher)
{
@@ -181,8 +182,8 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// A scorer that consults the filter iff a document was matched by the
- /// delegate scorer. this is useful if the filter computation is more expensive
+ /// A scorer that consults the filter if a document was matched by the
+ /// delegate scorer. This is useful if the filter computation is more expensive
/// than document scoring or if the filter has a linear running time to compute
/// the next matching doc like exact geo distances.
/// </summary>
@@ -299,7 +300,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// A Scorer that uses a "leap-frog" approach (also called "zig-zag join"). The scorer and the filter
+ /// A <see cref="Scorer"/> that uses a "leap-frog" approach (also called "zig-zag join"). The scorer and the filter
/// take turns trying to advance to each other's next matching document, often
/// jumping past the target document. When both land on the same document, it's
/// collected.
@@ -418,8 +419,8 @@ namespace Lucene.Net.Search
/// <summary>
/// Rewrites the query. If the wrapped is an instance of
- /// <seealso cref="MatchAllDocsQuery"/> it returns a <seealso cref="ConstantScoreQuery"/>. Otherwise
- /// it returns a new {@code FilteredQuery} wrapping the rewritten query.
+ /// <see cref="MatchAllDocsQuery"/> it returns a <see cref="ConstantScoreQuery"/>. Otherwise
+ /// it returns a new <see cref="FilteredQuery"/> wrapping the rewritten query.
/// </summary>
public override Query Rewrite(IndexReader reader)
{
@@ -440,7 +441,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Returns this FilteredQuery's (unfiltered) Query </summary>
+ /// Returns this <see cref="FilteredQuery"/>'s (unfiltered) <see cref="Query"/> </summary>
public Query Query
{
get
@@ -450,7 +451,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Returns this FilteredQuery's filter </summary>
+ /// Returns this <see cref="FilteredQuery"/>'s filter </summary>
public Filter Filter
{
get
@@ -460,7 +461,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Returns this FilteredQuery's <seealso cref="FilterStrategy"/> </summary>
+ /// Returns this <see cref="FilteredQuery"/>'s <seealso cref="FilterStrategy"/> </summary>
public virtual FilterStrategy Strategy
{
get
@@ -469,7 +470,11 @@ namespace Lucene.Net.Search
}
}
- // inherit javadoc
+ /// <summary>
+ /// Expert: adds all terms occurring in this query to the terms set. Only
+ /// works if this query is in its rewritten (<see cref="Rewrite(IndexReader)"/>) form.
+ /// </summary>
+ /// <exception cref="InvalidOperationException"> If this query is not yet rewritten </exception>
public override void ExtractTerms(ISet<Term> terms)
{
Query.ExtractTerms(terms);
@@ -489,7 +494,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Returns true iff <code>o</code> is equal to this. </summary>
+ /// Returns true if <paramref name="o"/> is equal to this. </summary>
public override bool Equals(object o)
{
if (o == this)
@@ -517,16 +522,16 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// A <seealso cref="FilterStrategy"/> that conditionally uses a random access filter if
- /// the given <seealso cref="DocIdSet"/> supports random access (returns a non-null value
- /// from <seealso cref="DocIdSet#bits()"/>) and
- /// <seealso cref="RandomAccessFilterStrategy#useRandomAccess(Bits, int)"/> returns
- /// <code>true</code>. Otherwise this strategy falls back to a "zig-zag join" (
- /// <seealso cref="FilteredQuery#LEAP_FROG_FILTER_FIRST_STRATEGY"/>) strategy.
+ /// A <see cref="FilterStrategy"/> that conditionally uses a random access filter if
+ /// the given <see cref="DocIdSet"/> supports random access (returns a non-null value
+ /// from <see cref="DocIdSet.Bits"/>) and
+ /// <see cref="RandomAccessFilterStrategy.UseRandomAccess(IBits, int)"/> returns
+ /// <c>true</c>. Otherwise this strategy falls back to a "zig-zag join" (
+ /// <see cref="FilteredQuery.LEAP_FROG_FILTER_FIRST_STRATEGY"/>) strategy.
///
- /// <p>
- /// Note: this strategy is the default strategy in <seealso cref="FilteredQuery"/>
- /// </p>
+ /// <para>
+ /// Note: this strategy is the default strategy in <see cref="FilteredQuery"/>
+ /// </para>
/// </summary>
public static readonly FilterStrategy RANDOM_ACCESS_FILTER_STRATEGY = new RandomAccessFilterStrategy();
@@ -536,9 +541,9 @@ namespace Lucene.Net.Search
/// take turns trying to advance to each other's next matching document, often
/// jumping past the target document. When both land on the same document, it's
/// collected.
- /// <p>
+ /// <para>
/// Note: this strategy uses the filter to lead the iteration.
- /// </p>
+ /// </para>
/// </summary>
public static readonly FilterStrategy LEAP_FROG_FILTER_FIRST_STRATEGY = new LeapFrogFilterStrategy(false);
@@ -548,55 +553,56 @@ namespace Lucene.Net.Search
/// take turns trying to advance to each other's next matching document, often
/// jumping past the target document. When both land on the same document, it's
/// collected.
- /// <p>
+ /// <para>
/// Note: this strategy uses the query to lead the iteration.
- /// </p>
+ /// </para>
/// </summary>
public static readonly FilterStrategy LEAP_FROG_QUERY_FIRST_STRATEGY = new LeapFrogFilterStrategy(true);
/// <summary>
- /// A filter strategy that advances the Query or rather its <seealso cref="Scorer"/> first and consults the
- /// filter <seealso cref="DocIdSet"/> for each matched document.
- /// <p>
- /// Note: this strategy requires a <seealso cref="DocIdSet#bits()"/> to return a non-null value. Otherwise
- /// this strategy falls back to <seealso cref="FilteredQuery#LEAP_FROG_QUERY_FIRST_STRATEGY"/>
- /// </p>
- /// <p>
+ /// A filter strategy that advances the <see cref="Search.Query"/> or rather its <see cref="Scorer"/> first and consults the
+ /// filter <see cref="DocIdSet"/> for each matched document.
+ /// <para>
+ /// Note: this strategy requires a <see cref="DocIdSet.Bits"/> to return a non-null value. Otherwise
+ /// this strategy falls back to <see cref="FilteredQuery.LEAP_FROG_QUERY_FIRST_STRATEGY"/>
+ /// </para>
+ /// <para>
/// Use this strategy if the filter computation is more expensive than document
/// scoring or if the filter has a linear running time to compute the next
/// matching doc like exact geo distances.
- /// </p>
+ /// </para>
/// </summary>
public static readonly FilterStrategy QUERY_FIRST_FILTER_STRATEGY = new QueryFirstFilterStrategy();
/// <summary>
- /// Abstract class that defines how the filter (<seealso cref="DocIdSet"/>) applied during document collection. </summary>
+ /// Abstract class that defines how the filter (<see cref="DocIdSet"/>) applied during document collection. </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
public abstract class FilterStrategy
{
/// <summary>
- /// Returns a filtered <seealso cref="Scorer"/> based on this strategy.
+ /// Returns a filtered <see cref="Scorer"/> based on this strategy.
/// </summary>
/// <param name="context">
- /// the <seealso cref="AtomicReaderContext"/> for which to return the <seealso cref="Scorer"/>. </param>
- /// <param name="weight"> the <seealso cref="FilteredQuery"/> <seealso cref="Weight"/> to create the filtered scorer. </param>
- /// <param name="docIdSet"> the filter <seealso cref="DocIdSet"/> to apply </param>
+ /// the <see cref="AtomicReaderContext"/> for which to return the <see cref="Scorer"/>. </param>
+ /// <param name="weight"> the <see cref="FilteredQuery"/> <see cref="Weight"/> to create the filtered scorer. </param>
+ /// <param name="docIdSet"> the filter <see cref="DocIdSet"/> to apply </param>
/// <returns> a filtered scorer
/// </returns>
- /// <exception cref="IOException"> if an <seealso cref="IOException"/> occurs </exception>
+ /// <exception cref="System.IO.IOException"> if an <see cref="System.IO.IOException"/> occurs </exception>
public abstract Scorer FilteredScorer(AtomicReaderContext context, Weight weight, DocIdSet docIdSet);
/// <summary>
- /// Returns a filtered <seealso cref="BulkScorer"/> based on this
+ /// Returns a filtered <see cref="BulkScorer"/> based on this
/// strategy. this is an optional method: the default
- /// implementation just calls <seealso cref="#filteredScorer"/> and
- /// wraps that into a BulkScorer.
+ /// implementation just calls <see cref="FilteredScorer(AtomicReaderContext, Weight, DocIdSet)"/> and
+ /// wraps that into a <see cref="BulkScorer"/>.
/// </summary>
/// <param name="context">
/// the <seealso cref="AtomicReaderContext"/> for which to return the <seealso cref="Scorer"/>. </param>
/// <param name="weight"> the <seealso cref="FilteredQuery"/> <seealso cref="Weight"/> to create the filtered scorer. </param>
+ /// <param name="scoreDocsInOrder"> <c>true</c> to score docs in order </param>
/// <param name="docIdSet"> the filter <seealso cref="DocIdSet"/> to apply </param>
/// <returns> a filtered top scorer </returns>
public virtual BulkScorer FilteredBulkScorer(AtomicReaderContext context, Weight weight, bool scoreDocsInOrder, DocIdSet docIdSet)
@@ -613,12 +619,12 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// A <seealso cref="FilterStrategy"/> that conditionally uses a random access filter if
- /// the given <seealso cref="DocIdSet"/> supports random access (returns a non-null value
- /// from <seealso cref="DocIdSet#bits()"/>) and
- /// <seealso cref="RandomAccessFilterStrategy#useRandomAccess(Bits, int)"/> returns
+ /// A <see cref="FilterStrategy"/> that conditionally uses a random access filter if
+ /// the given <see cref="DocIdSet"/> supports random access (returns a non-null value
+ /// from <see cref="DocIdSet.Bits"/>) and
+ /// <see cref="RandomAccessFilterStrategy.UseRandomAccess(IBits, int)"/> returns
/// <code>true</code>. Otherwise this strategy falls back to a "zig-zag join" (
- /// <seealso cref="FilteredQuery#LEAP_FROG_FILTER_FIRST_STRATEGY"/>) strategy .
+ /// <see cref="FilteredQuery.LEAP_FROG_FILTER_FIRST_STRATEGY"/>) strategy .
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
@@ -661,14 +667,14 @@ namespace Lucene.Net.Search
/// <summary>
/// Expert: decides if a filter should be executed as "random-access" or not.
- /// random-access means the filter "filters" in a similar way as deleted docs are filtered
- /// in Lucene. this is faster when the filter accepts many documents.
+ /// Random-access means the filter "filters" in a similar way as deleted docs are filtered
+ /// in Lucene. This is faster when the filter accepts many documents.
/// However, when the filter is very sparse, it can be faster to execute the query+filter
/// as a conjunction in some cases.
- ///
- /// The default implementation returns <code>true</code> if the first document accepted by the
- /// filter is < 100.
- ///
+ /// <para/>
+ /// The default implementation returns <c>true</c> if the first document accepted by the
+ /// filter is < 100.
+ /// <para/>
/// @lucene.internal
/// </summary>
protected virtual bool UseRandomAccess(IBits bits, int firstFilterDoc)
@@ -717,17 +723,17 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// A filter strategy that advances the <seealso cref="Scorer"/> first and consults the
- /// <seealso cref="DocIdSet"/> for each matched document.
- /// <p>
- /// Note: this strategy requires a <seealso cref="DocIdSet#bits()"/> to return a non-null value. Otherwise
- /// this strategy falls back to <seealso cref="FilteredQuery#LEAP_FROG_QUERY_FIRST_STRATEGY"/>
- /// </p>
- /// <p>
+ /// A filter strategy that advances the <see cref="Scorer"/> first and consults the
+ /// <see cref="DocIdSet"/> for each matched document.
+ /// <para>
+ /// Note: this strategy requires a <see cref="DocIdSet.Bits"/> to return a non-null value. Otherwise
+ /// this strategy falls back to <see cref="FilteredQuery.LEAP_FROG_QUERY_FIRST_STRATEGY"/>
+ /// </para>
+ /// <para>
/// Use this strategy if the filter computation is more expensive than document
/// scoring or if the filter has a linear running time to compute the next
/// matching doc like exact geo distances.
- /// </p>
+ /// </para>
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/FuzzyQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FuzzyQuery.cs b/src/Lucene.Net/Search/FuzzyQuery.cs
index 9da7082..fa11a18 100644
--- a/src/Lucene.Net/Search/FuzzyQuery.cs
+++ b/src/Lucene.Net/Search/FuzzyQuery.cs
@@ -31,26 +31,26 @@ namespace Lucene.Net.Search
/// <summary>
/// Implements the fuzzy search query. The similarity measurement
/// is based on the Damerau-Levenshtein (optimal string alignment) algorithm,
- /// though you can explicitly choose classic Levenshtein by passing <code>false</code>
- /// to the <code>transpositions</code> parameter.
+ /// though you can explicitly choose classic Levenshtein by passing <c>false</c>
+ /// to the <c>transpositions</c> parameter.
///
- /// <p>this query uses <seealso cref="MultiTermQuery.TopTermsScoringBooleanQueryRewrite"/>
+ /// <para/>this query uses <see cref="MultiTermQuery.TopTermsScoringBooleanQueryRewrite"/>
/// as default. So terms will be collected and scored according to their
- /// edit distance. Only the top terms are used for building the <seealso cref="BooleanQuery"/>.
+ /// edit distance. Only the top terms are used for building the <see cref="BooleanQuery"/>.
/// It is not recommended to change the rewrite mode for fuzzy queries.
///
- /// <p>At most, this query will match terms up to
- /// {@value Lucene.Net.Util.Automaton.LevenshteinAutomata#MAXIMUM_SUPPORTED_DISTANCE} edits.
+ /// <para/>At most, this query will match terms up to
+ /// <see cref="Lucene.Net.Util.Automaton.LevenshteinAutomata.MAXIMUM_SUPPORTED_DISTANCE"/> edits.
/// Higher distances (especially with transpositions enabled), are generally not useful and
/// will match a significant amount of the term dictionary. If you really want this, consider
/// using an n-gram indexing technique (such as the SpellChecker in the
/// <a href="{@docRoot}/../suggest/overview-summary.html">suggest module</a>) instead.
///
- /// <p>NOTE: terms of length 1 or 2 will sometimes not match because of how the scaled
+ /// <para/>NOTE: terms of length 1 or 2 will sometimes not match because of how the scaled
/// distance between two terms is computed. For a term to match, the edit distance between
/// the terms must be less than the minimum length term (either the input term, or
- /// the candidate term). For example, FuzzyQuery on term "abcd" with maxEdits=2 will
- /// not match an indexed term "ab", and FuzzyQuery on term "a" with maxEdits=2 will not
+ /// the candidate term). For example, <see cref="FuzzyQuery"/> on term "abcd" with maxEdits=2 will
+ /// not match an indexed term "ab", and <see cref="FuzzyQuery"/> on term "a" with maxEdits=2 will not
/// match an indexed term "abc".
/// </summary>
#if FEATURE_SERIALIZABLE
@@ -70,19 +70,19 @@ namespace Lucene.Net.Search
private readonly Term term;
/// <summary>
- /// Create a new FuzzyQuery that will match terms with an edit distance
- /// of at most <code>maxEdits</code> to <code>term</code>.
- /// If a <code>prefixLength</code> > 0 is specified, a common prefix
+ /// Create a new <see cref="FuzzyQuery"/> that will match terms with an edit distance
+ /// of at most <paramref name="maxEdits"/> to <paramref name="term"/>.
+ /// If a <paramref name="prefixLength"/> > 0 is specified, a common prefix
/// of that length is also required.
/// </summary>
- /// <param name="term"> the term to search for </param>
- /// <param name="maxEdits"> must be >= 0 and <= <seealso cref="LevenshteinAutomata#MAXIMUM_SUPPORTED_DISTANCE"/>. </param>
- /// <param name="prefixLength"> length of common (non-fuzzy) prefix </param>
- /// <param name="maxExpansions"> the maximum number of terms to match. If this number is
- /// greater than <seealso cref="BooleanQuery#getMaxClauseCount"/> when the query is rewritten,
- /// then the maxClauseCount will be used instead. </param>
- /// <param name="transpositions"> true if transpositions should be treated as a primitive
- /// edit operation. If this is false, comparisons will implement the classic
+ /// <param name="term"> The term to search for </param>
+ /// <param name="maxEdits"> Must be >= 0 and <= <see cref="LevenshteinAutomata.MAXIMUM_SUPPORTED_DISTANCE"/>. </param>
+ /// <param name="prefixLength"> Length of common (non-fuzzy) prefix </param>
+ /// <param name="maxExpansions"> The maximum number of terms to match. If this number is
+ /// greater than <see cref="BooleanQuery.MaxClauseCount"/> when the query is rewritten,
+ /// then the maxClauseCount will be used instead. </param>
+ /// <param name="transpositions"> <c>true</c> if transpositions should be treated as a primitive
+ /// edit operation. If this is <c>false</c>, comparisons will implement the classic
/// Levenshtein algorithm. </param>
public FuzzyQuery(Term term, int maxEdits, int prefixLength, int maxExpansions, bool transpositions)
: base(term.Field)
@@ -109,8 +109,8 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Calls {@link #FuzzyQuery(Term, int, int, int, boolean)
- /// FuzzyQuery(term, maxEdits, prefixLength, defaultMaxExpansions, defaultTranspositions)}.
+ /// Calls <see cref="FuzzyQuery.FuzzyQuery(Term, int, int, int, bool)">
+ /// FuzzyQuery(term, maxEdits, prefixLength, defaultMaxExpansions, defaultTranspositions)</see>.
/// </summary>
public FuzzyQuery(Term term, int maxEdits, int prefixLength)
: this(term, maxEdits, prefixLength, DefaultMaxExpansions, DefaultTranspositions)
@@ -118,7 +118,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Calls <seealso cref="#FuzzyQuery(Term, int, int) FuzzyQuery(term, maxEdits, defaultPrefixLength)"/>.
+ /// Calls <see cref="FuzzyQuery(Term, int, int)">FuzzyQuery(term, maxEdits, defaultPrefixLength)</see>.
/// </summary>
public FuzzyQuery(Term term, int maxEdits)
: this(term, maxEdits, DefaultPrefixLength)
@@ -126,14 +126,14 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Calls <seealso cref="#FuzzyQuery(Term, int) FuzzyQuery(term, defaultMaxEdits)"/>.
+ /// Calls <see cref="FuzzyQuery(Term, int)">FuzzyQuery(term, defaultMaxEdits)</see>.
/// </summary>
public FuzzyQuery(Term term)
: this(term, DefaultMaxEdits)
{
}
- /// <returns> the maximum number of edit distances allowed for this query to match. </returns>
+ /// <returns> The maximum number of edit distances allowed for this query to match. </returns>
public virtual int MaxEdits
{
get
@@ -143,7 +143,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Returns the non-fuzzy prefix length. this is the number of characters at the start
+ /// Returns the non-fuzzy prefix length. This is the number of characters at the start
/// of a term that must be identical (not fuzzy) to the query term if the query
/// is to match that term.
/// </summary>
@@ -156,8 +156,8 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Returns true if transpositions should be treated as a primitive edit operation.
- /// If this is false, comparisons will implement the classic Levenshtein algorithm.
+ /// Returns <c>true</c> if transpositions should be treated as a primitive edit operation.
+ /// If this is <c>false</c>, comparisons will implement the classic Levenshtein algorithm.
/// </summary>
public virtual bool Transpositions
{
@@ -269,10 +269,9 @@ namespace Lucene.Net.Search
/// <para/>
/// NOTE: this was floatToEdits() in Lucene
/// </summary>
- /// <param name="minimumSimilarity"> scaled similarity </param>
- /// <param name="termLen"> length (in unicode codepoints) of the term. </param>
- /// <returns> equivalent number of maxEdits </returns>
- /// @deprecated pass integer edit distances instead.
+ /// <param name="minimumSimilarity"> Scaled similarity </param>
+ /// <param name="termLen"> Length (in unicode codepoints) of the term. </param>
+ /// <returns> Equivalent number of maxEdits </returns>
[Obsolete("pass integer edit distances instead.")]
public static int SingleToEdits(float minimumSimilarity, int termLen)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/FuzzyTermsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FuzzyTermsEnum.cs b/src/Lucene.Net/Search/FuzzyTermsEnum.cs
index f4bbd5d..e29aa59 100644
--- a/src/Lucene.Net/Search/FuzzyTermsEnum.cs
+++ b/src/Lucene.Net/Search/FuzzyTermsEnum.cs
@@ -45,12 +45,12 @@ namespace Lucene.Net.Search
using UnicodeUtil = Lucene.Net.Util.UnicodeUtil;
/// <summary>
- /// Subclass of TermsEnum for enumerating all terms that are similar
+ /// Subclass of <see cref="TermsEnum"/> for enumerating all terms that are similar
/// to the specified filter term.
///
- /// <p>Term enumerations are always ordered by
- /// <seealso cref="#getComparer"/>. Each term in the enumeration is
- /// greater than all that precede it.</p>
+ /// <para>Term enumerations are always ordered by
+ /// <see cref="Comparer"/>. Each term in the enumeration is
+ /// greater than all that precede it.</para>
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
@@ -92,22 +92,23 @@ namespace Lucene.Net.Search
private readonly bool transpositions;
/// <summary>
- /// Constructor for enumeration of all terms from specified <code>reader</code> which share a prefix of
- /// length <code>prefixLength</code> with <code>term</code> and which have a fuzzy similarity >
- /// <code>minSimilarity</code>.
- /// <p>
+ /// Constructor for enumeration of all terms from specified <c>reader</c> which share a prefix of
+ /// length <paramref name="prefixLength"/> with <paramref name="term"/> and which have a fuzzy similarity >
+ /// <paramref name="minSimilarity"/>.
+ /// <para/>
/// After calling the constructor the enumeration is already pointing to the first
/// valid term if such a term exists.
/// </summary>
/// <param name="terms"> Delivers terms. </param>
- /// <param name="atts"> <seealso cref="AttributeSource"/> created by the rewrite method of <seealso cref="MultiTermQuery"/>
+ /// <param name="atts"> <see cref="AttributeSource"/> created by the rewrite method of <see cref="MultiTermQuery"/>
/// thats contains information about competitive boosts during rewrite. It is also used
/// to cache DFAs between segment transitions. </param>
/// <param name="term"> Pattern term. </param>
/// <param name="minSimilarity"> Minimum required similarity for terms from the reader. Pass an integer value
/// representing edit distance. Passing a fraction is deprecated. </param>
/// <param name="prefixLength"> Length of required common prefix. Default value is 0. </param>
- /// <exception cref="IOException"> if there is a low-level IO error </exception>
+ /// <param name="transpositions"> Transpositions </param>
+ /// <exception cref="System.IO.IOException"> if there is a low-level IO error </exception>
public FuzzyTermsEnum(Terms terms, AttributeSource atts, Term term, float minSimilarity, int prefixLength, bool transpositions)
{
InitializeInstanceFields();
@@ -167,8 +168,8 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// return an automata-based enum for matching up to editDistance from
- /// lastTerm, if possible
+ /// Return an automata-based enum for matching up to <paramref name="editDistance"/> from
+ /// <paramref name="lastTerm"/>, if possible
/// </summary>
protected virtual TermsEnum GetAutomatonEnum(int editDistance, BytesRef lastTerm)
{
@@ -186,7 +187,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// initialize levenshtein DFAs up to maxDistance, if possible </summary>
+ /// Initialize levenshtein DFAs up to maxDistance, if possible </summary>
private IList<CompiledAutomaton> InitAutomata(int maxDistance)
{
IList<CompiledAutomaton> runAutomata = dfaAtt.Automata;
@@ -212,7 +213,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// swap in a new actual enum to proxy to </summary>
+ /// Swap in a new actual enum to proxy to </summary>
protected virtual void SetEnum(TermsEnum actualEnum)
{
this.actualEnum = actualEnum;
@@ -220,7 +221,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// fired when the max non-competitive boost has changed. this is the hook to
+ /// Fired when the max non-competitive boost has changed. This is the hook to
/// swap in a smarter actualEnum
/// </summary>
private void BottomChanged(BytesRef lastTerm, bool init)
@@ -361,9 +362,9 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// Implement fuzzy enumeration with Terms.intersect.
- /// <p>
- /// this is the fastest method as opposed to LinearFuzzyTermsEnum:
+ /// Implement fuzzy enumeration with <see cref="Terms.Intersect(CompiledAutomaton, BytesRef)"/>.
+ /// <para/>
+ /// This is the fastest method as opposed to LinearFuzzyTermsEnum:
/// as enumeration is logarithmic to the number of terms (instead of linear)
/// and comparison is linear to length of the term (rather than quadratic)
/// </summary>
@@ -400,7 +401,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// finds the smallest Lev(n) DFA that accepts the term. </summary>
+ /// Finds the smallest Lev(n) DFA that accepts the term. </summary>
protected override AcceptStatus Accept(BytesRef term)
{
//System.out.println("AFTE.accept term=" + term);
@@ -447,7 +448,7 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// returns true if term is within k edits of the query term </summary>
+ /// Returns <c>true</c> if <paramref name="term"/> is within <paramref name="k"/> edits of the query term </summary>
internal bool Matches(BytesRef term, int k)
{
return k == 0 ? term.Equals(termRef) : matchers[k].Run(term.Bytes, term.Offset, term.Length);
@@ -475,8 +476,9 @@ namespace Lucene.Net.Search
}
/// <summary>
- /// reuses compiled automata across different segments,
+ /// Reuses compiled automata across different segments,
/// because they are independent of the index
+ /// <para/>
/// @lucene.internal
/// </summary>
public interface ILevenshteinAutomataAttribute : IAttribute
@@ -486,6 +488,7 @@ namespace Lucene.Net.Search
/// <summary>
/// Stores compiled automata as a list (indexed by edit distance)
+ /// <para/>
/// @lucene.internal
/// </summary>
#if FEATURE_SERIALIZABLE