Repository: lucenenet Updated Branches: refs/heads/master f43d23261 -> 1197b1aed
Lucene.Net.Search.Spans: Fixed up documentation comments Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/1197b1ae Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/1197b1ae Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/1197b1ae Branch: refs/heads/master Commit: 1197b1aed8d6566b94a20c0a84e7751587ce9440 Parents: f43d232 Author: Shad Storhaug <[email protected]> Authored: Fri Jun 2 06:32:50 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Fri Jun 2 06:32:50 2017 +0700 ---------------------------------------------------------------------- CONTRIBUTING.md | 2 +- src/Lucene.Net/Lucene.Net.csproj | 1 + .../Search/Payloads/AveragePayloadFunction.cs | 4 +-- .../Search/Payloads/MaxPayloadFunction.cs | 4 +-- .../Search/Payloads/MinPayloadFunction.cs | 2 -- .../Search/Payloads/PayloadFunction.cs | 12 ++++---- .../Search/Payloads/PayloadNearQuery.cs | 20 ++++++------- .../Search/Payloads/PayloadSpanUtil.cs | 9 +++--- .../Search/Payloads/PayloadTermQuery.cs | 31 ++++++++++---------- 9 files changed, 38 insertions(+), 47 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1197b1ae/CONTRIBUTING.md ---------------------------------------------------------------------- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c42e0bc..c54ac21 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,7 +52,7 @@ helpers to help with that, see for examples see our [Java style methods to avoid 1. Lucene.Net.Core (project) 1. Codecs (namespace) - 2. Search (namespace) + 2. Search (namespace) (Except for Search.Payloads) 3. Support (namespace) 4. Util (namespace) (Except for Util.Fst) 2. Lucene.Net.Codecs (project) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1197b1ae/src/Lucene.Net/Lucene.Net.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Lucene.Net.csproj b/src/Lucene.Net/Lucene.Net.csproj index eb166ac..0dd30df 100644 --- a/src/Lucene.Net/Lucene.Net.csproj +++ b/src/Lucene.Net/Lucene.Net.csproj @@ -42,6 +42,7 @@ <WarningLevel>4</WarningLevel> <PlatformTarget>AnyCPU</PlatformTarget> <Prefer32Bit>false</Prefer32Bit> + <DocumentationFile>bin\Debug\Lucene.Net.XML</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1197b1ae/src/Lucene.Net/Search/Payloads/AveragePayloadFunction.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Payloads/AveragePayloadFunction.cs b/src/Lucene.Net/Search/Payloads/AveragePayloadFunction.cs index 714daaa..88f7af8 100644 --- a/src/Lucene.Net/Search/Payloads/AveragePayloadFunction.cs +++ b/src/Lucene.Net/Search/Payloads/AveragePayloadFunction.cs @@ -21,10 +21,8 @@ namespace Lucene.Net.Search.Payloads /// <summary> /// Calculate the final score as the average score of all payloads seen. - /// <p/> + /// <para/> /// Is thread safe and completely reusable. - /// - /// /// </summary> #if FEATURE_SERIALIZABLE [Serializable] http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1197b1ae/src/Lucene.Net/Search/Payloads/MaxPayloadFunction.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Payloads/MaxPayloadFunction.cs b/src/Lucene.Net/Search/Payloads/MaxPayloadFunction.cs index 86a9fcd..4adfa98 100644 --- a/src/Lucene.Net/Search/Payloads/MaxPayloadFunction.cs +++ b/src/Lucene.Net/Search/Payloads/MaxPayloadFunction.cs @@ -21,10 +21,8 @@ namespace Lucene.Net.Search.Payloads /// <summary> /// Returns the maximum payload score seen, else 1 if there are no payloads on the doc. - /// <p/> + /// <para/> /// Is thread safe and completely reusable. - /// - /// /// </summary> #if FEATURE_SERIALIZABLE [Serializable] http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1197b1ae/src/Lucene.Net/Search/Payloads/MinPayloadFunction.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Payloads/MinPayloadFunction.cs b/src/Lucene.Net/Search/Payloads/MinPayloadFunction.cs index 88f5b8b..88c04a7 100644 --- a/src/Lucene.Net/Search/Payloads/MinPayloadFunction.cs +++ b/src/Lucene.Net/Search/Payloads/MinPayloadFunction.cs @@ -21,8 +21,6 @@ namespace Lucene.Net.Search.Payloads /// <summary> /// Calculates the minimum payload seen - /// - /// /// </summary> #if FEATURE_SERIALIZABLE [Serializable] http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1197b1ae/src/Lucene.Net/Search/Payloads/PayloadFunction.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Payloads/PayloadFunction.cs b/src/Lucene.Net/Search/Payloads/PayloadFunction.cs index fd2f8b2..7bba938 100644 --- a/src/Lucene.Net/Search/Payloads/PayloadFunction.cs +++ b/src/Lucene.Net/Search/Payloads/PayloadFunction.cs @@ -22,13 +22,11 @@ namespace Lucene.Net.Search.Payloads /// <summary> /// An abstract class that defines a way for Payload*Query instances to transform /// the cumulative effects of payload scores for a document. - /// </summary> - /// <seealso cref= Lucene.Net.Search.Payloads.PayloadTermQuery for more information - /// + /// <para/> /// @lucene.experimental this class and its derivations are experimental and subject to - /// change - /// - /// </seealso> + /// change + /// </summary> + /// <seealso cref="Lucene.Net.Search.Payloads.PayloadTermQuery"/> #if FEATURE_SERIALIZABLE [Serializable] #endif @@ -45,7 +43,7 @@ namespace Lucene.Net.Search.Payloads /// <param name="currentPayloadScore"> The score for the current payload </param> /// <returns> The new current Score /// </returns> - /// <seealso cref= Lucene.Net.Search.Spans.Spans </seealso> + /// <seealso cref="Lucene.Net.Search.Spans.Spans"/> public abstract float CurrentScore(int docId, string field, int start, int end, int numPayloadsSeen, float currentScore, float currentPayloadScore); /// <summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1197b1ae/src/Lucene.Net/Search/Payloads/PayloadNearQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Payloads/PayloadNearQuery.cs b/src/Lucene.Net/Search/Payloads/PayloadNearQuery.cs index 242fd85..b1ba7b6 100644 --- a/src/Lucene.Net/Search/Payloads/PayloadNearQuery.cs +++ b/src/Lucene.Net/Search/Payloads/PayloadNearQuery.cs @@ -35,18 +35,18 @@ namespace Lucene.Net.Search.Payloads using ToStringUtils = Lucene.Net.Util.ToStringUtils; /// <summary> - /// this class is very similar to - /// <seealso cref="Lucene.Net.Search.Spans.SpanNearQuery"/> except that it factors + /// This class is very similar to + /// <see cref="Lucene.Net.Search.Spans.SpanNearQuery"/> except that it factors /// in the value of the payloads located at each of the positions where the - /// <seealso cref="Lucene.Net.Search.Spans.TermSpans"/> occurs. - /// <p/> + /// <see cref="Lucene.Net.Search.Spans.TermSpans"/> occurs. + /// <para/> /// NOTE: In order to take advantage of this with the default scoring implementation - /// (<seealso cref="DefaultSimilarity"/>), you must override <seealso cref="DefaultSimilarity#scorePayload(int, int, int, BytesRef)"/>, + /// (<see cref="Similarities.DefaultSimilarity"/>), you must override <see cref="Similarities.DefaultSimilarity.ScorePayload(int, int, int, BytesRef)"/>, /// which returns 1 by default. - /// <p/> - /// Payload scores are aggregated using a pluggable <seealso cref="PayloadFunction"/>. + /// <para/> + /// Payload scores are aggregated using a pluggable <see cref="PayloadFunction"/>. /// </summary> - /// <seealso cref= Lucene.Net.Search.Similarities.Similarity.SimScorer#computePayloadFactor(int, int, int, BytesRef) </seealso> + /// <seealso cref="Lucene.Net.Search.Similarities.Similarity.SimScorer.ComputePayloadFactor(int, int, int, BytesRef)"/> #if FEATURE_SERIALIZABLE [Serializable] #endif @@ -262,14 +262,14 @@ namespace Lucene.Net.Search.Payloads internal BytesRef scratch = new BytesRef(); /// <summary> - /// By default, uses the <seealso cref="PayloadFunction"/> to score the payloads, but + /// By default, uses the <see cref="PayloadFunction"/> to score the payloads, but /// can be overridden to do other things. /// </summary> /// <param name="payLoads"> The payloads </param> /// <param name="start"> The start position of the span being scored </param> /// <param name="end"> The end position of the span being scored /// </param> - /// <seealso cref= spans </seealso> + /// <seealso cref="Spans.Spans"/> protected virtual void ProcessPayloads(ICollection<byte[]> payLoads, int start, int end) { foreach (var thePayload in payLoads) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1197b1ae/src/Lucene.Net/Search/Payloads/PayloadSpanUtil.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Payloads/PayloadSpanUtil.cs b/src/Lucene.Net/Search/Payloads/PayloadSpanUtil.cs index ddd5aa9..8f2673f 100644 --- a/src/Lucene.Net/Search/Payloads/PayloadSpanUtil.cs +++ b/src/Lucene.Net/Search/Payloads/PayloadSpanUtil.cs @@ -33,11 +33,10 @@ namespace Lucene.Net.Search.Payloads /// <summary> /// Experimental class to get set of payloads for most standard Lucene queries. - /// Operates like Highlighter - IndexReader should only contain doc of interest, + /// Operates like Highlighter - <see cref="Index.IndexReader"/> should only contain doc of interest, /// best to use MemoryIndex. - /// + /// <para/> /// @lucene.experimental - /// /// </summary> #if FEATURE_SERIALIZABLE [Serializable] @@ -49,7 +48,7 @@ namespace Lucene.Net.Search.Payloads /// <param name="context"> /// that contains doc with payloads to extract /// </param> - /// <seealso cref= IndexReader#getContext() </seealso> + /// <seealso cref="Index.IndexReader.Context"/> public PayloadSpanUtil(IndexReaderContext context) { this.context = context; @@ -60,7 +59,7 @@ namespace Lucene.Net.Search.Payloads /// </summary> /// <param name="query"> rewritten query </param> /// <returns> payloads Collection </returns> - /// <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 virtual ICollection<byte[]> GetPayloadsForQuery(Query query) { var payloads = new List<byte[]>(); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1197b1ae/src/Lucene.Net/Search/Payloads/PayloadTermQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Payloads/PayloadTermQuery.cs b/src/Lucene.Net/Search/Payloads/PayloadTermQuery.cs index 3e23209..bc93123 100644 --- a/src/Lucene.Net/Search/Payloads/PayloadTermQuery.cs +++ b/src/Lucene.Net/Search/Payloads/PayloadTermQuery.cs @@ -32,18 +32,17 @@ namespace Lucene.Net.Search.Payloads using TermSpans = Lucene.Net.Search.Spans.TermSpans; /// <summary> - /// this class is very similar to - /// <seealso cref="Lucene.Net.Search.Spans.SpanTermQuery"/> except that it factors + /// This class is very similar to + /// <see cref="Lucene.Net.Search.Spans.SpanTermQuery"/> except that it factors /// in the value of the payload located at each of the positions where the - /// <seealso cref="Lucene.Net.Index.Term"/> occurs. - /// <p/> + /// <see cref="Lucene.Net.Index.Term"/> occurs. + /// <para/> /// NOTE: In order to take advantage of this with the default scoring implementation - /// (<seealso cref="DefaultSimilarity"/>), you must override <seealso cref="DefaultSimilarity#scorePayload(int, int, int, BytesRef)"/>, + /// (<see cref="Similarities.DefaultSimilarity"/>), you must override <see cref="Similarities.DefaultSimilarity.ScorePayload(int, int, int, BytesRef)"/>, /// which returns 1 by default. - /// <p/> - /// Payload scores are aggregated using a pluggable <seealso cref="PayloadFunction"/>. </summary> - /// <seealso cref= Lucene.Net.Search.Similarities.Similarity.SimScorer#computePayloadFactor(int, int, int, BytesRef) - /// </seealso> + /// <para/> + /// Payload scores are aggregated using a pluggable <see cref="PayloadFunction"/>. </summary> + /// <seealso cref="Lucene.Net.Search.Similarities.Similarity.SimScorer.ComputePayloadFactor(int, int, int, BytesRef)"/> #if FEATURE_SERIALIZABLE [Serializable] #endif @@ -154,22 +153,22 @@ namespace Lucene.Net.Search.Payloads } /// - /// <returns> <seealso cref="#getSpanScore()"/> * <seealso cref="#getPayloadScore()"/> </returns> - /// <exception cref="IOException"> if there is a low-level I/O error </exception> + /// <returns> <see cref="GetSpanScore()"/> * <see cref="GetPayloadScore()"/> </returns> + /// <exception cref="System.IO.IOException"> if there is a low-level I/O error </exception> public override float GetScore() { return outerInstance.outerInstance.includeSpanScore ? GetSpanScore() * GetPayloadScore() : GetPayloadScore(); } /// <summary> - /// Returns the SpanScorer score only. - /// <p/> + /// Returns the <see cref="SpanScorer"/> score only. + /// <para/> /// Should not be overridden without good cause! /// </summary> /// <returns> the score for just the Span part w/o the payload </returns> - /// <exception cref="IOException"> if there is a low-level I/O error + /// <exception cref="System.IO.IOException"> if there is a low-level I/O error /// </exception> - /// <seealso cref= #score() </seealso> + /// <seealso cref="GetScore()"/> protected internal virtual float GetSpanScore() { return base.GetScore(); @@ -179,7 +178,7 @@ namespace Lucene.Net.Search.Payloads /// The score for the payload /// </summary> /// <returns> The score, as calculated by - /// <seealso cref="PayloadFunction#docScore(int, String, int, float)"/> </returns> + /// <see cref="PayloadFunction.DocScore(int, string, int, float)"/> </returns> protected internal virtual float GetPayloadScore() { return outerInstance.outerInstance.m_function.DocScore(m_doc, outerInstance.outerInstance.Term.Field, m_payloadsSeen, m_payloadScore);
