http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/Rescorer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Rescorer.cs b/src/Lucene.Net/Search/Rescorer.cs index ca94e73..72841fb 100644 --- a/src/Lucene.Net/Search/Rescorer.cs +++ b/src/Lucene.Net/Search/Rescorer.cs @@ -20,18 +20,18 @@ namespace Lucene.Net.Search */ /// <summary> - /// Re-scores the topN results (<seealso cref="TopDocs"/>) from an original - /// query. See <seealso cref="QueryRescorer"/> for an actual + /// Re-scores the topN results (<see cref="TopDocs"/>) from an original + /// query. See <see cref="QueryRescorer"/> for an actual /// implementation. Typically, you run a low-cost /// first-pass query across the entire index, collecting the /// top few hundred hits perhaps, and then use this class to /// mix in a more costly second pass scoring. /// - /// <p>See {@link - /// QueryRescorer#rescore(IndexSearcher,TopDocs,Query,double,int)} + /// <para/>See + /// <see cref="QueryRescorer.Rescore(IndexSearcher, TopDocs, Query, double, int)"/> /// for a simple static method to call to rescore using a 2nd - /// pass <seealso cref="Query"/>. - /// + /// pass <see cref="Query"/>. + /// <para/> /// @lucene.experimental /// </summary> #if FEATURE_SERIALIZABLE @@ -40,9 +40,9 @@ namespace Lucene.Net.Search public abstract class Rescorer { /// <summary> - /// Rescore an initial first-pass <seealso cref="TopDocs"/>. + /// Rescore an initial first-pass <see cref="TopDocs"/>. /// </summary> - /// <param name="searcher"> <seealso cref="IndexSearcher"/> used to produce the + /// <param name="searcher"> <see cref="IndexSearcher"/> used to produce the /// first pass topDocs </param> /// <param name="firstPassTopDocs"> Hits from the first pass /// search. It's very important that these hits were
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/ScoreCachingWrappingScorer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/ScoreCachingWrappingScorer.cs b/src/Lucene.Net/Search/ScoreCachingWrappingScorer.cs index e86a809..d643e50 100644 --- a/src/Lucene.Net/Search/ScoreCachingWrappingScorer.cs +++ b/src/Lucene.Net/Search/ScoreCachingWrappingScorer.cs @@ -21,14 +21,15 @@ namespace Lucene.Net.Search */ /// <summary> - /// A <seealso cref="scorer"/> which wraps another scorer and caches the score of the - /// current document. Successive calls to <seealso cref="#score()"/> will return the same - /// result and will not invoke the wrapped Scorer's score() method, unless the - /// current document has changed.<br> - /// this class might be useful due to the changes done to the <seealso cref="ICollector"/> + /// A <see cref="Scorer"/> which wraps another scorer and caches the score of the + /// current document. Successive calls to <see cref="GetScore()"/> will return the same + /// result and will not invoke the wrapped Scorer's GetScore() method, unless the + /// current document has changed. + /// <para/> + /// This class might be useful due to the changes done to the <see cref="ICollector"/> /// interface, in which the score is not computed for a document by default, only /// if the collector requests it. Some collectors may need to use the score in - /// several places, however all they have in hand is a <seealso cref="scorer"/> object, and + /// several places, however all they have in hand is a <see cref="Scorer"/> object, and /// might end up computing the score of a document more than once. /// </summary> #if FEATURE_SERIALIZABLE http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/ScoreDoc.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/ScoreDoc.cs b/src/Lucene.Net/Search/ScoreDoc.cs index 8f0bc7f..2cfc1d7 100644 --- a/src/Lucene.Net/Search/ScoreDoc.cs +++ b/src/Lucene.Net/Search/ScoreDoc.cs @@ -20,7 +20,7 @@ namespace Lucene.Net.Search */ /// <summary> - /// Holds one hit in <seealso cref="TopDocs"/>. </summary> + /// Holds one hit in <see cref="TopDocs"/>. </summary> #if FEATURE_SERIALIZABLE [Serializable] #endif @@ -32,22 +32,22 @@ namespace Lucene.Net.Search /// <summary> /// A hit document's number. </summary> - /// <seealso cref= IndexSearcher#doc(int) </seealso> + /// <seealso cref="IndexSearcher.Doc(int)"/> public int Doc { get; set; } // LUCENENET NOTE: For some reason, this was not readonly - should it be? /// <summary> - /// Only set by <seealso cref="TopDocs#merge"/> </summary> + /// Only set by <see cref="TopDocs.Merge(Sort, int, int, TopDocs[])"/> </summary> public int ShardIndex { get; set; } // LUCENENET NOTE: For some reason, this was not readonly - should it be? /// <summary> - /// Constructs a ScoreDoc. </summary> + /// Constructs a <see cref="ScoreDoc"/>. </summary> public ScoreDoc(int doc, float score) : this(doc, score, -1) { } /// <summary> - /// Constructs a ScoreDoc. </summary> + /// Constructs a <see cref="ScoreDoc"/>. </summary> public ScoreDoc(int doc, float score, int shardIndex) { this.Doc = doc; @@ -55,7 +55,9 @@ namespace Lucene.Net.Search this.ShardIndex = shardIndex; } - // A convenience method for debugging. + /// <summary> + /// A convenience method for debugging. + /// </summary> public override string ToString() { return "doc=" + Doc + " score=" + Score + " shardIndex=" + ShardIndex; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/Scorer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Scorer.cs b/src/Lucene.Net/Search/Scorer.cs index 4e13ecf..c8ad66b 100644 --- a/src/Lucene.Net/Search/Scorer.cs +++ b/src/Lucene.Net/Search/Scorer.cs @@ -25,20 +25,21 @@ namespace Lucene.Net.Search /// <summary> /// Expert: Common scoring functionality for different types of queries. /// - /// <p> - /// A <code>Scorer</code> iterates over documents matching a + /// <para> + /// A <see cref="Scorer"/> iterates over documents matching a /// query in increasing order of doc Id. - /// </p> - /// <p> - /// Document scores are computed using a given <code>Similarity</code> + /// </para> + /// <para> + /// Document scores are computed using a given <see cref="Similarities.Similarity"/> /// implementation. - /// </p> + /// </para> /// - /// <p><b>NOTE</b>: The values Float.Nan, - /// Float.NEGATIVE_INFINITY and Float.POSITIVE_INFINITY are - /// not valid scores. Certain collectors (eg {@link - /// TopScoreDocCollector}) will not properly collect hits + /// <para><b>NOTE</b>: The values <see cref="float.NaN"/>, + /// <see cref="float.NegativeInfinity"/> and <see cref="float.PositiveInfinity"/> are + /// not valid scores. Certain collectors (eg + /// <see cref="TopScoreDocCollector"/>) will not properly collect hits /// with these scores. + /// </para> /// </summary> #if FEATURE_SERIALIZABLE [Serializable] @@ -46,13 +47,13 @@ namespace Lucene.Net.Search public abstract class Scorer : DocsEnum { /// <summary> - /// the Scorer's parent Weight. in some cases this may be null </summary> + /// The <see cref="Scorer"/>'s parent <see cref="Weight"/>. In some cases this may be <c>null</c>. </summary> // TODO can we clean this up? protected internal readonly Weight m_weight; /// <summary> - /// Constructs a Scorer </summary> - /// <param name="weight"> The scorers <code>Weight</code>. </param> + /// Constructs a <see cref="Scorer"/> </summary> + /// <param name="weight"> The scorers <see cref="Weight"/>. </param> protected Scorer(Weight weight) { this.m_weight = weight; @@ -60,14 +61,15 @@ namespace Lucene.Net.Search /// <summary> /// Returns the score of the current document matching the query. - /// Initially invalid, until <seealso cref="#nextDoc()"/> or <seealso cref="#advance(int)"/> + /// Initially invalid, until <see cref="DocIdSetIterator.NextDoc()"/> or <see cref="DocIdSetIterator.Advance(int)"/> /// is called the first time, or when called from within - /// <seealso cref="ICollector#collect"/>. + /// <see cref="ICollector.Collect(int)"/>. /// </summary> public abstract float GetScore(); /// <summary> - /// returns parent Weight + /// returns parent <see cref="Weight"/> + /// <para/> /// @lucene.experimental /// </summary> public virtual Weight Weight @@ -80,6 +82,7 @@ namespace Lucene.Net.Search /// <summary> /// Returns child sub-scorers + /// <para/> /// @lucene.experimental /// </summary> public virtual ICollection<ChildScorer> GetChildren() @@ -88,8 +91,9 @@ namespace Lucene.Net.Search } /// <summary> - /// A child Scorer and its relationship to its parent. - /// the meaning of the relationship depends upon the parent query. + /// A child <see cref="Scorer"/> and its relationship to its parent. + /// The meaning of the relationship depends upon the parent query. + /// <para/> /// @lucene.experimental /// </summary> #if FEATURE_SERIALIZABLE @@ -98,7 +102,7 @@ namespace Lucene.Net.Search public class ChildScorer { /// <summary> - /// Child Scorer. (note this is typically a direct child, and may + /// Child <see cref="Scorer"/>. (note this is typically a direct child, and may /// itself also have children). /// </summary> public Scorer Child { get; private set; } @@ -109,10 +113,10 @@ namespace Lucene.Net.Search public string Relationship { get; private set; } /// <summary> - /// Creates a new ChildScorer node with the specified relationship. - /// <p> + /// Creates a new <see cref="ChildScorer"/> node with the specified relationship. + /// <para/> /// The relationship can be any be any string that makes sense to - /// the parent Scorer. + /// the parent <see cref="Scorer"/>. /// </summary> public ChildScorer(Scorer child, string relationship) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/ScoringRewrite.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/ScoringRewrite.cs b/src/Lucene.Net/Search/ScoringRewrite.cs index b5587d6..4f67ba8 100644 --- a/src/Lucene.Net/Search/ScoringRewrite.cs +++ b/src/Lucene.Net/Search/ScoringRewrite.cs @@ -35,8 +35,8 @@ namespace Lucene.Net.Search /// <summary> /// Base rewrite method that translates each term into a query, and keeps /// the scores as computed by the query. - /// <p> - /// @lucene.internal Only public to be accessible by spans package. + /// <para/> + /// @lucene.internal - Only public to be accessible by spans package. /// </summary> #if FEATURE_SERIALIZABLE [Serializable] @@ -45,18 +45,18 @@ namespace Lucene.Net.Search { /// <summary> /// A rewrite method that first translates each term into - /// <seealso cref="Occur#SHOULD"/> clause in a - /// BooleanQuery, and keeps the scores as computed by the - /// query. Note that typically such scores are - /// meaningless to the user, and require non-trivial CPU - /// to compute, so it's almost always better to use {@link - /// MultiTermQuery#CONSTANT_SCORE_AUTO_REWRITE_DEFAULT} instead. + /// <see cref="Occur.SHOULD"/> clause in a + /// <see cref="BooleanQuery"/>, and keeps the scores as computed by the + /// query. Note that typically such scores are + /// meaningless to the user, and require non-trivial CPU + /// to compute, so it's almost always better to use + /// <see cref="MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT"/> instead. /// - /// <p><b>NOTE</b>: this rewrite method will hit {@link - /// BooleanQuery.TooManyClauses} if the number of terms - /// exceeds <seealso cref="BooleanQuery#getMaxClauseCount"/>. + /// <para/><b>NOTE</b>: this rewrite method will hit + /// <see cref="BooleanQuery.TooManyClausesException"/> if the number of terms + /// exceeds <see cref="BooleanQuery.MaxClauseCount"/>. /// </summary> - /// <seealso cref= MultiTermQuery#setRewriteMethod </seealso> + /// <seealso cref="MultiTermQuery.MultiTermRewriteMethod"/> public static readonly ScoringRewrite<BooleanQuery> SCORING_BOOLEAN_QUERY_REWRITE = new ScoringRewriteAnonymousInnerClassHelper(); #if FEATURE_SERIALIZABLE @@ -90,16 +90,16 @@ namespace Lucene.Net.Search } /// <summary> - /// Like <seealso cref="#SCORING_BOOLEAN_QUERY_REWRITE"/> except - /// scores are not computed. Instead, each matching - /// document receives a constant score equal to the - /// query's boost. + /// Like <see cref="SCORING_BOOLEAN_QUERY_REWRITE"/> except + /// scores are not computed. Instead, each matching + /// document receives a constant score equal to the + /// query's boost. /// - /// <p><b>NOTE</b>: this rewrite method will hit {@link - /// BooleanQuery.TooManyClauses} if the number of terms - /// exceeds <seealso cref="BooleanQuery#getMaxClauseCount"/>. + /// <para/><b>NOTE</b>: this rewrite method will hit + /// <see cref="BooleanQuery.TooManyClausesException"/> if the number of terms + /// exceeds <see cref="BooleanQuery.MaxClauseCount"/>. /// </summary> - /// <seealso cref= MultiTermQuery#setRewriteMethod </seealso> + /// <seealso cref="MultiTermQuery.MultiTermRewriteMethod"/> public static readonly RewriteMethod CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE = new RewriteMethodAnonymousInnerClassHelper(); #if FEATURE_SERIALIZABLE @@ -122,8 +122,8 @@ namespace Lucene.Net.Search } /// <summary> - /// this method is called after every new term to check if the number of max clauses - /// (e.g. in BooleanQuery) is not exceeded. Throws the corresponding <seealso cref="RuntimeException"/>. + /// This method is called after every new term to check if the number of max clauses + /// (e.g. in <see cref="BooleanQuery"/>) is not exceeded. Throws the corresponding <see cref="Exception"/>. /// </summary> protected abstract void CheckMaxClauseCount(int count); @@ -205,7 +205,7 @@ namespace Lucene.Net.Search } /// <summary> - /// Special implementation of BytesStartArray that keeps parallel arrays for boost and docFreq </summary> + /// Special implementation of <see cref="BytesRefHash.BytesStartArray"/> that keeps parallel arrays for boost and docFreq </summary> #if FEATURE_SERIALIZABLE [Serializable] #endif http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/SearcherFactory.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/SearcherFactory.cs b/src/Lucene.Net/Search/SearcherFactory.cs index 6a5fb62..6ddb386 100644 --- a/src/Lucene.Net/Search/SearcherFactory.cs +++ b/src/Lucene.Net/Search/SearcherFactory.cs @@ -22,25 +22,26 @@ namespace Lucene.Net.Search using IndexReader = Lucene.Net.Index.IndexReader; /// <summary> - /// Factory class used by <seealso cref="SearcherManager"/> to - /// create new IndexSearchers. The default implementation just creates - /// an IndexSearcher with no custom behavior: + /// Factory class used by <see cref="SearcherManager"/> to + /// create new <see cref="IndexSearcher"/>s. The default implementation just creates + /// an <see cref="IndexSearcher"/> with no custom behavior: /// - /// <pre class="prettyprint"> - /// public IndexSearcher newSearcher(IndexReader r) throws IOException { - /// return new IndexSearcher(r); - /// } - /// </pre> + /// <code> + /// public IndexSearcher NewSearcher(IndexReader r) + /// { + /// return new IndexSearcher(r); + /// } + /// </code> /// /// You can pass your own factory instead if you want custom behavior, such as: - /// <ul> - /// <li>Setting a custom scoring model: <seealso cref="IndexSearcher#setSimilarity(Similarity)"/> - /// <li>Parallel per-segment search: <seealso cref="IndexSearcher#IndexSearcher(IndexReader, ExecutorService)"/> - /// <li>Return custom subclasses of IndexSearcher (for example that implement distributed scoring) - /// <li>Run queries to warm your IndexSearcher before it is used. Note: when using near-realtime search - /// you may want to also <seealso cref="IndexWriterConfig#setMergedSegmentWarmer(IndexWriter.IndexReaderWarmer)"/> to warm - /// newly merged segments in the background, outside of the reopen path. - /// </ul> + /// <list type="bullet"> + /// <item><description>Setting a custom scoring model: <see cref="IndexSearcher.Similarity"/></description></item> + /// <item><description>Parallel per-segment search: <see cref="IndexSearcher.IndexSearcher(IndexReader, System.Threading.Tasks.TaskScheduler)"/></description></item> + /// <item><description>Return custom subclasses of <see cref="IndexSearcher"/> (for example that implement distributed scoring)</description></item> + /// <item><description>Run queries to warm your <see cref="IndexSearcher"/> before it is used. Note: when using near-realtime search + /// you may want to also set <see cref="Index.LiveIndexWriterConfig.MergedSegmentWarmer"/> to warm + /// newly merged segments in the background, outside of the reopen path.</description></item> + /// </list> /// @lucene.experimental /// </summary> #if FEATURE_SERIALIZABLE @@ -49,7 +50,7 @@ namespace Lucene.Net.Search public class SearcherFactory { /// <summary> - /// Returns a new IndexSearcher over the given reader. + /// Returns a new <see cref="IndexSearcher"/> over the given reader. /// </summary> public virtual IndexSearcher NewSearcher(IndexReader reader) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/SearcherLifetimeManager.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/SearcherLifetimeManager.cs b/src/Lucene.Net/Search/SearcherLifetimeManager.cs index b4585d1..0090339 100644 --- a/src/Lucene.Net/Search/SearcherLifetimeManager.cs +++ b/src/Lucene.Net/Search/SearcherLifetimeManager.cs @@ -28,62 +28,68 @@ namespace Lucene.Net.Search using IOUtils = Lucene.Net.Util.IOUtils; /// <summary> - /// Keeps track of current plus old IndexSearchers, closing + /// Keeps track of current plus old <see cref="IndexSearcher"/>s, disposing /// the old ones once they have timed out. /// /// Use it like this: /// - /// <pre class="prettyprint"> - /// SearcherLifetimeManager mgr = new SearcherLifetimeManager(); - /// </pre> + /// <code> + /// SearcherLifetimeManager mgr = new SearcherLifetimeManager(); + /// </code> /// /// Per search-request, if it's a "new" search request, then /// obtain the latest searcher you have (for example, by - /// using <seealso cref="SearcherManager"/>), and then record this + /// using <see cref="SearcherManager"/>), and then record this /// searcher: /// - /// <pre class="prettyprint"> - /// // Record the current searcher, and save the returend - /// // token into user's search results (eg as a hidden - /// // HTML form field): - /// long token = mgr.record(searcher); - /// </pre> + /// <code> + /// // Record the current searcher, and save the returend + /// // token into user's search results (eg as a hidden + /// // HTML form field): + /// long token = mgr.Record(searcher); + /// </code> /// /// When a follow-up search arrives, for example the user /// clicks next page, drills down/up, etc., take the token /// that you saved from the previous search and: /// - /// <pre class="prettyprint"> - /// // If possible, obtain the same searcher as the last - /// // search: - /// IndexSearcher searcher = mgr.acquire(token); - /// if (searcher != null) { - /// // Searcher is still here - /// try { - /// // do searching... - /// } finally { - /// mgr.release(searcher); - /// // Do not use searcher after this! - /// searcher = null; + /// <code> + /// // If possible, obtain the same searcher as the last + /// // search: + /// IndexSearcher searcher = mgr.Acquire(token); + /// if (searcher != null) + /// { + /// // Searcher is still here + /// try + /// { + /// // do searching... + /// } + /// finally + /// { + /// mgr.Release(searcher); + /// // Do not use searcher after this! + /// searcher = null; + /// } + /// } + /// else + /// { + /// // Searcher was pruned -- notify user session timed + /// // out, or, pull fresh searcher again /// } - /// } else { - /// // Searcher was pruned -- notify user session timed - /// // out, or, pull fresh searcher again - /// } - /// </pre> + /// </code> /// /// Finally, in a separate thread, ideally the same thread /// that's periodically reopening your searchers, you should /// periodically prune old searchers: /// - /// <pre class="prettyprint"> - /// mgr.prune(new PruneByAge(600.0)); - /// </pre> + /// <code> + /// mgr.Prune(new PruneByAge(600.0)); + /// </code> /// - /// <p><b>NOTE</b>: keeping many searchers around means + /// <para><b>NOTE</b>: keeping many searchers around means /// you'll use more resources (open files, RAM) than a single - /// searcher. However, as long as you are using {@link - /// DirectoryReader#openIfChanged(DirectoryReader)}, the searchers + /// searcher. However, as long as you are using + /// <see cref="DirectoryReader.OpenIfChanged(DirectoryReader)"/>, the searchers /// will usually share almost all segments and the added resource usage /// is contained. When a large merge has completed, and /// you reopen, because that is a large change, the new @@ -91,7 +97,7 @@ namespace Lucene.Net.Search /// searchers; but large merges don't complete very often and /// it's unlikely you'll hit two of them in your expiration /// window. Still you should budget plenty of heap in the - /// JVM to have a good safety margin.</p> + /// runtime to have a good safety margin.</para> /// </summary> #if FEATURE_SERIALIZABLE [Serializable] @@ -150,18 +156,18 @@ namespace Lucene.Net.Search } /// <summary> - /// Records that you are now using this IndexSearcher. - /// Always call this when you've obtained a possibly new - /// <seealso cref="IndexSearcher"/>, for example from {@link - /// SearcherManager}. It's fine if you already passed the - /// same searcher to this method before. + /// Records that you are now using this <see cref="IndexSearcher"/>. + /// Always call this when you've obtained a possibly new + /// <see cref="IndexSearcher"/>, for example from + /// <see cref="SearcherManager"/>. It's fine if you already passed the + /// same searcher to this method before. /// - /// <p>this returns the long token that you can later pass - /// to <seealso cref="#acquire"/> to retrieve the same IndexSearcher. - /// You should record this long token in the search results - /// sent to your user, such that if the user performs a - /// follow-on action (clicks next page, drills down, etc.) - /// the token is returned.</p> + /// <para>This returns the <see cref="long"/> token that you can later pass + /// to <see cref="Acquire(long)"/> to retrieve the same <see cref="IndexSearcher"/>. + /// You should record this <see cref="long"/> token in the search results + /// sent to your user, such that if the user performs a + /// follow-on action (clicks next page, drills down, etc.) + /// the token is returned.</para> /// </summary> public virtual long Record(IndexSearcher searcher) { @@ -181,18 +187,18 @@ namespace Lucene.Net.Search } /// <summary> - /// Retrieve a previously recorded <seealso cref="IndexSearcher"/>, if it - /// has not yet been closed + /// Retrieve a previously recorded <see cref="IndexSearcher"/>, if it + /// has not yet been closed. /// - /// <p><b>NOTE</b>: this may return null when the - /// requested searcher has already timed out. When this - /// happens you should notify your user that their session - /// timed out and that they'll have to restart their - /// search.</p> + /// <para><b>NOTE</b>: this may return <c>null</c> when the + /// requested searcher has already timed out. When this + /// happens you should notify your user that their session + /// timed out and that they'll have to restart their + /// search.</para> /// - /// <p>If this returns a non-null result, you must match - /// later call <seealso cref="#release"/> on this searcher, best - /// from a finally clause.</p> + /// <para>If this returns a non-null result, you must match + /// later call <see cref="Release(IndexSearcher)"/> on this searcher, best + /// from a finally clause.</para> /// </summary> public virtual IndexSearcher Acquire(long version) { @@ -207,10 +213,10 @@ namespace Lucene.Net.Search } /// <summary> - /// Release a searcher previously obtained from {@link - /// #acquire}. + /// Release a searcher previously obtained from + /// <see cref="Acquire(long)"/>. /// - /// <p><b>NOTE</b>: it's fine to call this after close. + /// <para/><b>NOTE</b>: it's fine to call this after Dispose(). /// </summary> public virtual void Release(IndexSearcher s) { @@ -218,22 +224,21 @@ namespace Lucene.Net.Search } /// <summary> - /// See <seealso cref="#prune"/>. </summary> + /// See <see cref="Prune(IPruner)"/>. </summary> public interface IPruner { /// <summary> - /// Return true if this searcher should be removed. </summary> - /// <param name="ageSec"> how much time has passed since this + /// Return <c>true</c> if this searcher should be removed. </summary> + /// <param name="ageSec"> How much time has passed since this /// searcher was the current (live) searcher </param> - /// <param name="searcher"> Searcher - /// </param> + /// <param name="searcher"> Searcher </param> bool DoPrune(double ageSec, IndexSearcher searcher); } /// <summary> /// Simple pruner that drops any searcher older by - /// more than the specified seconds, than the newest - /// searcher. + /// more than the specified seconds, than the newest + /// searcher. /// </summary> #if FEATURE_SERIALIZABLE [Serializable] @@ -258,13 +263,13 @@ namespace Lucene.Net.Search } /// <summary> - /// Calls provided <seealso cref="IPruner"/> to prune entries. The - /// entries are passed to the Pruner in sorted (newest to - /// oldest IndexSearcher) order. + /// Calls provided <see cref="IPruner"/> to prune entries. The + /// entries are passed to the <see cref="IPruner"/> in sorted (newest to + /// oldest <see cref="IndexSearcher"/>) order. /// - /// <p><b>NOTE</b>: you must peridiocally call this, ideally - /// from the same background thread that opens new - /// searchers. + /// <para/><b>NOTE</b>: you must peridiocally call this, ideally + /// from the same background thread that opens new + /// searchers. /// </summary> public virtual void Prune(IPruner pruner) { @@ -307,14 +312,14 @@ namespace Lucene.Net.Search /// <summary> /// Close this to future searching; any searches still in - /// process in other threads won't be affected, and they - /// should still call <seealso cref="#release"/> after they are - /// done. + /// process in other threads won't be affected, and they + /// should still call <see cref="Release(IndexSearcher)"/> after they are + /// done. /// - /// <p><b>NOTE</b>: you must ensure no other threads are - /// calling <seealso cref="#record"/> while you call close(); - /// otherwise it's possible not all searcher references - /// will be freed. + /// <para/><b>NOTE</b>: you must ensure no other threads are + /// calling <see cref="Record(IndexSearcher)"/> while you call Dispose(); + /// otherwise it's possible not all searcher references + /// will be freed. /// </summary> public virtual void Dispose() { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/SearcherManager.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/SearcherManager.cs b/src/Lucene.Net/Search/SearcherManager.cs index 4914047..b86743d 100644 --- a/src/Lucene.Net/Search/SearcherManager.cs +++ b/src/Lucene.Net/Search/SearcherManager.cs @@ -26,35 +26,38 @@ namespace Lucene.Net.Search using IndexWriter = Lucene.Net.Index.IndexWriter; /// <summary> - /// Utility class to safely share <seealso cref="IndexSearcher"/> instances across multiple - /// threads, while periodically reopening. this class ensures each searcher is - /// closed only once all threads have finished using it. + /// Utility class to safely share <see cref="IndexSearcher"/> instances across multiple + /// threads, while periodically reopening. This class ensures each searcher is + /// disposed only once all threads have finished using it. /// - /// <p> - /// Use <seealso cref="#acquire"/> to obtain the current searcher, and <seealso cref="#release"/> to + /// <para/> + /// Use <see cref="ReferenceManager{G}.Acquire()"/> to obtain the current searcher, and <see cref="ReferenceManager{G}.Release(G)"/> to /// release it, like this: /// - /// <pre class="prettyprint"> - /// IndexSearcher s = manager.acquire(); - /// try { - /// // Do searching, doc retrieval, etc. with s - /// } finally { - /// manager.release(s); + /// <code> + /// IndexSearcher s = manager.Acquire(); + /// try + /// { + /// // Do searching, doc retrieval, etc. with s + /// } + /// finally + /// { + /// manager.Release(s); + /// // Do not use s after this! + /// s = null; /// } - /// // Do not use s after this! - /// s = null; - /// </pre> + /// </code> /// - /// <p> - /// In addition you should periodically call <seealso cref="#maybeRefresh"/>. While it's + /// <para/> + /// In addition you should periodically call <see cref="ReferenceManager{G}.MaybeRefresh()"/>. While it's /// possible to call this just before running each query, this is discouraged /// since it penalizes the unlucky queries that do the reopen. It's better to use - /// a separate background thread, that periodically calls maybeReopen. Finally, - /// be sure to call <seealso cref="#close"/> once you are done. + /// a separate background thread, that periodically calls <see cref="ReferenceManager{G}.MaybeRefresh()"/>. Finally, + /// be sure to call <see cref="ReferenceManager{G}.Dispose()"/> once you are done. + /// <para/> + /// @lucene.experimental /// </summary> /// <seealso cref="SearcherFactory"/> - /// - /// @lucene.experimental </seealso> #if FEATURE_SERIALIZABLE [Serializable] #endif @@ -63,26 +66,26 @@ namespace Lucene.Net.Search private readonly SearcherFactory searcherFactory; /// <summary> - /// Creates and returns a new SearcherManager from the given - /// <seealso cref="IndexWriter"/>. + /// Creates and returns a new <see cref="SearcherManager"/> from the given + /// <see cref="IndexWriter"/>. /// </summary> /// <param name="writer"> - /// the IndexWriter to open the IndexReader from. </param> + /// The <see cref="IndexWriter"/> to open the <see cref="IndexReader"/> from. </param> /// <param name="applyAllDeletes"> - /// If <code>true</code>, all buffered deletes will be applied (made - /// visible) in the <seealso cref="IndexSearcher"/> / <seealso cref="DirectoryReader"/>. - /// If <code>false</code>, the deletes may or may not be applied, but - /// remain buffered (in IndexWriter) so that they will be applied in + /// If <c>true</c>, all buffered deletes will be applied (made + /// visible) in the <see cref="IndexSearcher"/> / <see cref="DirectoryReader"/>. + /// If <c>false</c>, the deletes may or may not be applied, but + /// remain buffered (in <see cref="IndexWriter"/>) so that they will be applied in /// the future. Applying deletes can be costly, so if your app can /// tolerate deleted documents being returned you might gain some - /// performance by passing <code>false</code>. See - /// <seealso cref="DirectoryReader#openIfChanged(DirectoryReader, IndexWriter, boolean)"/>. </param> + /// performance by passing <c>false</c>. See + /// <see cref="DirectoryReader.OpenIfChanged(DirectoryReader, IndexWriter, bool)"/>. </param> /// <param name="searcherFactory"> - /// An optional <see cref="SearcherFactory"/>. Pass <code>null</code> if you + /// An optional <see cref="SearcherFactory"/>. Pass <c>null</c> if you /// don't require the searcher to be warmed before going live or other /// custom behavior. /// </param> - /// <exception cref="IOException"> if there is a low-level I/O error </exception> + /// <exception cref="System.IO.IOException"> if there is a low-level I/O error </exception> public SearcherManager(IndexWriter writer, bool applyAllDeletes, SearcherFactory searcherFactory) { if (searcherFactory == null) @@ -94,13 +97,13 @@ namespace Lucene.Net.Search } /// <summary> - /// Creates and returns a new SearcherManager from the given <seealso cref="Directory"/>. </summary> - /// <param name="dir"> the directory to open the DirectoryReader on. </param> + /// Creates and returns a new <see cref="SearcherManager"/> from the given <see cref="Directory"/>. </summary> + /// <param name="dir"> The directory to open the <see cref="DirectoryReader"/> on. </param> /// <param name="searcherFactory"> An optional <see cref="SearcherFactory"/>. Pass - /// <code>null</code> if you don't require the searcher to be warmed + /// <c>null</c> if you don't require the searcher to be warmed /// before going live or other custom behavior. /// </param> - /// <exception cref="IOException"> if there is a low-level I/O error </exception> + /// <exception cref="System.IO.IOException"> If there is a low-level I/O error </exception> public SearcherManager(Directory dir, SearcherFactory searcherFactory) { if (searcherFactory == null) @@ -142,9 +145,9 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns <code>true</code> if no changes have occured since this searcher - /// ie. reader was opened, otherwise <code>false</code>. </summary> - /// <seealso cref= DirectoryReader#isCurrent() </seealso> + /// Returns <c>true</c> if no changes have occured since this searcher + /// ie. reader was opened, otherwise <c>false</c>. </summary> + /// <seealso cref="DirectoryReader.IsCurrent()"/> public bool IsSearcherCurrent() { IndexSearcher searcher = Acquire(); @@ -161,9 +164,9 @@ namespace Lucene.Net.Search } /// <summary> - /// Expert: creates a searcher from the provided {@link - /// IndexReader} using the provided {@link - /// SearcherFactory}. NOTE: this decRefs incoming reader + /// Expert: creates a searcher from the provided + /// <see cref="IndexReader"/> using the provided + /// <see cref="SearcherFactory"/>. NOTE: this decRefs incoming reader /// on throwing an exception. /// </summary> public static IndexSearcher GetSearcher(SearcherFactory searcherFactory, IndexReader reader) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/SloppyPhraseScorer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/SloppyPhraseScorer.cs b/src/Lucene.Net/Search/SloppyPhraseScorer.cs index 6665a45..7dcde13 100644 --- a/src/Lucene.Net/Search/SloppyPhraseScorer.cs +++ b/src/Lucene.Net/Search/SloppyPhraseScorer.cs @@ -86,14 +86,14 @@ namespace Lucene.Net.Search /// <summary> /// Score a candidate doc for all slop-valid position-combinations (matches) /// encountered while traversing/hopping the PhrasePositions. - /// <br> The score contribution of a match depends on the distance: - /// <br> - highest score for distance=0 (exact match). - /// <br> - score gets lower as distance gets higher. - /// <br>Example: for query "a b"~2, a document "x a b a y" can be scored twice: + /// <para/> The score contribution of a match depends on the distance: + /// <para/> - highest score for distance=0 (exact match). + /// <para/> - score gets lower as distance gets higher. + /// <para/>Example: for query "a b"~2, a document "x a b a y" can be scored twice: /// once for "a b" (distance=0), and once for "b a" (distance=2). - /// <br>Possibly not all valid combinations are encountered, because for efficiency - /// we always propagate the least PhrasePosition. this allows to base on - /// PriorityQueue and move forward faster. + /// <para/>Possibly not all valid combinations are encountered, because for efficiency + /// we always propagate the least PhrasePosition. This allows to base on + /// <see cref="Util.PriorityQueue{T}"/> and move forward faster. /// As result, for example, document "a b c b a" /// would score differently for queries "a b c"~4 and "c b a"~4, although /// they really are equivalent. @@ -148,7 +148,7 @@ namespace Lucene.Net.Search } /// <summary> - /// advance a PhrasePosition and update 'end', return false if exhausted </summary> + /// Advance a PhrasePosition and update 'end', return false if exhausted </summary> private bool AdvancePP(PhrasePositions pp) { if (!pp.NextPosition()) @@ -213,7 +213,7 @@ namespace Lucene.Net.Search } /// <summary> - /// compare two pps, but only by position and offset </summary> + /// Compare two pps, but only by position and offset </summary> private PhrasePositions Lesser(PhrasePositions pp, PhrasePositions pp2) { if (pp.position < pp2.position || (pp.position == pp2.position && pp.offset < pp2.offset)) @@ -224,7 +224,7 @@ namespace Lucene.Net.Search } /// <summary> - /// index of a pp2 colliding with pp, or -1 if none </summary> + /// Index of a pp2 colliding with pp, or -1 if none </summary> private int Collide(PhrasePositions pp) { int tpPos = TpPos(pp); @@ -241,19 +241,20 @@ namespace Lucene.Net.Search } /// <summary> - /// Initialize PhrasePositions in place. + /// Initialize <see cref="PhrasePositions"/> in place. /// A one time initialization for this scorer (on first doc matching all terms): - /// <ul> - /// <li>Check if there are repetitions - /// <li>If there are, find groups of repetitions. - /// </ul> + /// <list type="bullet"> + /// <item><description>Check if there are repetitions</description></item> + /// <item><description>If there are, find groups of repetitions.</description></item> + /// </list> /// Examples: - /// <ol> - /// <li>no repetitions: <b>"ho my"~2</b> - /// <li>repetitions: <b>"ho my my"~2</b> - /// <li>repetitions: <b>"my ho my"~2</b> - /// </ol> </summary> - /// <returns> false if PPs are exhausted (and so current doc will not be a match) </returns> + /// <list type="number"> + /// <item><description>no repetitions: <b>"ho my"~2</b></description></item> + /// <item><description>>repetitions: <b>"ho my my"~2</b></description></item> + /// <item><description>repetitions: <b>"my ho my"~2</b></description></item> + /// </list> + /// </summary> + /// <returns> <c>false</c> if PPs are exhausted (and so current doc will not be a match) </returns> private bool InitPhrasePositions() { end = int.MinValue; @@ -270,7 +271,7 @@ namespace Lucene.Net.Search } /// <summary> - /// no repeats: simplest case, and most common. It is important to keep this piece of the code simple and efficient </summary> + /// No repeats: simplest case, and most common. It is important to keep this piece of the code simple and efficient </summary> private void InitSimple() { //System.err.println("initSimple: doc: "+min.doc); @@ -288,7 +289,7 @@ namespace Lucene.Net.Search } /// <summary> - /// with repeats: not so simple. </summary> + /// With repeats: not so simple. </summary> private bool InitComplex() { //System.err.println("initComplex: doc: "+min.doc); @@ -302,7 +303,7 @@ namespace Lucene.Net.Search } /// <summary> - /// move all PPs to their first position </summary> + /// Move all PPs to their first position </summary> private void PlaceFirstPositions() { for (PhrasePositions pp = min, prev = null; prev != max; pp = (prev = pp).next) // iterate cyclic list: done once handled max @@ -312,7 +313,7 @@ namespace Lucene.Net.Search } /// <summary> - /// Fill the queue (all pps are already placed </summary> + /// Fill the queue (all pps are already placed) </summary> private void FillQueue() { pq.Clear(); @@ -329,12 +330,13 @@ namespace Lucene.Net.Search /// <summary> /// At initialization (each doc), each repetition group is sorted by (query) offset. /// this provides the start condition: no collisions. - /// <p>Case 1: no multi-term repeats<br> + /// <para/>Case 1: no multi-term repeats + /// <para/> /// It is sufficient to advance each pp in the group by one less than its group index. /// So lesser pp is not advanced, 2nd one advance once, 3rd one advanced twice, etc. - /// <p>Case 2: multi-term repeats<br> + /// <para/>Case 2: multi-term repeats /// </summary> - /// <returns> false if PPs are exhausted. </returns> + /// <returns> <c>false</c> if PPs are exhausted. </returns> private bool AdvanceRepeatGroups() { foreach (PhrasePositions[] rg in rptGroups) @@ -382,15 +384,23 @@ namespace Lucene.Net.Search } /// <summary> - /// initialize with checking for repeats. Heavy work, but done only for the first candidate doc.<p> - /// If there are repetitions, check if multi-term postings (MTP) are involved.<p> - /// Without MTP, once PPs are placed in the first candidate doc, repeats (and groups) are visible.<br> - /// With MTP, a more complex check is needed, up-front, as there may be "hidden collisions".<br> + /// Initialize with checking for repeats. Heavy work, but done only for the first candidate doc. + /// <para/> + /// If there are repetitions, check if multi-term postings (MTP) are involved. + /// <para/> + /// Without MTP, once PPs are placed in the first candidate doc, repeats (and groups) are visible. + /// <para/> + /// With MTP, a more complex check is needed, up-front, as there may be "hidden collisions". + /// <para/> /// For example P1 has {A,B}, P1 has {B,C}, and the first doc is: "A C B". At start, P1 would point - /// to "A", p2 to "C", and it will not be identified that P1 and P2 are repetitions of each other.<p> - /// The more complex initialization has two parts:<br> - /// (1) identification of repetition groups.<br> - /// (2) advancing repeat groups at the start of the doc.<br> + /// to "A", p2 to "C", and it will not be identified that P1 and P2 are repetitions of each other. + /// <para/> + /// The more complex initialization has two parts: + /// <para/> + /// (1) identification of repetition groups. + /// <para/> + /// (2) advancing repeat groups at the start of the doc. + /// <para/> /// For (1), a possible solution is to just create a single repetition group, /// made of all repeating pps. But this would slow down the check for collisions, /// as all pps would need to be checked. Instead, we compute "connected regions" @@ -421,7 +431,7 @@ namespace Lucene.Net.Search } /// <summary> - /// sort each repetition group by (query) offset. + /// Sort each repetition group by (query) offset. /// Done only once (at first doc) and allows to initialize faster for each doc. /// </summary> private void SortRptGroups(IList<IList<PhrasePositions>> rgs) @@ -459,7 +469,7 @@ namespace Lucene.Net.Search } /// <summary> - /// Detect repetition groups. Done once - for first doc </summary> + /// Detect repetition groups. Done once - for first doc. </summary> private IList<IList<PhrasePositions>> GatherRptGroups(LinkedHashMap<Term, int?> rptTerms) { PhrasePositions[] rpp = RepeatingPPs(rptTerms); @@ -538,7 +548,7 @@ namespace Lucene.Net.Search } /// <summary> - /// find repeating terms and assign them ordinal values </summary> + /// Find repeating terms and assign them ordinal values </summary> private LinkedHashMap<Term, int?> RepeatingTerms() { LinkedHashMap<Term, int?> tord = new LinkedHashMap<Term, int?>(); @@ -561,7 +571,7 @@ namespace Lucene.Net.Search } /// <summary> - /// find repeating pps, and for each, if has multi-terms, update this.hasMultiTermRpts </summary> + /// Find repeating pps, and for each, if has multi-terms, update this.hasMultiTermRpts </summary> private PhrasePositions[] RepeatingPPs(HashMap<Term, int?> rptTerms) { List<PhrasePositions> rp = new List<PhrasePositions>(); @@ -599,7 +609,7 @@ namespace Lucene.Net.Search } /// <summary> - /// union (term group) bit-sets until they are disjoint (O(n^^2)), and each group have different terms </summary> + /// Union (term group) bit-sets until they are disjoint (O(n^^2)), and each group have different terms </summary> private void UnionTermGroups(IList<FixedBitSet> bb) { int incr; @@ -624,7 +634,7 @@ namespace Lucene.Net.Search } /// <summary> - /// map each term to the single group that contains it </summary> + /// Map each term to the single group that contains it </summary> private IDictionary<Term, int> TermGroups(LinkedHashMap<Term, int?> tord, IList<FixedBitSet> bb) { Dictionary<Term, int> tg = new Dictionary<Term, int>(); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/Sort.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Sort.cs b/src/Lucene.Net/Search/Sort.cs index 9efd341..369f4bd 100644 --- a/src/Lucene.Net/Search/Sort.cs +++ b/src/Lucene.Net/Search/Sort.cs @@ -24,77 +24,77 @@ namespace Lucene.Net.Search /// <summary> /// Encapsulates sort criteria for returned hits. /// - /// <p>The fields used to determine sort order must be carefully chosen. - /// Documents must contain a single term in such a field, + /// <para/>The fields used to determine sort order must be carefully chosen. + /// <see cref="Documents.Document"/>s must contain a single term in such a field, /// and the value of the term should indicate the document's relative position in /// a given sort order. The field must be indexed, but should not be tokenized, /// and does not need to be stored (unless you happen to want it back with the /// rest of your document data). In other words: /// - /// <p><code>document.add (new Field ("byNumber", Integer.toString(x), Field.Store.NO, Field.Index.NOT_ANALYZED));</code></p> + /// <para/><code>document.Add(new Field("byNumber", x.ToString(CultureInfo.InvariantCulture), Field.Store.NO, Field.Index.NOT_ANALYZED));</code> /// /// - /// <p><h3>Valid Types of Values</h3> + /// <para/><h3>Valid Types of Values</h3> /// - /// <p>There are four possible kinds of term values which may be put into - /// sorting fields: Integers, Longs, Floats, or Strings. Unless - /// <seealso cref="SortField SortField"/> objects are specified, the type of value + /// <para/>There are four possible kinds of term values which may be put into + /// sorting fields: <see cref="int"/>s, <see cref="long"/>s, <see cref="float"/>s, or <see cref="string"/>s. Unless + /// <see cref="SortField"/> objects are specified, the type of value /// in the field is determined by parsing the first term in the field. /// - /// <p>Integer term values should contain only digits and an optional + /// <para/><see cref="int"/> term values should contain only digits and an optional /// preceding negative sign. Values must be base 10 and in the range /// <see cref="int.MinValue"/> and <see cref="int.MaxValue"/> inclusive. /// Documents which should appear first in the sort /// should have low value integers, later documents high values - /// (i.e. the documents should be numbered <code>1..n</code> where - /// <code>1</code> is the first and <code>n</code> the last). + /// (i.e. the documents should be numbered <c>1..n</c> where + /// <c>1</c> is the first and <c>n</c> the last). /// - /// <p>Long term values should contain only digits and an optional + /// <para/><see cref="long"/> term values should contain only digits and an optional /// preceding negative sign. Values must be base 10 and in the range - /// <code>Long.MIN_VALUE</code> and <code>Long.MAX_VALUE</code> inclusive. + /// <see cref="long.MinValue"/> and <see cref="long.MaxValue"/> inclusive. /// Documents which should appear first in the sort /// should have low value integers, later documents high values. /// - /// <p>Float term values should conform to values accepted by - /// <seealso cref="Float Float.valueOf(String)"/> (except that <code>NaN</code> - /// and <code>Infinity</code> are not supported). - /// Documents which should appear first in the sort + /// <para/><see cref="float"/> term values should conform to values accepted by + /// <see cref="Single"/> (except that <c>NaN</c> + /// and <c>Infinity</c> are not supported). + /// <see cref="Documents.Document"/>s which should appear first in the sort /// should have low values, later documents high values. /// - /// <p>String term values can contain any valid String, but should + /// <para/><see cref="string"/> term values can contain any valid <see cref="string"/>, but should /// not be tokenized. The values are sorted according to their - /// <seealso cref="Comparable natural order"/>. Note that using this type + /// comparable natural order (<see cref="StringComparer.Ordinal"/>). Note that using this type /// of term value has higher memory requirements than the other /// two types. /// - /// <p><h3>Object Reuse</h3> + /// <para/><h3>Object Reuse</h3> /// - /// <p>One of these objects can be + /// <para/>One of these objects can be /// used multiple times and the sort order changed between usages. /// - /// <p>this class is thread safe. + /// <para/>This class is thread safe. /// - /// <p><h3>Memory Usage</h3> + /// <para/><h3>Memory Usage</h3> /// - /// <p>Sorting uses of caches of term values maintained by the - /// internal HitQueue(s). The cache is static and contains an integer - /// or float array of length <code>IndexReader.maxDoc()</code> for each field + /// <para/>Sorting uses of caches of term values maintained by the + /// internal HitQueue(s). The cache is static and contains an <see cref="int"/> + /// or <see cref="float"/> array of length <c>IndexReader.MaxDoc</c> for each field /// name for which a sort is performed. In other words, the size of the /// cache in bytes is: /// - /// <p><code>4 * IndexReader.maxDoc() * (# of different fields actually used to sort)</code> + /// <para/><code>4 * IndexReader.MaxDoc * (# of different fields actually used to sort)</code> /// - /// <p>For String fields, the cache is larger: in addition to the + /// <para/>For <see cref="string"/> fields, the cache is larger: in addition to the /// above array, the value of every term in the field is kept in memory. /// If there are many unique terms in the field, this could /// be quite large. /// - /// <p>Note that the size of the cache is not affected by how many + /// <para/>Note that the size of the cache is not affected by how many /// fields are in the index and <i>might</i> be used to sort - only by /// the ones actually used to sort a result set. /// - /// <p>Created: Feb 12, 2004 10:53:57 AM - /// + /// <para/>Created: Feb 12, 2004 10:53:57 AM + /// <para/> /// @since lucene 1.4 /// </summary> #if FEATURE_SERIALIZABLE @@ -105,7 +105,7 @@ namespace Lucene.Net.Search /// <summary> /// Represents sorting by computed relevance. Using this sort criteria returns /// the same results as calling - /// <seealso cref="IndexSearcher#search(Query,int) IndexSearcher#search()"/>without a sort criteria, + /// <see cref="IndexSearcher.Search(Query, int)"/>without a sort criteria, /// only with slightly more overhead. /// </summary> public static readonly Sort RELEVANCE = new Sort(); @@ -118,8 +118,8 @@ namespace Lucene.Net.Search internal SortField[] fields; /// <summary> - /// Sorts by computed relevance. this is the same sort criteria as calling - /// <seealso cref="IndexSearcher#search(Query,int) IndexSearcher#search()"/>without a sort criteria, + /// Sorts by computed relevance. This is the same sort criteria as calling + /// <see cref="IndexSearcher.Search(Query, int)"/> without a sort criteria, /// only with slightly more overhead. /// </summary> public Sort() @@ -128,14 +128,14 @@ namespace Lucene.Net.Search } /// <summary> - /// Sorts by the criteria in the given SortField. </summary> + /// Sorts by the criteria in the given <see cref="SortField"/>. </summary> public Sort(SortField field) { SetSort(field); } /// <summary> - /// Sorts in succession by the criteria in each SortField. </summary> + /// Sorts in succession by the criteria in each <see cref="SortField"/>. </summary> public Sort(params SortField[] fields) { SetSort(fields); @@ -154,7 +154,7 @@ namespace Lucene.Net.Search } /// <summary> Representation of the sort criteria.</summary> - /// <returns> Array of SortField objects used in this sort criteria + /// <returns> Array of <see cref="SortField"/> objects used in this sort criteria /// </returns> [WritableArray] public virtual SortField[] GetSort() @@ -163,14 +163,15 @@ namespace Lucene.Net.Search } /// <summary> - /// Rewrites the SortFields in this Sort, returning a new Sort if any of the fields + /// Rewrites the <see cref="SortField"/>s in this <see cref="Sort"/>, returning a new <see cref="Sort"/> if any of the fields /// changes during their rewriting. + /// <para/> + /// @lucene.experimental /// </summary> - /// <param name="searcher"> IndexSearcher to use in the rewriting </param> - /// <returns> {@code this} if the Sort/Fields have not changed, or a new Sort if there + /// <param name="searcher"> <see cref="IndexSearcher"/> to use in the rewriting </param> + /// <returns> <c>this</c> if the Sort/Fields have not changed, or a new <see cref="Sort"/> if there /// is a change </returns> - /// <exception cref="IOException"> Can be thrown by the rewriting - /// @lucene.experimental </exception> + /// <exception cref="System.IO.IOException"> Can be thrown by the rewriting</exception> public virtual Sort Rewrite(IndexSearcher searcher) { bool changed = false; @@ -205,7 +206,7 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns true if <code>o</code> is equal to this. </summary> + /// Returns <c>true</c> if <paramref name="o"/> is equal to this. </summary> public override bool Equals(object o) { if (this == o) @@ -228,7 +229,7 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns true if the relevance score is needed to sort documents. </summary> + /// Returns <c>true</c> if the relevance score is needed to sort documents. </summary> public virtual bool NeedsScores { get http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/SortField.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/SortField.cs b/src/Lucene.Net/Search/SortField.cs index b9690d6..c82423a 100644 --- a/src/Lucene.Net/Search/SortField.cs +++ b/src/Lucene.Net/Search/SortField.cs @@ -29,10 +29,10 @@ namespace Lucene.Net.Search /// Stores information about how to sort documents by terms in an individual /// field. Fields must be indexed in order to sort by them. /// - /// <p>Created: Feb 11, 2004 1:25:29 PM - /// + /// <para/>Created: Feb 11, 2004 1:25:29 PM + /// <para/> /// @since lucene 1.4 </summary> - /// <seealso cref= Sort </seealso> + /// <seealso cref="Sort"/> #if FEATURE_SERIALIZABLE [Serializable] #endif @@ -84,9 +84,9 @@ namespace Lucene.Net.Search /// <summary> /// Creates a sort by terms in the given field with the type of term /// values explicitly given. </summary> - /// <param name="field"> Name of field to sort by. Can be <code>null</code> if - /// <code>type</code> is SCORE or DOC. </param> - /// <param name="type"> Type of values in the terms. </param> + /// <param name="field"> Name of field to sort by. Can be <c>null</c> if + /// <paramref name="type"/> is <see cref="SortFieldType.SCORE"/> or <see cref="SortFieldType.DOC"/>. </param> + /// <param name="type"> Type of values in the terms. </param> public SortField(string field, SortFieldType type) { InitFieldType(field, type); @@ -95,10 +95,10 @@ namespace Lucene.Net.Search /// <summary> /// Creates a sort, possibly in reverse, by terms in the given field with the /// type of term values explicitly given. </summary> - /// <param name="field"> Name of field to sort by. Can be <code>null</code> if - /// <code>type</code> is SCORE or DOC. </param> + /// <param name="field"> Name of field to sort by. Can be <c>null</c> if + /// <paramref name="type"/> is <see cref="SortFieldType.SCORE"/> or <see cref="SortFieldType.DOC"/>. </param> /// <param name="type"> Type of values in the terms. </param> - /// <param name="reverse"> True if natural order should be reversed. </param> + /// <param name="reverse"> <c>True</c> if natural order should be reversed. </param> public SortField(string field, SortFieldType type, bool reverse) { InitFieldType(field, type); @@ -107,14 +107,14 @@ namespace Lucene.Net.Search /// <summary> /// Creates a sort by terms in the given field, parsed - /// to numeric values using a custom <seealso cref="IFieldCache.Parser"/>. </summary> - /// <param name="field"> Name of field to sort by. Must not be null. </param> - /// <param name="parser"> Instance of a <seealso cref="IFieldCache.Parser"/>, + /// to numeric values using a custom <see cref="FieldCache.IParser"/>. </summary> + /// <param name="field"> Name of field to sort by. Must not be <c>null</c>. </param> + /// <param name="parser"> Instance of a <see cref="FieldCache.IParser"/>, /// which must subclass one of the existing numeric - /// parsers from <seealso cref="IFieldCache"/>. Sort type is inferred + /// parsers from <see cref="IFieldCache"/>. Sort type is inferred /// by testing which numeric parser the parser subclasses. </param> - /// <exception cref="IllegalArgumentException"> if the parser fails to - /// subclass an existing numeric parser, or field is null </exception> + /// <exception cref="ArgumentException"> if the parser fails to + /// subclass an existing numeric parser, or field is <c>null</c> </exception> public SortField(string field, FieldCache.IParser parser) : this(field, parser, false) { @@ -122,15 +122,15 @@ namespace Lucene.Net.Search /// <summary> /// Creates a sort, possibly in reverse, by terms in the given field, parsed - /// to numeric values using a custom <seealso cref="IFieldCache.Parser"/>. </summary> - /// <param name="field"> Name of field to sort by. Must not be null. </param> - /// <param name="parser"> Instance of a <seealso cref="IFieldCache.Parser"/>, + /// to numeric values using a custom <see cref="FieldCache.IParser"/>. </summary> + /// <param name="field"> Name of field to sort by. Must not be <c>null</c>. </param> + /// <param name="parser"> Instance of a <see cref="FieldCache.IParser"/>, /// which must subclass one of the existing numeric - /// parsers from <seealso cref="IFieldCache"/>. Sort type is inferred + /// parsers from <see cref="IFieldCache"/>. Sort type is inferred /// by testing which numeric parser the parser subclasses. </param> - /// <param name="reverse"> True if natural order should be reversed. </param> - /// <exception cref="IllegalArgumentException"> if the parser fails to - /// subclass an existing numeric parser, or field is null </exception> + /// <param name="reverse"> <c>True</c> if natural order should be reversed. </param> + /// <exception cref="ArgumentException"> if the parser fails to + /// subclass an existing numeric parser, or field is <c>null</c> </exception> public SortField(string field, FieldCache.IParser parser, bool reverse) { if (parser is FieldCache.IInt32Parser) @@ -141,9 +141,9 @@ namespace Lucene.Net.Search { InitFieldType(field, SortFieldType.SINGLE); } +#pragma warning disable 612, 618 else if (parser is FieldCache.IInt16Parser) { -#pragma warning disable 612, 618 InitFieldType(field, SortFieldType.INT16); } else if (parser is FieldCache.IByteParser) @@ -169,8 +169,8 @@ namespace Lucene.Net.Search } /// <summary> - /// Pass this to <seealso cref="#setMissingValue"/> to have missing - /// string values sort first. + /// Pass this to <see cref="MissingValue"/> to have missing + /// string values sort first. /// </summary> public static readonly object STRING_FIRST = new ObjectAnonymousInnerClassHelper(); @@ -190,8 +190,8 @@ namespace Lucene.Net.Search } /// <summary> - /// Pass this to <seealso cref="#setMissingValue"/> to have missing - /// string values sort last. + /// Pass this to <see cref="MissingValue"/> to have missing + /// string values sort last. /// </summary> public static readonly object STRING_LAST = new ObjectAnonymousInnerClassHelper2(); @@ -229,7 +229,7 @@ namespace Lucene.Net.Search /// <summary> /// Creates a sort with a custom comparison function. </summary> - /// <param name="field"> Name of field to sort by; cannot be <code>null</code>. </param> + /// <param name="field"> Name of field to sort by; cannot be <c>null</c>. </param> /// <param name="comparer"> Returns a comparer for sorting hits. </param> public SortField(string field, FieldComparerSource comparer) { @@ -239,9 +239,9 @@ namespace Lucene.Net.Search /// <summary> /// Creates a sort, possibly in reverse, with a custom comparison function. </summary> - /// <param name="field"> Name of field to sort by; cannot be <code>null</code>. </param> + /// <param name="field"> Name of field to sort by; cannot be <c>null</c>. </param> /// <param name="comparer"> Returns a comparer for sorting hits. </param> - /// <param name="reverse"> True if natural order should be reversed. </param> + /// <param name="reverse"> <c>True</c> if natural order should be reversed. </param> public SortField(string field, FieldComparerSource comparer, bool reverse) { InitFieldType(field, SortFieldType.CUSTOM); @@ -268,9 +268,9 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns the name of the field. Could return <code>null</code> - /// if the sort is by SCORE or DOC. </summary> - /// <returns> Name of field, possibly <code>null</code>. </returns> + /// Returns the name of the field. Could return <c>null</c> + /// if the sort is by <see cref="SortFieldType.SCORE"/> or <see cref="SortFieldType.DOC"/>. </summary> + /// <returns> Name of field, possibly <c>null</c>. </returns> public virtual string Field { get @@ -292,9 +292,9 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns the instance of a <seealso cref="IFieldCache"/> parser that fits to the given sort type. - /// May return <code>null</code> if no parser was specified. Sorting is using the default parser then. </summary> - /// <returns> An instance of a <seealso cref="IFieldCache"/> parser, or <code>null</code>. </returns> + /// Returns the instance of a <see cref="IFieldCache"/> parser that fits to the given sort type. + /// May return <c>null</c> if no parser was specified. Sorting is using the default parser then. </summary> + /// <returns> An instance of a <see cref="IFieldCache"/> parser, or <c>null</c>. </returns> public virtual FieldCache.IParser Parser { get @@ -305,7 +305,7 @@ namespace Lucene.Net.Search /// <summary> /// Returns whether the sort should be reversed. </summary> - /// <returns> True if natural order should be reversed. </returns> + /// <returns> <c>True</c> if natural order should be reversed. </returns> public virtual bool IsReverse { get @@ -315,8 +315,8 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns the <seealso cref="FieldComparerSource"/> used for - /// custom sorting + /// Returns the <see cref="FieldComparerSource"/> used for + /// custom sorting. /// </summary> public virtual FieldComparerSource ComparerSource { @@ -400,10 +400,10 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns true if <code>o</code> is equal to this. If a - /// <seealso cref="FieldComparerSource"/> or {@link - /// FieldCache.Parser} was provided, it must properly - /// implement equals (unless a singleton is always used). + /// Returns <c>true</c> if <paramref name="o"/> is equal to this. If a + /// <see cref="FieldComparerSource"/> or + /// <see cref="FieldCache.IParser"/> was provided, it must properly + /// implement equals (unless a singleton is always used). /// </summary> public override bool Equals(object o) { @@ -423,11 +423,11 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns true if <code>o</code> is equal to this. If a - /// <seealso cref="FieldComparerSource"/> or {@link - /// FieldCache.Parser} was provided, it must properly - /// implement hashCode (unless a singleton is always - /// used). + /// Returns a hash code value for this object. If a + /// <see cref="FieldComparerSource"/> or + /// <see cref="FieldCache.IParser"/> was provided, it must properly + /// implement GetHashCode() (unless a singleton is always + /// used). /// </summary> public override int GetHashCode() { @@ -458,17 +458,17 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns the <seealso cref="FieldComparer"/> to use for + /// Returns the <see cref="FieldComparer"/> to use for /// sorting. - /// + /// <para/> /// @lucene.experimental /// </summary> - /// <param name="numHits"> number of top hits the queue will store </param> - /// <param name="sortPos"> position of this SortField within {@link - /// Sort}. The comparer is primary if sortPos==0, + /// <param name="numHits"> Number of top hits the queue will store </param> + /// <param name="sortPos"> Position of this <see cref="SortField"/> within + /// <see cref="Sort"/>. The comparer is primary if sortPos==0, /// secondary if sortPos==1, etc. Some comparers can /// optimize themselves when they are the primary sort. </param> - /// <returns> <seealso cref="FieldComparer"/> to use when sorting </returns> + /// <returns> <see cref="FieldComparer"/> to use when sorting </returns> public virtual FieldComparer GetComparer(int numHits, int sortPos) { switch (type) @@ -519,14 +519,15 @@ namespace Lucene.Net.Search } /// <summary> - /// Rewrites this SortField, returning a new SortField if a change is made. + /// Rewrites this <see cref="SortField"/>, returning a new <see cref="SortField"/> if a change is made. /// Subclasses should override this define their rewriting behavior when this - /// SortField is of type <seealso cref="SortField.Type#REWRITEABLE"/> + /// SortField is of type <see cref="SortFieldType.REWRITEABLE"/>. + /// <para/> + /// @lucene.experimental /// </summary> - /// <param name="searcher"> IndexSearcher to use during rewriting </param> - /// <returns> New rewritten SortField, or {@code this} if nothing has changed. </returns> - /// <exception cref="IOException"> Can be thrown by the rewriting - /// @lucene.experimental </exception> + /// <param name="searcher"> <see cref="IndexSearcher"/> to use during rewriting </param> + /// <returns> New rewritten <see cref="SortField"/>, or <c>this</c> if nothing has changed. </returns> + /// <exception cref="System.IO.IOException"> Can be thrown by the rewriting </exception> public virtual SortField Rewrite(IndexSearcher searcher) { return this; @@ -546,25 +547,25 @@ namespace Lucene.Net.Search public enum SortFieldType // LUCENENET NOTE: de-nested and renamed from Type to avoid naming collision with Type property and with System.Type { /// <summary> - /// Sort by document score (relevance). Sort values are Float and higher + /// Sort by document score (relevance). Sort values are <see cref="float"/> and higher /// values are at the front. /// </summary> SCORE, /// <summary> - /// Sort by document number (index order). Sort values are Integer and lower + /// Sort by document number (index order). Sort values are <see cref="int"/> and lower /// values are at the front. /// </summary> DOC, /// <summary> - /// Sort using term values as Strings. Sort values are String and lower + /// Sort using term values as <see cref="string"/>s. Sort values are <see cref="string"/>s and lower /// values are at the front. /// </summary> STRING, /// <summary> - /// Sort using term values as encoded Integers. Sort values are Integer and + /// Sort using term values as encoded <see cref="int"/>s. Sort values are <see cref="int"/> and /// lower values are at the front. /// <para/> /// NOTE: This was INT in Lucene @@ -572,7 +573,7 @@ namespace Lucene.Net.Search INT32, /// <summary> - /// Sort using term values as encoded Floats. Sort values are Float and + /// Sort using term values as encoded <see cref="float"/>s. Sort values are <see cref="float"/> and /// lower values are at the front. /// <para/> /// NOTE: This was FLOAT in Lucene @@ -580,7 +581,7 @@ namespace Lucene.Net.Search SINGLE, /// <summary> - /// Sort using term values as encoded Longs. Sort values are Long and + /// Sort using term values as encoded <see cref="long"/>s. Sort values are <see cref="long"/> and /// lower values are at the front. /// <para/> /// NOTE: This was LONG in Lucene @@ -588,13 +589,13 @@ namespace Lucene.Net.Search INT64, /// <summary> - /// Sort using term values as encoded Doubles. Sort values are Double and + /// Sort using term values as encoded <see cref="double"/>s. Sort values are <see cref="double"/> and /// lower values are at the front. /// </summary> DOUBLE, /// <summary> - /// Sort using term values as encoded Shorts. Sort values are Short and + /// Sort using term values as encoded <see cref="short"/>s. Sort values are <see cref="short"/> and /// lower values are at the front. /// <para/> /// NOTE: This was SHORT in Lucene @@ -603,32 +604,32 @@ namespace Lucene.Net.Search INT16, /// <summary> - /// Sort using a custom Comparer. Sort values are any Comparable and + /// Sort using a custom <see cref="IComparer{T}"/>. Sort values are any <see cref="IComparable{T}"/> and /// sorting is done according to natural order. /// </summary> CUSTOM, /// <summary> - /// Sort using term values as encoded Bytes. Sort values are Byte and + /// Sort using term values as encoded <see cref="byte"/>s. Sort values are <see cref="byte"/> and /// lower values are at the front. /// </summary> [System.Obsolete] BYTE, /// <summary> - /// Sort using term values as Strings, but comparing by - /// value (using String.compareTo) for all comparisons. - /// this is typically slower than <seealso cref="#STRING"/>, which + /// Sort using term values as <see cref="string"/>s, but comparing by + /// value (using <see cref="BytesRef.CompareTo(BytesRef)"/>) for all comparisons. + /// this is typically slower than <see cref="STRING"/>, which /// uses ordinals to do the sorting. /// </summary> STRING_VAL, /// <summary> - /// Sort use byte[] index values. </summary> + /// Sort use <see cref="T:byte[]"/> index values. </summary> BYTES, /// <summary> - /// Force rewriting of SortField using <seealso cref="SortField#rewrite(IndexSearcher)"/> + /// Force rewriting of <see cref="SortField"/> using <see cref="SortField.Rewrite(IndexSearcher)"/> /// before it can be used for sorting /// </summary> REWRITEABLE http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/SortRescorer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/SortRescorer.cs b/src/Lucene.Net/Search/SortRescorer.cs index 459573b..810f2ee 100644 --- a/src/Lucene.Net/Search/SortRescorer.cs +++ b/src/Lucene.Net/Search/SortRescorer.cs @@ -24,7 +24,7 @@ namespace Lucene.Net.Search using AtomicReaderContext = Lucene.Net.Index.AtomicReaderContext; /// <summary> - /// A <seealso cref="Rescorer"/> that re-sorts according to a provided + /// A <see cref="Rescorer"/> that re-sorts according to a provided /// Sort. /// </summary> #if FEATURE_SERIALIZABLE http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/TermCollectingRewrite.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/TermCollectingRewrite.cs b/src/Lucene.Net/Search/TermCollectingRewrite.cs index 3250431..aac93b2 100644 --- a/src/Lucene.Net/Search/TermCollectingRewrite.cs +++ b/src/Lucene.Net/Search/TermCollectingRewrite.cs @@ -35,14 +35,14 @@ namespace Lucene.Net.Search #if FEATURE_SERIALIZABLE [Serializable] #endif - public abstract class TermCollectingRewrite<Q> : MultiTermQuery.RewriteMethod where Q : Query + public abstract class TermCollectingRewrite<Q> : MultiTermQuery.RewriteMethod where Q : Query // LUCENENET NOTE: Class was made public instaed of internal because it has public derived types { /// <summary> - /// Return a suitable top-level Query for holding all expanded terms. </summary> + /// Return a suitable top-level <see cref="Query"/> for holding all expanded terms. </summary> protected abstract Q GetTopLevelQuery(); /// <summary> - /// Add a MultiTermQuery term to the top-level query </summary> + /// Add a <see cref="MultiTermQuery"/> term to the top-level query </summary> protected void AddClause(Q topLevel, Term term, int docCount, float boost) { AddClause(topLevel, term, docCount, boost, null); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/TermQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/TermQuery.cs b/src/Lucene.Net/Search/TermQuery.cs index 8289c7d..aee74a8 100644 --- a/src/Lucene.Net/Search/TermQuery.cs +++ b/src/Lucene.Net/Search/TermQuery.cs @@ -38,8 +38,8 @@ namespace Lucene.Net.Search using ToStringUtils = Lucene.Net.Util.ToStringUtils; /// <summary> - /// A Query that matches documents containing a term. - /// this may be combined with other terms with a <seealso cref="BooleanQuery"/>. + /// A <see cref="Query"/> that matches documents containing a term. + /// this may be combined with other terms with a <see cref="BooleanQuery"/>. /// </summary> #if FEATURE_SERIALIZABLE [Serializable] @@ -107,8 +107,8 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns a <seealso cref="TermsEnum"/> positioned at this weights Term or null if - /// the term does not exist in the given context + /// Returns a <see cref="TermsEnum"/> positioned at this weights <see cref="Index.Term"/> or <c>null</c> if + /// the term does not exist in the given context. /// </summary> private TermsEnum GetTermsEnum(AtomicReaderContext context) { @@ -155,16 +155,16 @@ namespace Lucene.Net.Search } /// <summary> - /// Constructs a query for the term <code>t</code>. </summary> + /// Constructs a query for the term <paramref name="t"/>. </summary> public TermQuery(Term t) : this(t, -1) { } /// <summary> - /// Expert: constructs a TermQuery that will use the - /// provided docFreq instead of looking up the docFreq - /// against the searcher. + /// Expert: constructs a <see cref="TermQuery"/> that will use the + /// provided <paramref name="docFreq"/> instead of looking up the docFreq + /// against the searcher. /// </summary> public TermQuery(Term t, int docFreq) { @@ -174,9 +174,9 @@ namespace Lucene.Net.Search } /// <summary> - /// Expert: constructs a TermQuery that will use the - /// provided docFreq instead of looking up the docFreq - /// against the searcher. + /// Expert: constructs a <see cref="TermQuery"/> that will use the + /// provided docFreq instead of looking up the docFreq + /// against the searcher. /// </summary> public TermQuery(Term t, TermContext states) { @@ -241,7 +241,7 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns true iff <code>o</code> is equal to this. </summary> + /// Returns <c>true</c> if <paramref name="o"/> is equal to this. </summary> public override bool Equals(object o) { if (!(o is TermQuery)) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/TermRangeFilter.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/TermRangeFilter.cs b/src/Lucene.Net/Search/TermRangeFilter.cs index 39c27cb..128ac8a 100644 --- a/src/Lucene.Net/Search/TermRangeFilter.cs +++ b/src/Lucene.Net/Search/TermRangeFilter.cs @@ -22,16 +22,17 @@ namespace Lucene.Net.Search using BytesRef = Lucene.Net.Util.BytesRef; /// <summary> - /// A Filter that restricts search results to a range of term + /// A <see cref="Filter"/> that restricts search results to a range of term /// values in a given field. /// - /// <p>this filter matches the documents looking for terms that fall into the - /// supplied range according to {@link - /// Byte#compareTo(Byte)}, It is not intended - /// for numerical ranges; use <seealso cref="NumericRangeFilter"/> instead. + /// <para/>This filter matches the documents looking for terms that fall into the + /// supplied range according to + /// <see cref="byte.CompareTo(byte)"/>, It is not intended + /// for numerical ranges; use <see cref="NumericRangeFilter"/> instead. /// - /// <p>If you construct a large number of range filters with different ranges but on the - /// same field, <seealso cref="FieldCacheRangeFilter"/> may have significantly better performance. + /// <para/>If you construct a large number of range filters with different ranges but on the + /// same field, <see cref="FieldCacheRangeFilter"/> may have significantly better performance. + /// <para/> /// @since 2.9 /// </summary> #if FEATURE_SERIALIZABLE @@ -44,8 +45,8 @@ namespace Lucene.Net.Search /// <param name="upperTerm"> The upper bound on this range </param> /// <param name="includeLower"> Does this range include the lower bound? </param> /// <param name="includeUpper"> Does this range include the upper bound? </param> - /// <exception cref="IllegalArgumentException"> if both terms are null or if - /// lowerTerm is null and includeLower is true (similar for upperTerm + /// <exception cref="ArgumentException"> if both terms are <c>null</c> or if + /// lowerTerm is <c>null</c> and includeLower is <c>true</c> (similar for upperTerm /// and includeUpper) </exception> public TermRangeFilter(string fieldName, BytesRef lowerTerm, BytesRef upperTerm, bool includeLower, bool includeUpper) : base(new TermRangeQuery(fieldName, lowerTerm, upperTerm, includeLower, includeUpper)) @@ -53,7 +54,7 @@ namespace Lucene.Net.Search } /// <summary> - /// Factory that creates a new TermRangeFilter using Strings for term text. + /// Factory that creates a new <see cref="TermRangeFilter"/> using <see cref="string"/>s for term text. /// </summary> public static TermRangeFilter NewStringRange(string field, string lowerTerm, string upperTerm, bool includeLower, bool includeUpper) { @@ -63,8 +64,8 @@ namespace Lucene.Net.Search } /// <summary> - /// Constructs a filter for field <code>fieldName</code> matching - /// less than or equal to <code>upperTerm</code>. + /// Constructs a filter for field <paramref name="fieldName"/> matching + /// less than or equal to <paramref name="upperTerm"/>. /// </summary> public static TermRangeFilter Less(string fieldName, BytesRef upperTerm) { @@ -72,8 +73,8 @@ namespace Lucene.Net.Search } /// <summary> - /// Constructs a filter for field <code>fieldName</code> matching - /// greater than or equal to <code>lowerTerm</code>. + /// Constructs a filter for field <paramref name="fieldName"/> matching + /// greater than or equal to <paramref name="lowerTerm"/>. /// </summary> public static TermRangeFilter More(string fieldName, BytesRef lowerTerm) { @@ -101,14 +102,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 m_query.IncludesLower; } } /// <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 m_query.IncludesUpper; }
