Lucene.Net.Search: 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/b2db5313 Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/b2db5313 Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/b2db5313 Branch: refs/heads/master Commit: b2db5313fd2dd81e07a8f6ca64fde2b6b89b945a Parents: 396db51 Author: Shad Storhaug <[email protected]> Authored: Sat Jun 3 22:51:17 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Sat Jun 3 22:52:41 2017 +0700 ---------------------------------------------------------------------- CONTRIBUTING.md | 5 +- src/Lucene.Net.Tests/Search/TestFieldCache.cs | 4 +- src/Lucene.Net.Tests/Search/TestSort.cs | 4 + .../Util/TestFieldCacheSanityChecker.cs | 4 +- src/Lucene.Net/Lucene.Net.csproj | 3 +- src/Lucene.Net/Search/AutomatonQuery.cs | 30 +- src/Lucene.Net/Search/BitsFilteredDocIdSet.cs | 26 +- src/Lucene.Net/Search/BooleanClause.cs | 18 +- src/Lucene.Net/Search/BooleanQuery.cs | 67 +- src/Lucene.Net/Search/BooleanScorer.cs | 66 +- src/Lucene.Net/Search/BooleanScorer2.cs | 28 +- src/Lucene.Net/Search/BoostAttribute.cs | 18 +- src/Lucene.Net/Search/BoostAttributeImpl.cs | 8 +- src/Lucene.Net/Search/BulkScorer.cs | 14 +- src/Lucene.Net/Search/CachingCollector.cs | 61 +- src/Lucene.Net/Search/CachingWrapperFilter.cs | 21 +- src/Lucene.Net/Search/CollectionStatistics.cs | 22 +- .../Search/CollectionTerminatedException.cs | 12 +- src/Lucene.Net/Search/Collector.cs | 163 +-- src/Lucene.Net/Search/ComplexExplanation.cs | 13 +- .../Search/ConstantScoreAutoRewrite.cs | 29 +- src/Lucene.Net/Search/ConstantScoreQuery.cs | 26 +- .../Search/ControlledRealTimeReopenThread.cs | 10 +- src/Lucene.Net/Search/DisjunctionMaxQuery.cs | 82 +- src/Lucene.Net/Search/DisjunctionMaxScorer.cs | 22 +- src/Lucene.Net/Search/DisjunctionScorer.cs | 18 +- src/Lucene.Net/Search/DisjunctionSumScorer.cs | 8 +- src/Lucene.Net/Search/DocIdSet.cs | 30 +- src/Lucene.Net/Search/DocIdSetIterator.cs | 76 +- src/Lucene.Net/Search/DocTermOrdsRangeFilter.cs | 18 +- .../Search/DocTermOrdsRewriteMethod.cs | 11 +- src/Lucene.Net/Search/Explanation.cs | 14 +- src/Lucene.Net/Search/FakeScorer.cs | 4 +- src/Lucene.Net/Search/FieldCache.cs | 1014 ++++++------------ src/Lucene.Net/Search/FieldCacheDocIdSet.cs | 13 +- src/Lucene.Net/Search/FieldCacheImpl.cs | 95 +- src/Lucene.Net/Search/FieldCacheRangeFilter.cs | 976 ++--------------- .../Search/FieldCacheRewriteMethod.cs | 9 +- src/Lucene.Net/Search/FieldCacheTermsFilter.cs | 40 +- src/Lucene.Net/Search/FieldComparator.cs | 391 +++---- src/Lucene.Net/Search/FieldComparatorSource.cs | 9 +- src/Lucene.Net/Search/FieldDoc.cs | 26 +- src/Lucene.Net/Search/FieldValueFilter.cs | 22 +- src/Lucene.Net/Search/FieldValueHitQueue.cs | 28 +- src/Lucene.Net/Search/Filter.cs | 28 +- src/Lucene.Net/Search/FilteredDocIdSet.cs | 24 +- .../Search/FilteredDocIdSetIterator.cs | 12 +- src/Lucene.Net/Search/FilteredQuery.cs | 150 +-- src/Lucene.Net/Search/FuzzyQuery.cs | 63 +- src/Lucene.Net/Search/FuzzyTermsEnum.cs | 45 +- src/Lucene.Net/Search/HitQueue.cs | 44 +- .../Search/IMaxNonCompetitiveBoostAttribute.cs | 46 - src/Lucene.Net/Search/ITopTermsRewrite.cs | 24 - src/Lucene.Net/Search/IndexSearcher.cs | 337 +++--- src/Lucene.Net/Search/LiveFieldValues.cs | 35 +- src/Lucene.Net/Search/MatchAllDocsQuery.cs | 1 - .../Search/MaxNonCompetitiveBoostAttribute.cs | 68 +- .../MaxNonCompetitiveBoostAttributeImpl.cs | 76 ++ .../Search/MinShouldMatchSumScorer.cs | 49 +- src/Lucene.Net/Search/MultiCollector.cs | 30 +- src/Lucene.Net/Search/MultiPhraseQuery.cs | 30 +- src/Lucene.Net/Search/MultiTermQuery.cs | 198 ++-- .../Search/MultiTermQueryWrapperFilter.cs | 26 +- src/Lucene.Net/Search/NGramPhraseQuery.cs | 9 +- src/Lucene.Net/Search/NumericRangeFilter.cs | 95 +- src/Lucene.Net/Search/NumericRangeQuery.cs | 232 ++-- src/Lucene.Net/Search/PhrasePositions.cs | 8 +- src/Lucene.Net/Search/PhraseQuery.cs | 31 +- .../Search/PositiveScoresOnlyCollector.cs | 4 +- src/Lucene.Net/Search/PrefixFilter.cs | 2 +- src/Lucene.Net/Search/PrefixQuery.cs | 10 +- src/Lucene.Net/Search/PrefixTermsEnum.cs | 8 +- src/Lucene.Net/Search/Query.cs | 52 +- src/Lucene.Net/Search/QueryRescorer.cs | 16 +- src/Lucene.Net/Search/QueryWrapperFilter.cs | 10 +- src/Lucene.Net/Search/ReferenceManager.cs | 137 +-- src/Lucene.Net/Search/RegexpQuery.cs | 53 +- src/Lucene.Net/Search/ReqExclScorer.cs | 32 +- src/Lucene.Net/Search/ReqOptSumScorer.cs | 18 +- src/Lucene.Net/Search/Rescorer.cs | 16 +- .../Search/ScoreCachingWrappingScorer.cs | 13 +- src/Lucene.Net/Search/ScoreDoc.cs | 14 +- src/Lucene.Net/Search/Scorer.cs | 48 +- src/Lucene.Net/Search/ScoringRewrite.cs | 46 +- src/Lucene.Net/Search/SearcherFactory.cs | 35 +- .../Search/SearcherLifetimeManager.cs | 163 +-- src/Lucene.Net/Search/SearcherManager.cs | 85 +- src/Lucene.Net/Search/SloppyPhraseScorer.cs | 94 +- src/Lucene.Net/Search/Sort.cs | 87 +- src/Lucene.Net/Search/SortField.cs | 151 +-- src/Lucene.Net/Search/SortRescorer.cs | 2 +- src/Lucene.Net/Search/TermCollectingRewrite.cs | 6 +- src/Lucene.Net/Search/TermQuery.cs | 24 +- src/Lucene.Net/Search/TermRangeFilter.cs | 33 +- src/Lucene.Net/Search/TermRangeQuery.cs | 37 +- src/Lucene.Net/Search/TermRangeTermsEnum.cs | 18 +- src/Lucene.Net/Search/TermScorer.cs | 23 +- src/Lucene.Net/Search/TermStatistics.cs | 14 +- src/Lucene.Net/Search/TimeLimitingCollector.cs | 93 +- src/Lucene.Net/Search/TopDocs.cs | 33 +- src/Lucene.Net/Search/TopDocsCollector.cs | 123 ++- src/Lucene.Net/Search/TopFieldCollector.cs | 212 ++-- src/Lucene.Net/Search/TopFieldDocs.cs | 4 +- src/Lucene.Net/Search/TopScoreDocCollector.cs | 26 +- src/Lucene.Net/Search/TopTermsRewrite.cs | 19 +- src/Lucene.Net/Search/Weight.cs | 127 +-- src/Lucene.Net/Search/WildcardQuery.cs | 17 +- 107 files changed, 3070 insertions(+), 4054 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/CONTRIBUTING.md ---------------------------------------------------------------------- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 45f77ee..ca36869 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,9 +52,8 @@ 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) (Except for Search.Payloads, Search.Similarities, and Search.Spans) - 3. Support (namespace) - 4. Util (namespace) (Except for Util.Fst) + 2. Support (namespace) + 3. Util (namespace) (Except for Util.Fst) 2. Lucene.Net.Codecs (project) See [Documenting Lucene.Net](https://cwiki.apache.org/confluence/display/LUCENENET/Documenting+Lucene.Net) for instructions. http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net.Tests/Search/TestFieldCache.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/Search/TestFieldCache.cs b/src/Lucene.Net.Tests/Search/TestFieldCache.cs index b360751..be8a5e4 100644 --- a/src/Lucene.Net.Tests/Search/TestFieldCache.cs +++ b/src/Lucene.Net.Tests/Search/TestFieldCache.cs @@ -204,6 +204,7 @@ namespace Lucene.Net.Search [Test] public virtual void Test() { +#pragma warning disable 612, 618 IFieldCache cache = FieldCache.DEFAULT; FieldCache.Doubles doubles = cache.GetDoubles(Reader, "theDouble", Random().NextBoolean()); Assert.AreSame(doubles, cache.GetDoubles(Reader, "theDouble", Random().NextBoolean()), "Second request to cache return same array"); @@ -221,7 +222,6 @@ namespace Lucene.Net.Search Assert.IsTrue(longs.Get(i) == (long.MaxValue - i), longs.Get(i) + " does not equal: " + (long.MaxValue - i) + " i=" + i); } -#pragma warning disable 612, 618 FieldCache.Bytes bytes = cache.GetBytes(Reader, "theByte", Random().NextBoolean()); Assert.AreSame(bytes, cache.GetBytes(Reader, "theByte", Random().NextBoolean()), "Second request to cache return same array"); Assert.AreSame(bytes, cache.GetBytes(Reader, "theByte", FieldCache.DEFAULT_BYTE_PARSER, Random().NextBoolean()), "Second request with explicit parser return same array"); @@ -237,7 +237,6 @@ namespace Lucene.Net.Search { Assert.IsTrue(shorts.Get(i) == (short)(short.MaxValue - i), shorts.Get(i) + " does not equal: " + (short.MaxValue - i)); } -#pragma warning restore 612, 618 FieldCache.Int32s ints = cache.GetInt32s(Reader, "theInt", Random().NextBoolean()); Assert.AreSame(ints, cache.GetInt32s(Reader, "theInt", Random().NextBoolean()), "Second request to cache return same array"); @@ -254,6 +253,7 @@ namespace Lucene.Net.Search { Assert.IsTrue(floats.Get(i) == (float.MaxValue - i), floats.Get(i) + " does not equal: " + (float.MaxValue - i)); } +#pragma warning restore 612, 618 IBits docsWithField = cache.GetDocsWithField(Reader, "theLong"); Assert.AreSame(docsWithField, cache.GetDocsWithField(Reader, "theLong"), "Second request to cache return same array"); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net.Tests/Search/TestSort.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/Search/TestSort.cs b/src/Lucene.Net.Tests/Search/TestSort.cs index f911682..c98bffa 100644 --- a/src/Lucene.Net.Tests/Search/TestSort.cs +++ b/src/Lucene.Net.Tests/Search/TestSort.cs @@ -1639,7 +1639,9 @@ namespace Lucene.Net.Search dir.Dispose(); } +#pragma warning disable 612, 618 private class ByteParserAnonymousInnerClassHelper : FieldCache.IByteParser +#pragma warning restore 612, 618 { private readonly TestSort OuterInstance; @@ -1697,7 +1699,9 @@ namespace Lucene.Net.Search dir.Dispose(); } +#pragma warning disable 612, 618 private class ShortParserAnonymousInnerClassHelper : FieldCache.IInt16Parser +#pragma warning restore 612, 618 { private readonly TestSort OuterInstance; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net.Tests/Util/TestFieldCacheSanityChecker.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/Util/TestFieldCacheSanityChecker.cs b/src/Lucene.Net.Tests/Util/TestFieldCacheSanityChecker.cs index 63243db..880d6a4 100644 --- a/src/Lucene.Net.Tests/Util/TestFieldCacheSanityChecker.cs +++ b/src/Lucene.Net.Tests/Util/TestFieldCacheSanityChecker.cs @@ -122,12 +122,14 @@ namespace Lucene.Net.Util cache.PurgeAllCaches(); cache.GetDoubles(ReaderA, "theDouble", false); +#pragma warning disable 612, 618 cache.GetDoubles(ReaderA, "theDouble", FieldCache.DEFAULT_DOUBLE_PARSER, false); cache.GetDoubles(ReaderAclone, "theDouble", FieldCache.DEFAULT_DOUBLE_PARSER, false); cache.GetDoubles(ReaderB, "theDouble", FieldCache.DEFAULT_DOUBLE_PARSER, false); cache.GetInt32s(ReaderX, "theInt", false); cache.GetInt32s(ReaderX, "theInt", FieldCache.DEFAULT_INT32_PARSER, false); +#pragma warning restore 612, 618 // // // @@ -148,9 +150,9 @@ namespace Lucene.Net.Util IFieldCache cache = FieldCache.DEFAULT; cache.PurgeAllCaches(); +#pragma warning disable 612, 618 cache.GetInt32s(ReaderX, "theInt", FieldCache.DEFAULT_INT32_PARSER, false); cache.GetTerms(ReaderX, "theInt", false); -#pragma warning disable 612, 618 cache.GetBytes(ReaderX, "theByte", false); #pragma warning restore 612, 618 http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Lucene.Net.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Lucene.Net.csproj b/src/Lucene.Net/Lucene.Net.csproj index eb166ac..3352bf3 100644 --- a/src/Lucene.Net/Lucene.Net.csproj +++ b/src/Lucene.Net/Lucene.Net.csproj @@ -445,11 +445,10 @@ <Compile Include="Search\FuzzyTermsEnum.cs" /> <Compile Include="Search\HitQueue.cs" /> <Compile Include="Search\IndexSearcher.cs" /> - <Compile Include="Search\ITopTermsRewrite.cs" /> <Compile Include="Search\LiveFieldValues.cs" /> <Compile Include="Search\MatchAllDocsQuery.cs" /> - <Compile Include="Search\IMaxNonCompetitiveBoostAttribute.cs" /> <Compile Include="Search\MaxNonCompetitiveBoostAttribute.cs" /> + <Compile Include="Search\MaxNonCompetitiveBoostAttributeImpl.cs" /> <Compile Include="Search\MinShouldMatchSumScorer.cs" /> <Compile Include="Search\MultiCollector.cs" /> <Compile Include="Search\MultiPhraseQuery.cs" /> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/AutomatonQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/AutomatonQuery.cs b/src/Lucene.Net/Search/AutomatonQuery.cs index fc85e4f..9d2ad73 100644 --- a/src/Lucene.Net/Search/AutomatonQuery.cs +++ b/src/Lucene.Net/Search/AutomatonQuery.cs @@ -29,21 +29,21 @@ namespace Lucene.Net.Search using ToStringUtils = Lucene.Net.Util.ToStringUtils; /// <summary> - /// A <seealso cref="Query"/> that will match terms against a finite-state machine. - /// <p> - /// this query will match documents that contain terms accepted by a given + /// A <see cref="Query"/> that will match terms against a finite-state machine. + /// <para> + /// This query will match documents that contain terms accepted by a given /// finite-state machine. The automaton can be constructed with the - /// <seealso cref="Lucene.Net.Util.Automaton"/> API. Alternatively, it can be - /// created from a regular expression with <seealso cref="RegexpQuery"/> or from - /// the standard Lucene wildcard syntax with <seealso cref="WildcardQuery"/>. - /// </p> - /// <p> + /// <see cref="Lucene.Net.Util.Automaton"/> API. Alternatively, it can be + /// created from a regular expression with <see cref="RegexpQuery"/> or from + /// the standard Lucene wildcard syntax with <see cref="WildcardQuery"/>. + /// </para> + /// <para> /// When the query is executed, it will create an equivalent DFA of the /// finite-state machine, and will enumerate the term dictionary in an /// intelligent way to reduce the number of comparisons. For example: the regular - /// expression of <code>[dl]og?</code> will make approximately four comparisons: + /// expression of <c>[dl]og?</c> will make approximately four comparisons: /// do, dog, lo, and log. - /// </p> + /// </para> /// @lucene.experimental /// </summary> #if FEATURE_SERIALIZABLE @@ -52,21 +52,21 @@ namespace Lucene.Net.Search public class AutomatonQuery : MultiTermQuery { /// <summary> - /// the automaton to match index terms against </summary> + /// The automaton to match index terms against </summary> protected readonly Automaton m_automaton; protected readonly CompiledAutomaton m_compiled; /// <summary> - /// term containing the field, and possibly some pattern structure </summary> + /// Term containing the field, and possibly some pattern structure </summary> protected readonly Term m_term; /// <summary> - /// Create a new AutomatonQuery from an <seealso cref="Automaton"/>. + /// Create a new AutomatonQuery from an <see cref="Automaton"/>. /// </summary> - /// <param name="term"> Term containing field and possibly some pattern structure. The + /// <param name="term"> <see cref="Term"/> containing field and possibly some pattern structure. The /// term text is ignored. </param> - /// <param name="automaton"> Automaton to run, terms that are accepted are considered a + /// <param name="automaton"> <see cref="Automaton"/> to run, terms that are accepted are considered a /// match. </param> public AutomatonQuery(Term term, Automaton automaton) : base(term.Field) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/BitsFilteredDocIdSet.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/BitsFilteredDocIdSet.cs b/src/Lucene.Net/Search/BitsFilteredDocIdSet.cs index ba03be0..5de931c 100644 --- a/src/Lucene.Net/Search/BitsFilteredDocIdSet.cs +++ b/src/Lucene.Net/Search/BitsFilteredDocIdSet.cs @@ -22,13 +22,13 @@ namespace Lucene.Net.Search using IBits = Lucene.Net.Util.IBits; /// <summary> - /// this implementation supplies a filtered DocIdSet, that excludes all - /// docids which are not in a Bits instance. this is especially useful in - /// <seealso cref="Lucene.Net.Search.Filter"/> to apply the {@code acceptDocs} - /// passed to {@code getDocIdSet()} before returning the final DocIdSet. + /// This implementation supplies a filtered <see cref="DocIdSet"/>, that excludes all + /// docids which are not in a <see cref="IBits"/> instance. This is especially useful in + /// <see cref="Lucene.Net.Search.Filter"/> to apply the <see cref="acceptDocs"/> + /// passed to <see cref="Filter.GetDocIdSet(Index.AtomicReaderContext, IBits)"/> before returning the final <see cref="DocIdSet"/>. /// </summary> - /// <seealso cref= DocIdSet </seealso> - /// <seealso cref= Lucene.Net.Search.Filter </seealso> + /// <seealso cref="DocIdSet"/> + /// <seealso cref="Lucene.Net.Search.Filter"/> #if FEATURE_SERIALIZABLE [Serializable] #endif @@ -37,10 +37,10 @@ namespace Lucene.Net.Search private readonly IBits acceptDocs; /// <summary> - /// Convenience wrapper method: If {@code acceptDocs == null} it returns the original set without wrapping. </summary> - /// <param name="set"> Underlying DocIdSet. If {@code null}, this method returns {@code null} </param> - /// <param name="acceptDocs"> Allowed docs, all docids not in this set will not be returned by this DocIdSet. - /// If {@code null}, this method returns the original set without wrapping. </param> + /// Convenience wrapper method: If <c>acceptDocs == null</c> it returns the original set without wrapping. </summary> + /// <param name="set"> Underlying DocIdSet. If <c>null</c>, this method returns <c>null</c> </param> + /// <param name="acceptDocs"> Allowed docs, all docids not in this set will not be returned by this <see cref="DocIdSet"/>. + /// If <c>null</c>, this method returns the original set without wrapping. </param> public static DocIdSet Wrap(DocIdSet set, IBits acceptDocs) { return (set == null || acceptDocs == null) ? set : new BitsFilteredDocIdSet(set, acceptDocs); @@ -48,14 +48,14 @@ namespace Lucene.Net.Search /// <summary> /// Constructor. </summary> - /// <param name="innerSet"> Underlying DocIdSet </param> - /// <param name="acceptDocs"> Allowed docs, all docids not in this set will not be returned by this DocIdSet </param> + /// <param name="innerSet"> Underlying <see cref="DocIdSet"/> </param> + /// <param name="acceptDocs"> Allowed docs, all docids not in this set will not be returned by this <see cref="DocIdSet"/> </param> public BitsFilteredDocIdSet(DocIdSet innerSet, IBits acceptDocs) : base(innerSet) { if (acceptDocs == null) { - throw new System.NullReferenceException("acceptDocs is null"); + throw new System.NullReferenceException("acceptDocs is null"); // LUCENENET TODO: API throw ArgumentNullException ? } this.acceptDocs = acceptDocs; } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/BooleanClause.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/BooleanClause.cs b/src/Lucene.Net/Search/BooleanClause.cs index e7bd463..cd81e97 100644 --- a/src/Lucene.Net/Search/BooleanClause.cs +++ b/src/Lucene.Net/Search/BooleanClause.cs @@ -20,7 +20,7 @@ namespace Lucene.Net.Search */ /// <summary> - /// A clause in a BooleanQuery. </summary> + /// A clause in a <see cref="BooleanQuery"/>. </summary> #if FEATURE_SERIALIZABLE [Serializable] #endif @@ -55,7 +55,7 @@ namespace Lucene.Net.Search private Occur occur; /// <summary> - /// Constructs a BooleanClause. + /// Constructs a <see cref="BooleanClause"/>. /// </summary> public BooleanClause(Query query, Occur occur) { @@ -104,7 +104,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) { BooleanClause bc = o as BooleanClause; @@ -126,7 +126,7 @@ namespace Lucene.Net.Search bool success = true; if (object.ReferenceEquals(null, other)) { - return object.ReferenceEquals(null, this); + return object.ReferenceEquals(null, this); // LUCENENET TODO: This can never happen - revert to original code } if (query == null) { @@ -152,16 +152,16 @@ namespace Lucene.Net.Search /// <summary> /// Use this operator for clauses that <i>should</i> appear in the - /// matching documents. For a BooleanQuery with no <code>MUST</code> - /// clauses one or more <code>SHOULD</code> clauses must match a document - /// for the BooleanQuery to match. </summary> - /// <seealso cref= BooleanQuery#setMinimumNumberShouldMatch</seealso> + /// matching documents. For a <see cref="BooleanQuery"/> with no <see cref="MUST"/> + /// clauses one or more <see cref="SHOULD"/> clauses must match a document + /// for the <see cref="BooleanQuery"/> to match. </summary> + /// <seealso cref="BooleanQuery.MinimumNumberShouldMatch"/> SHOULD, /// <summary> /// Use this operator for clauses that <i>must not</i> appear in the matching documents. /// Note that it is not possible to search for queries that only consist - /// of a <code>MUST_NOT</code> clause. + /// of a <see cref="MUST_NOT"/> clause. /// </summary> MUST_NOT } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/BooleanQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/BooleanQuery.cs b/src/Lucene.Net/Search/BooleanQuery.cs index b28ed5f..b144393 100644 --- a/src/Lucene.Net/Search/BooleanQuery.cs +++ b/src/Lucene.Net/Search/BooleanQuery.cs @@ -36,9 +36,9 @@ namespace Lucene.Net.Search using ToStringUtils = Lucene.Net.Util.ToStringUtils; /// <summary> - /// A Query that matches documents matching boolean combinations of other - /// queries, e.g. <seealso cref="TermQuery"/>s, <seealso cref="PhraseQuery"/>s or other - /// BooleanQuerys. + /// A <see cref="Query"/> that matches documents matching boolean combinations of other + /// queries, e.g. <see cref="TermQuery"/>s, <see cref="PhraseQuery"/>s or other + /// <see cref="BooleanQuery"/>s. /// </summary> #if FEATURE_SERIALIZABLE [Serializable] @@ -48,9 +48,9 @@ namespace Lucene.Net.Search private static int maxClauseCount = 1024; /// <summary> - /// Thrown when an attempt is made to add more than {@link - /// #getMaxClauseCount()} clauses. this typically happens if - /// a PrefixQuery, FuzzyQuery, WildcardQuery, or TermRangeQuery + /// Thrown when an attempt is made to add more than + /// <see cref="MaxClauseCount"/> clauses. This typically happens if + /// a <see cref="PrefixQuery"/>, <see cref="FuzzyQuery"/>, <see cref="WildcardQuery"/>, or <see cref="TermRangeQuery"/> /// is expanded to many terms during search. /// </summary> // LUCENENET: All exeption classes should be marked serializable @@ -79,9 +79,8 @@ namespace Lucene.Net.Search /// <summary> /// Return the maximum number of clauses permitted, 1024 by default. - /// Attempts to add more than the permitted number of clauses cause {@link - /// TooManyClauses} to be thrown. </summary> - /// <seealso cref= #setMaxClauseCount(int) </seealso> + /// Attempts to add more than the permitted number of clauses cause + /// <see cref="TooManyClausesException"/> to be thrown. </summary> public static int MaxClauseCount { get @@ -110,23 +109,23 @@ namespace Lucene.Net.Search /// <summary> /// Constructs an empty boolean query. - /// - /// <seealso cref="Similarity#coord(int,int)"/> may be disabled in scoring, as + /// <para/> + /// <see cref="Similarity.Coord(int,int)"/> may be disabled in scoring, as /// appropriate. For example, this score factor does not make sense for most - /// automatically generated queries, like <seealso cref="WildcardQuery"/> and {@link - /// FuzzyQuery}. + /// automatically generated queries, like <see cref="WildcardQuery"/> and + /// <see cref="FuzzyQuery"/>. /// </summary> - /// <param name="disableCoord"> disables <seealso cref="Similarity#coord(int,int)"/> in scoring. </param> + /// <param name="disableCoord"> Disables <see cref="Similarity.Coord(int,int)"/> in scoring. </param> public BooleanQuery(bool disableCoord) { this.disableCoord = disableCoord; } /// <summary> - /// Returns true iff <seealso cref="Similarity#coord(int,int)"/> is disabled in + /// Returns true if <see cref="Similarity.Coord(int,int)"/> is disabled in /// scoring for this query instance. </summary> - /// <seealso cref= #BooleanQuery(boolean) </seealso> - public virtual bool CoordDisabled // LUCENENET TODO: Change to CoordEnabled? Per MSDN, properties should be in the affirmative. + /// <seealso cref="BooleanQuery(bool)"/> + public virtual bool CoordDisabled // LUCENENET TODO: API Change to CoordEnabled? Per MSDN, properties should be in the affirmative. { get { @@ -135,21 +134,21 @@ namespace Lucene.Net.Search } /// <summary> - /// Specifies a minimum number of the optional BooleanClauses + /// Specifies a minimum number of the optional <see cref="BooleanClause"/>s /// which must be satisfied. /// - /// <p> + /// <para> /// By default no optional clauses are necessary for a match /// (unless there are no required clauses). If this method is used, /// then the specified number of clauses is required. - /// </p> - /// <p> + /// </para> + /// <para> /// Use of this method is totally independent of specifying that - /// any specific clauses are required (or prohibited). this number will + /// any specific clauses are required (or prohibited). This number will /// only be compared against the number of matching optional clauses. - /// </p> + /// </para> /// </summary> - /// <param name="min"> the number of optional clauses that must match </param> + /// <param name="value"> The number of optional clauses that must match </param> public virtual int MinimumNumberShouldMatch { set @@ -167,8 +166,8 @@ namespace Lucene.Net.Search /// <summary> /// Adds a clause to a boolean query. /// </summary> - /// <exception cref="TooManyClausesException"> if the new number of clauses exceeds the maximum clause number </exception> - /// <seealso cref= #getMaxClauseCount() </seealso> + /// <exception cref="TooManyClausesException"> If the new number of clauses exceeds the maximum clause number </exception> + /// <seealso cref="MaxClauseCount"/> public virtual void Add(Query query, Occur occur) { Add(new BooleanClause(query, occur)); @@ -176,8 +175,8 @@ namespace Lucene.Net.Search /// <summary> /// Adds a clause to a boolean query. </summary> - /// <exception cref="TooManyClausesException"> if the new number of clauses exceeds the maximum clause number </exception> - /// <seealso cref= #getMaxClauseCount() </seealso> + /// <exception cref="TooManyClausesException"> If the new number of clauses exceeds the maximum clause number </exception> + /// <seealso cref="MaxClauseCount"/> public virtual void Add(BooleanClause clause) { if (clauses.Count >= maxClauseCount) @@ -203,9 +202,9 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns an iterator on the clauses in this query. It implements the <seealso cref="Iterable"/> interface to + /// Returns an iterator on the clauses in this query. It implements the <see cref="T:IEnumerable{BooleanClause}"/> interface to /// make it possible to do: - /// <pre class="prettyprint">for (BooleanClause clause : booleanQuery) {}</pre> + /// <code>foreach (BooleanClause clause in booleanQuery) {}</code> /// </summary> public IEnumerator<BooleanClause> GetEnumerator() { @@ -218,9 +217,9 @@ namespace Lucene.Net.Search } /// <summary> - /// Expert: the Weight for BooleanQuery, used to + /// Expert: the <see cref="Weight"/> for <see cref="BooleanQuery"/>, used to /// normalize, score and explain these queries. - /// + /// <para/> /// @lucene.experimental /// </summary> #if FEATURE_SERIALIZABLE @@ -231,7 +230,7 @@ namespace Lucene.Net.Search private readonly BooleanQuery outerInstance; /// <summary> - /// The Similarity implementation. </summary> + /// The <see cref="Similarities.Similarity"/> implementation. </summary> protected Similarity m_similarity; protected List<Weight> m_weights; @@ -678,7 +677,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 BooleanQuery)) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/BooleanScorer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/BooleanScorer.cs b/src/Lucene.Net/Search/BooleanScorer.cs index 55137e2..44a6986 100644 --- a/src/Lucene.Net/Search/BooleanScorer.cs +++ b/src/Lucene.Net/Search/BooleanScorer.cs @@ -24,38 +24,40 @@ namespace Lucene.Net.Search using AtomicReaderContext = Lucene.Net.Index.AtomicReaderContext; using BooleanWeight = Lucene.Net.Search.BooleanQuery.BooleanWeight; - /* Description from Doug Cutting (excerpted from - * LUCENE-1483): - * - * BooleanScorer uses an array to score windows of - * 2K docs. So it scores docs 0-2K first, then docs 2K-4K, - * etc. For each window it iterates through all query terms - * and accumulates a score in table[doc%2K]. It also stores - * in the table a bitmask representing which terms - * contributed to the score. Non-zero scores are chained in - * a linked list. At the end of scoring each window it then - * iterates through the linked list and, if the bitmask - * matches the boolean constraints, collects a hit. For - * boolean queries with lots of frequent terms this can be - * much faster, since it does not need to update a priority - * queue for each posting, instead performing constant-time - * operations per posting. The only downside is that it - * results in hits being delivered out-of-order within the - * window, which means it cannot be nested within other - * scorers. But it works well as a top-level scorer. - * - * The new BooleanScorer2 implementation instead works by - * merging priority queues of postings, albeit with some - * clever tricks. For example, a pure conjunction (all terms - * required) does not require a priority queue. Instead it - * sorts the posting streams at the start, then repeatedly - * skips the first to to the last. If the first ever equals - * the last, then there's a hit. When some terms are - * required and some terms are optional, the conjunction can - * be evaluated first, then the optional terms can all skip - * to the match and be added to the score. Thus the - * conjunction can reduce the number of priority queue - * updates for the optional terms. */ + /// <summary> + /// Description from Doug Cutting (excerpted from + /// LUCENE-1483): + /// <para/> + /// <see cref="BooleanScorer"/> uses an array to score windows of + /// 2K docs. So it scores docs 0-2K first, then docs 2K-4K, + /// etc. For each window it iterates through all query terms + /// and accumulates a score in table[doc%2K]. It also stores + /// in the table a bitmask representing which terms + /// contributed to the score. Non-zero scores are chained in + /// a linked list. At the end of scoring each window it then + /// iterates through the linked list and, if the bitmask + /// matches the boolean constraints, collects a hit. For + /// boolean queries with lots of frequent terms this can be + /// much faster, since it does not need to update a priority + /// queue for each posting, instead performing constant-time + /// operations per posting. The only downside is that it + /// results in hits being delivered out-of-order within the + /// window, which means it cannot be nested within other + /// scorers. But it works well as a top-level scorer. + /// <para/> + /// The new BooleanScorer2 implementation instead works by + /// merging priority queues of postings, albeit with some + /// clever tricks. For example, a pure conjunction (all terms + /// required) does not require a priority queue. Instead it + /// sorts the posting streams at the start, then repeatedly + /// skips the first to to the last. If the first ever equals + /// the last, then there's a hit. When some terms are + /// required and some terms are optional, the conjunction can + /// be evaluated first, then the optional terms can all skip + /// to the match and be added to the score. Thus the + /// conjunction can reduce the number of priority queue + /// updates for the optional terms. + /// </summary> #if FEATURE_SERIALIZABLE [Serializable] #endif http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/BooleanScorer2.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/BooleanScorer2.cs b/src/Lucene.Net/Search/BooleanScorer2.cs index 9cf27ae..b7e56de 100644 --- a/src/Lucene.Net/Search/BooleanScorer2.cs +++ b/src/Lucene.Net/Search/BooleanScorer2.cs @@ -23,14 +23,14 @@ namespace Lucene.Net.Search using BooleanWeight = Lucene.Net.Search.BooleanQuery.BooleanWeight; - /* See the description in BooleanScorer.java, comparing - * BooleanScorer & BooleanScorer2 */ - /// <summary> - /// An alternative to BooleanScorer that also allows a minimum number + /// See the description in <see cref="BooleanScorer"/> comparing + /// <see cref="BooleanScorer"/> & <see cref="BooleanScorer2"/>. + /// <para/> + /// An alternative to <see cref="BooleanScorer"/> that also allows a minimum number /// of optional scorers that should match. - /// <br>Implements skipTo(), and has no limitations on the numbers of added scorers. - /// <br>Uses ConjunctionScorer, DisjunctionScorer, ReqOptScorer and ReqExclScorer. + /// <para/>Implements SkipTo(), and has no limitations on the numbers of added scorers. + /// <para/>Uses <see cref="ConjunctionScorer"/>, <see cref="DisjunctionScorer"/>, <see cref="ReqOptSumScorer"/> and <see cref="ReqExclScorer"/>. /// </summary> #if FEATURE_SERIALIZABLE [Serializable] @@ -78,25 +78,27 @@ namespace Lucene.Net.Search private int doc = -1; /// <summary> - /// Creates a <seealso cref="Scorer"/> with the given similarity and lists of required, + /// Creates a <see cref="Scorer"/> with the given similarity and lists of required, /// prohibited and optional scorers. In no required scorers are added, at least /// one of the optional scorers will have to match during the search. /// </summary> /// <param name="weight"> - /// The BooleanWeight to be used. </param> + /// The <see cref="BooleanWeight"/> to be used. </param> /// <param name="disableCoord"> - /// If this parameter is true, coordination level matching - /// (<seealso cref="Similarity#coord(int, int)"/>) is not used. </param> + /// If this parameter is <c>true</c>, coordination level matching + /// (<see cref="Similarities.Similarity.Coord(int, int)"/>) is not used. </param> /// <param name="minNrShouldMatch"> /// The minimum number of optional added scorers that should match /// during the search. In case no required scorers are added, at least /// one of the optional scorers will have to match during the search. </param> /// <param name="required"> - /// the list of required scorers. </param> + /// The list of required scorers. </param> /// <param name="prohibited"> - /// the list of prohibited scorers. </param> + /// The list of prohibited scorers. </param> /// <param name="optional"> - /// the list of optional scorers. </param> + /// The list of optional scorers. </param> + /// <param name="maxCoord"> + /// The max coord. </param> public BooleanScorer2(BooleanWeight weight, bool disableCoord, int minNrShouldMatch, IList<Scorer> required, IList<Scorer> prohibited, IList<Scorer> optional, int maxCoord) : base(weight) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/BoostAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/BoostAttribute.cs b/src/Lucene.Net/Search/BoostAttribute.cs index 971c70e..a0e798c 100644 --- a/src/Lucene.Net/Search/BoostAttribute.cs +++ b/src/Lucene.Net/Search/BoostAttribute.cs @@ -20,17 +20,21 @@ namespace Lucene.Net.Search */ /// <summary> - /// Add this <seealso cref="Attribute"/> to a <seealso cref="TermsEnum"/> returned by <seealso cref="MultiTermQuery#getTermsEnum(Terms,AttributeSource)"/> - /// and update the boost on each returned term. this enables to control the boost factor - /// for each matching term in <seealso cref="MultiTermQuery#SCORING_BOOLEAN_QUERY_REWRITE"/> or - /// <seealso cref="TopTermsRewrite"/> mode. - /// <seealso cref="FuzzyQuery"/> is using this to take the edit distance into account. - /// <p><b>Please note:</b> this attribute is intended to be added only by the TermsEnum - /// to itself in its constructor and consumed by the <seealso cref="MultiTermQuery.RewriteMethod"/>. + /// Add this <see cref="IAttribute"/> to a <see cref="Index.TermsEnum"/> returned by <see cref="MultiTermQuery.GetTermsEnum(Index.Terms, AttributeSource)"/> + /// and update the boost on each returned term. This enables to control the boost factor + /// for each matching term in <see cref="MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE"/> or + /// <see cref="TopTermsRewrite{Q}"/> mode. + /// <see cref="FuzzyQuery"/> is using this to take the edit distance into account. + /// <para/><b>Please note:</b> this attribute is intended to be added only by the <see cref="Index.TermsEnum"/> + /// to itself in its constructor and consumed by the <see cref="MultiTermQuery.RewriteMethod"/>. + /// <para/> /// @lucene.internal /// </summary> public interface IBoostAttribute : IAttribute { + /// <summary> + /// Gets or Sets the boost in this attribute. Default is <c>1.0f</c>. + /// </summary> float Boost { get; set; } } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/BoostAttributeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/BoostAttributeImpl.cs b/src/Lucene.Net/Search/BoostAttributeImpl.cs index 0fabe03..6a8be3e 100644 --- a/src/Lucene.Net/Search/BoostAttributeImpl.cs +++ b/src/Lucene.Net/Search/BoostAttributeImpl.cs @@ -23,7 +23,8 @@ namespace Lucene.Net.Search using IAttribute = Lucene.Net.Util.IAttribute; /// <summary> - /// Implementation class for <seealso cref="IBoostAttribute"/>. + /// Implementation class for <see cref="IBoostAttribute"/>. + /// <para/> /// @lucene.internal /// </summary> #if FEATURE_SERIALIZABLE @@ -31,10 +32,11 @@ namespace Lucene.Net.Search #endif public sealed class BoostAttribute : Attribute, IBoostAttribute { - /// <summary> - /// Sets the boost in this attribute </summary> private float boost = 1.0f; + /// <summary> + /// Gets or Sets the boost in this attribute. Default is <c>1.0f</c>. + /// </summary> public float Boost { get { return boost; } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/BulkScorer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/BulkScorer.cs b/src/Lucene.Net/Search/BulkScorer.cs index ae1f160..3649ccc 100644 --- a/src/Lucene.Net/Search/BulkScorer.cs +++ b/src/Lucene.Net/Search/BulkScorer.cs @@ -20,12 +20,12 @@ namespace Lucene.Net.Search */ /// <summary> - /// this class is used to score a range of documents at - /// once, and is returned by <seealso cref="Weight#bulkScorer"/>. Only - /// queries that have a more optimized means of scoring - /// across a range of documents need to override this. - /// Otherwise, a default implementation is wrapped around - /// the <seealso cref="Scorer"/> returned by <seealso cref="Weight#scorer"/>. + /// This class is used to score a range of documents at + /// once, and is returned by <see cref="Weight.GetBulkScorer(Index.AtomicReaderContext, bool, Util.IBits)"/>. Only + /// queries that have a more optimized means of scoring + /// across a range of documents need to override this. + /// Otherwise, a default implementation is wrapped around + /// the <see cref="Scorer"/> returned by <see cref="Weight.GetScorer(Index.AtomicReaderContext, Util.IBits)"/>. /// </summary> #if FEATURE_SERIALIZABLE [Serializable] @@ -45,7 +45,7 @@ namespace Lucene.Net.Search /// </summary> /// <param name="collector"> The collector to which all matching documents are passed. </param> /// <param name="max"> Score up to, but not including, this doc </param> - /// <returns> true if more matching documents may remain. </returns> + /// <returns> <c>true</c> if more matching documents may remain. </returns> public abstract bool Score(ICollector collector, int max); } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/CachingCollector.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/CachingCollector.cs b/src/Lucene.Net/Search/CachingCollector.cs index 4997efc..043d3be 100644 --- a/src/Lucene.Net/Search/CachingCollector.cs +++ b/src/Lucene.Net/Search/CachingCollector.cs @@ -27,22 +27,22 @@ namespace Lucene.Net.Search /// Caches all docs, and optionally also scores, coming from /// a search, and is then able to replay them to another /// collector. You specify the max RAM this class may use. - /// Once the collection is done, call <seealso cref="#isCached"/>. If - /// this returns true, you can use <seealso cref="#replay(Collector)"/> - /// against a new collector. If it returns false, this means + /// Once the collection is done, call <see cref="IsCached"/>. If + /// this returns <c>true</c>, you can use <see cref="Replay(ICollector)"/> + /// against a new collector. If it returns <c>false</c>, this means /// too much RAM was required and you must instead re-run the /// original search. /// - /// <p><b>NOTE</b>: this class consumes 4 (or 8 bytes, if + /// <para/><b>NOTE</b>: this class consumes 4 (or 8 bytes, if /// scoring is cached) per collected document. If the result /// set is large this can easily be a very substantial amount /// of RAM! /// - /// <p><b>NOTE</b>: this class caches at least 128 documents + /// <para/><b>NOTE</b>: this class caches at least 128 documents /// before checking RAM limits. /// - /// <p>See the Lucene <tt>modules/grouping</tt> module for more - /// details including a full code example.</p> + /// <para>See the Lucene <c>modules/grouping</c> module for more + /// details including a full code example.</para> /// /// @lucene.experimental /// </summary> @@ -125,7 +125,9 @@ namespace Lucene.Net.Search } } - // A CachingCollector which caches scores + /// <summary> + /// A <see cref="CachingCollector"/> which caches scores + /// </summary> #if FEATURE_SERIALIZABLE [Serializable] #endif @@ -259,7 +261,9 @@ namespace Lucene.Net.Search } } - // A CachingCollector which does not cache scores + /// <summary> + /// A <see cref="CachingCollector"/> which does not cache scores + /// </summary> #if FEATURE_SERIALIZABLE [Serializable] #endif @@ -383,9 +387,8 @@ namespace Lucene.Net.Search protected int m_lastDocBase; /// <summary> - /// Creates a <seealso cref="CachingCollector"/> which does not wrap another collector. - /// The cached documents and scores can later be {@link #replay(Collector) - /// replayed}. + /// Creates a <see cref="CachingCollector"/> which does not wrap another collector. + /// The cached documents and scores can later be replayed (<see cref="Replay(ICollector)"/>). /// </summary> /// <param name="acceptDocsOutOfOrder"> /// whether documents are allowed to be collected out-of-order </param> @@ -426,16 +429,16 @@ namespace Lucene.Net.Search } /// <summary> - /// Create a new <seealso cref="CachingCollector"/> that wraps the given collector and + /// Create a new <see cref="CachingCollector"/> that wraps the given collector and /// caches documents and scores up to the specified RAM threshold. /// </summary> /// <param name="other"> - /// the Collector to wrap and delegate calls to. </param> + /// The <see cref="ICollector"/> to wrap and delegate calls to. </param> /// <param name="cacheScores"> - /// whether to cache scores in addition to document IDs. Note that - /// this increases the RAM consumed per doc </param> + /// Whether to cache scores in addition to document IDs. Note that + /// this increases the RAM consumed per doc. </param> /// <param name="maxRAMMB"> - /// the maximum RAM in MB to consume for caching the documents and + /// The maximum RAM in MB to consume for caching the documents and /// scores. If the collector exceeds the threshold, no documents and /// scores are cached. </param> public static CachingCollector Create(ICollector other, bool cacheScores, double maxRAMMB) @@ -444,16 +447,16 @@ namespace Lucene.Net.Search } /// <summary> - /// Create a new <seealso cref="CachingCollector"/> that wraps the given collector and + /// Create a new <see cref="CachingCollector"/> that wraps the given collector and /// caches documents and scores up to the specified max docs threshold. /// </summary> /// <param name="other"> - /// the Collector to wrap and delegate calls to. </param> + /// The <see cref="ICollector"/> to wrap and delegate calls to. </param> /// <param name="cacheScores"> - /// whether to cache scores in addition to document IDs. Note that - /// this increases the RAM consumed per doc </param> + /// Whether to cache scores in addition to document IDs. Note that + /// this increases the RAM consumed per doc. </param> /// <param name="maxDocsToCache"> - /// the maximum number of documents for caching the documents and + /// The maximum number of documents for caching the documents and /// possible the scores. If the collector exceeds the threshold, /// no documents and scores are cached. </param> public static CachingCollector Create(ICollector other, bool cacheScores, int maxDocsToCache) @@ -517,7 +520,7 @@ namespace Lucene.Net.Search /// Called before successive calls to <see cref="Collect(int)"/>. Implementations /// that need the score of the current document (passed-in to /// <also cref="Collect(int)"/>), should save the passed-in <see cref="Scorer"/> and call - /// scorer.Score() when needed. + /// <see cref="Scorer.GetScore()"/> when needed. /// </summary> public abstract void SetScorer(Scorer scorer); @@ -559,15 +562,15 @@ namespace Lucene.Net.Search } /// <summary> - /// Replays the cached doc IDs (and scores) to the given Collector. If this - /// instance does not cache scores, then Scorer is not set on - /// {@code other.setScorer} as well as scores are not replayed. + /// Replays the cached doc IDs (and scores) to the given <see cref="ICollector"/>. If this + /// instance does not cache scores, then <see cref="Scorer"/> is not set on + /// <c>other.SetScorer(Scorer)</c> as well as scores are not replayed. /// </summary> /// <exception cref="InvalidOperationException"> - /// if this collector is not cached (i.e., if the RAM limits were too + /// If this collector is not cached (i.e., if the RAM limits were too /// low for the number of documents + scores to cache). </exception> - /// <exception cref="IllegalArgumentException"> - /// if the given Collect's does not support out-of-order collection, + /// <exception cref="ArgumentException"> + /// If the given Collect's does not support out-of-order collection, /// while the collector passed to the ctor does. </exception> public abstract void Replay(ICollector other); } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/CachingWrapperFilter.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/CachingWrapperFilter.cs b/src/Lucene.Net/Search/CachingWrapperFilter.cs index c086373..a35526e 100644 --- a/src/Lucene.Net/Search/CachingWrapperFilter.cs +++ b/src/Lucene.Net/Search/CachingWrapperFilter.cs @@ -30,7 +30,7 @@ namespace Lucene.Net.Search using WAH8DocIdSet = Lucene.Net.Util.WAH8DocIdSet; /// <summary> - /// Wraps another <seealso cref="Filter"/>'s result and caches it. The purpose is to allow + /// Wraps another <see cref="Search.Filter"/>'s result and caches it. The purpose is to allow /// filters to simply filter, and then wrap with this class /// to add caching. /// </summary> @@ -64,13 +64,14 @@ namespace Lucene.Net.Search } /// <summary> - /// Provide the DocIdSet to be cached, using the DocIdSet provided - /// by the wrapped Filter. <p>this implementation returns the given <seealso cref="DocIdSet"/>, - /// if <seealso cref="DocIdSet#isCacheable"/> returns <code>true</code>, else it calls - /// <seealso cref="#cacheImpl(DocIdSetIterator,AtomicReader)"/> - /// <p>Note: this method returns <seealso cref="#EMPTY_DOCIDSET"/> if the given docIdSet - /// is <code>null</code> or if <seealso cref="DocIdSet#iterator()"/> return <code>null</code>. The empty - /// instance is use as a placeholder in the cache instead of the <code>null</code> value. + /// Provide the <see cref="DocIdSet"/> to be cached, using the <see cref="DocIdSet"/> provided + /// by the wrapped Filter. + /// <para/>This implementation returns the given <see cref="DocIdSet"/>, + /// if <see cref="DocIdSet.IsCacheable"/> returns <c>true</c>, else it calls + /// <see cref="CacheImpl(DocIdSetIterator, AtomicReader)"/> + /// <para/>Note: this method returns <see cref="EMPTY_DOCIDSET"/> if the given <paramref name="docIdSet"/> + /// is <c>null</c> or if <see cref="DocIdSet.GetIterator()"/> return <c>null</c>. The empty + /// instance is use as a placeholder in the cache instead of the <c>null</c> value. /// </summary> protected virtual DocIdSet DocIdSetToCache(DocIdSet docIdSet, AtomicReader reader) { @@ -101,7 +102,7 @@ namespace Lucene.Net.Search } /// <summary> - /// Default cache implementation: uses <seealso cref="WAH8DocIdSet"/>. + /// Default cache implementation: uses <see cref="WAH8DocIdSet"/>. /// </summary> protected virtual DocIdSet CacheImpl(DocIdSetIterator iterator, AtomicReader reader) { @@ -155,7 +156,7 @@ namespace Lucene.Net.Search } /// <summary> - /// An empty {@code DocIdSet} instance </summary> + /// An empty <see cref="DocIdSet"/> instance </summary> protected static readonly DocIdSet EMPTY_DOCIDSET = new DocIdSetAnonymousInnerClassHelper(); #if FEATURE_SERIALIZABLE http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/CollectionStatistics.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/CollectionStatistics.cs b/src/Lucene.Net/Search/CollectionStatistics.cs index 6f08080..c65ae88 100644 --- a/src/Lucene.Net/Search/CollectionStatistics.cs +++ b/src/Lucene.Net/Search/CollectionStatistics.cs @@ -22,6 +22,7 @@ namespace Lucene.Net.Search /// <summary> /// Contains statistics for a collection (field) + /// <para/> /// @lucene.experimental /// </summary> #if FEATURE_SERIALIZABLE @@ -35,6 +36,9 @@ namespace Lucene.Net.Search private readonly long sumTotalTermFreq; private readonly long sumDocFreq; + /// <summary> + /// Sole constructor. + /// </summary> public CollectionStatistics(string field, long maxDoc, long docCount, long sumTotalTermFreq, long sumDocFreq) { Debug.Assert(maxDoc >= 0); @@ -49,41 +53,41 @@ namespace Lucene.Net.Search } /// <summary> - /// returns the field name </summary> + /// Returns the field name </summary> public string Field { get { return field; } } /// <summary> - /// returns the total number of documents, regardless of + /// Returns the total number of documents, regardless of /// whether they all contain values for this field. </summary> - /// <seealso cref= IndexReader#maxDoc() </seealso> + /// <seealso cref="Index.IndexReader.MaxDoc"/> public long MaxDoc { get { return maxDoc; } } /// <summary> - /// returns the total number of documents that + /// Returns the total number of documents that /// have at least one term for this field. </summary> - /// <seealso cref= Terms#getDocCount() </seealso> + /// <seealso cref="Index.Terms.DocCount"/> public long DocCount { get { return docCount; } } /// <summary> - /// returns the total number of tokens for this field </summary> - /// <seealso cref= Terms#getSumTotalTermFreq() </seealso> + /// Returns the total number of tokens for this field </summary> + /// <seealso cref="Index.Terms.SumTotalTermFreq"/> public long SumTotalTermFreq { get { return sumTotalTermFreq; } } /// <summary> - /// returns the total number of postings for this field </summary> - /// <seealso cref= Terms#getSumDocFreq() </seealso> + /// Returns the total number of postings for this field </summary> + /// <seealso cref="Index.Terms.SumDocFreq"/> public long SumDocFreq { get { return sumDocFreq; } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/CollectionTerminatedException.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/CollectionTerminatedException.cs b/src/Lucene.Net/Search/CollectionTerminatedException.cs index 7e837c7..a03c181 100644 --- a/src/Lucene.Net/Search/CollectionTerminatedException.cs +++ b/src/Lucene.Net/Search/CollectionTerminatedException.cs @@ -23,12 +23,12 @@ namespace Lucene.Net.Search */ /// <summary> - /// Throw this exception in <seealso cref="ICollector#collect(int)"/> to prematurely - /// terminate collection of the current leaf. - /// <p>Note: IndexSearcher swallows this exception and never re-throws it. - /// As a consequence, you should not catch it when calling - /// <seealso cref="IndexSearcher#search"/> as it is unnecessary and might hide misuse - /// of this exception. + /// Throw this exception in <see cref="ICollector.Collect(int)"/> to prematurely + /// terminate collection of the current leaf. + /// <para/>Note: <see cref="IndexSearcher"/> swallows this exception and never re-throws it. + /// As a consequence, you should not catch it when calling any overload of + /// <see cref="IndexSearcher.Search(Weight, FieldDoc, int, Sort, bool, bool, bool)"/> as it is unnecessary and might hide misuse + /// of this exception. /// </summary> // LUCENENET: All exeption classes should be marked serializable #if FEATURE_SERIALIZABLE http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/Collector.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Collector.cs b/src/Lucene.Net/Search/Collector.cs index 0174bb7..f3f9c31 100644 --- a/src/Lucene.Net/Search/Collector.cs +++ b/src/Lucene.Net/Search/Collector.cs @@ -20,102 +20,117 @@ namespace Lucene.Net.Search using AtomicReaderContext = Lucene.Net.Index.AtomicReaderContext; /// <summary> - /// <p>Expert: Collectors are primarily meant to be used to + /// <para>Expert: Collectors are primarily meant to be used to /// gather raw results from a search, and implement sorting - /// or custom result filtering, collation, etc. </p> + /// or custom result filtering, collation, etc. </para> /// - /// <p>Lucene's core collectors are derived from Collector. + /// <para>Lucene's core collectors are derived from Collector. /// Likely your application can use one of these classes, or - /// subclass <seealso cref="TopDocsCollector"/>, instead of - /// implementing Collector directly: + /// subclass <see cref="TopDocsCollector{T}"/>, instead of + /// implementing <see cref="ICollector"/> directly: /// - /// <ul> + /// <list type="bullet"> /// - /// <li><seealso cref="TopDocsCollector"/> is an abstract base class + /// <item><description><see cref="TopDocsCollector{T}"/> is an abstract base class /// that assumes you will retrieve the top N docs, /// according to some criteria, after collection is - /// done. </li> - /// - /// <li><seealso cref="TopScoreDocCollector"/> is a concrete subclass - /// <seealso cref="TopDocsCollector"/> and sorts according to score + - /// docID. this is used internally by the {@link - /// IndexSearcher} search methods that do not take an - /// explicit <seealso cref="Sort"/>. It is likely the most frequently - /// used collector.</li> - /// - /// <li><seealso cref="TopFieldCollector"/> subclasses {@link - /// TopDocsCollector} and sorts according to a specified - /// <seealso cref="Sort"/> object (sort by field). this is used - /// internally by the <seealso cref="IndexSearcher"/> search methods - /// that take an explicit <seealso cref="Sort"/>. - /// - /// <li><seealso cref="TimeLimitingCollector"/>, which wraps any other + /// done. </description></item> + /// + /// <item><description><see cref="TopScoreDocCollector"/> is a concrete subclass + /// <see cref="TopDocsCollector{T}"/> and sorts according to score + + /// docID. This is used internally by the + /// <see cref="IndexSearcher"/> search methods that do not take an + /// explicit <see cref="Sort"/>. It is likely the most frequently + /// used collector.</description></item> + /// + /// <item><description><see cref="TopFieldCollector"/> subclasses + /// <see cref="TopDocsCollector{T}"/> and sorts according to a specified + /// <see cref="Sort"/> object (sort by field). This is used + /// internally by the <see cref="IndexSearcher"/> search methods + /// that take an explicit <see cref="Sort"/>.</description></item> + /// + /// <item><description><see cref="TimeLimitingCollector"/>, which wraps any other /// Collector and aborts the search if it's taken too much - /// time.</li> + /// time.</description></item> /// - /// <li><seealso cref="PositiveScoresOnlyCollector"/> wraps any other - /// Collector and prevents collection of hits whose score - /// is <= 0.0</li> + /// <item><description><see cref="PositiveScoresOnlyCollector"/> wraps any other + /// <see cref="ICollector"/> and prevents collection of hits whose score + /// is <= 0.0</description></item> /// - /// </ul> + /// </list> + /// </para> /// - /// <p>Collector decouples the score from the collected doc: + /// <para><see cref="ICollector"/> decouples the score from the collected doc: /// the score computation is skipped entirely if it's not /// needed. Collectors that do need the score should - /// implement the <seealso cref="#setScorer"/> method, to hold onto the - /// passed <seealso cref="Scorer"/> instance, and call {@link - /// Scorer#score()} within the collect method to compute the + /// implement the <see cref="SetScorer(Scorer)"/> method, to hold onto the + /// passed <see cref="Scorer"/> instance, and call + /// <see cref="Scorer.GetScore()"/> within the collect method to compute the /// current hit's score. If your collector may request the /// score for a single hit multiple times, you should use - /// <seealso cref="ScoreCachingWrappingScorer"/>. </p> + /// <see cref="ScoreCachingWrappingScorer"/>. </para> /// - /// <p><b>NOTE:</b> The doc that is passed to the collect + /// <para><b>NOTE:</b> The doc that is passed to the collect /// method is relative to the current reader. If your /// collector needs to resolve this to the docID space of the /// Multi*Reader, you must re-base it by recording the - /// docBase from the most recent setNextReader call. Here's - /// a simple example showing how to collect docIDs into a - /// BitSet:</p> - /// - /// <pre class="prettyprint"> + /// docBase from the most recent <see cref="SetNextReader(AtomicReaderContext)"/> call. Here's + /// a simple example showing how to collect docIDs into an + /// <see cref="Util.OpenBitSet"/>:</para> + /// + /// <code> + /// private class MySearchCollector : ICollector + /// { + /// private readonly OpenBitSet bits; + /// private int docBase; + /// + /// public MySearchCollector(OpenBitSet bits) + /// { + /// if (bits == null) throw new ArgumentNullException("bits"); + /// this.bits = bits; + /// } + /// + /// // ignore scorer + /// public void SetScorer(Scorer scorer) + /// { + /// } + /// + /// // accept docs out of order (for a BitSet it doesn't matter) + /// public bool AcceptDocsOutOfOrder + /// { + /// get { return true; } + /// } + /// + /// public void Collect(int doc) + /// { + /// bits.Set(doc + docBase); + /// } + /// + /// public void SetNextReader(AtomicReaderContext context) + /// { + /// this.docBase = context.DocBase; + /// } + /// } + /// /// IndexSearcher searcher = new IndexSearcher(indexReader); - /// final BitSet bits = new BitSet(indexReader.maxDoc()); - /// searcher.search(query, new Collector() { - /// private int docBase; - /// - /// <em>// ignore scorer</em> - /// public void setScorer(Scorer scorer) { - /// } - /// - /// <em>// accept docs out of order (for a BitSet it doesn't matter)</em> - /// public boolean acceptsDocsOutOfOrder() { - /// return true; - /// } + /// OpenBitSet bits = new OpenBitSet(indexReader.MaxDoc); + /// searcher.Search(query, new MySearchCollector(bits)); + /// </code> /// - /// public void collect(int doc) { - /// bits.set(doc + docBase); - /// } - /// - /// public void setNextReader(AtomicReaderContext context) { - /// this.docBase = context.docBase; - /// } - /// }); - /// </pre> - /// - /// <p>Not all collectors will need to rebase the docID. For + /// <para>Not all collectors will need to rebase the docID. For /// example, a collector that simply counts the total number - /// of hits would skip it.</p> + /// of hits would skip it.</para> /// - /// <p><b>NOTE:</b> Prior to 2.9, Lucene silently filtered - /// out hits with score <= 0. As of 2.9, the core Collectors + /// <para><b>NOTE:</b> Prior to 2.9, Lucene silently filtered + /// out hits with score <= 0. As of 2.9, the core <see cref="ICollector"/>s /// no longer do that. It's very unusual to have such hits /// (a negative query boost, or function query returning /// negative custom scores, could cause it to happen). If - /// you need that behavior, use {@link - /// PositiveScoresOnlyCollector}.</p> + /// you need that behavior, use + /// <see cref="PositiveScoresOnlyCollector"/>.</para> /// /// @lucene.experimental - /// + /// <para/> /// @since 2.9 /// </summary> public interface ICollector // LUCENENET NOTE: This was an abstract class in Lucene, but made into an interface since we need one for Grouping's covariance @@ -123,8 +138,8 @@ namespace Lucene.Net.Search /// <summary> /// Called before successive calls to <see cref="Collect(int)"/>. Implementations /// that need the score of the current document (passed-in to - /// <also cref="Collect(int)"/>), should save the passed-in <see cref="Scorer"/> and call - /// scorer.Score() when needed. + /// <see cref="Collect(int)"/>), should save the passed-in <see cref="Scorer"/> and call + /// <c>scorer.GetScore()</c> when needed. /// </summary> void SetScorer(Scorer scorer); @@ -146,8 +161,8 @@ namespace Lucene.Net.Search /// <summary> /// Called before collecting from each <see cref="AtomicReaderContext"/>. All doc ids in /// <see cref="Collect(int)"/> will correspond to <see cref="Index.IndexReaderContext.Reader"/>. - /// - /// Add <see cref="AtomicReaderContext#docBase"/> to the current <see cref="Index.IndexReaderContext.Reader"/>'s + /// <para/> + /// Add <see cref="AtomicReaderContext.DocBase"/> to the current <see cref="Index.IndexReaderContext.Reader"/>'s /// internal document id to re-base ids in <see cref="Collect(int)"/>. /// </summary> /// <param name="context">next atomic reader context </param> @@ -171,4 +186,6 @@ namespace Lucene.Net.Search /// </summary> bool AcceptsDocsOutOfOrder { get; } } -} \ No newline at end of file +} + +// LUCENENET TODO: API: Create Collector.NewAnonymous() static delegate method to allow creation of collectors inline. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/ComplexExplanation.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/ComplexExplanation.cs b/src/Lucene.Net/Search/ComplexExplanation.cs index 92a5cc6..ae8be43 100644 --- a/src/Lucene.Net/Search/ComplexExplanation.cs +++ b/src/Lucene.Net/Search/ComplexExplanation.cs @@ -44,8 +44,9 @@ namespace Lucene.Net.Search } /// <summary> - /// The match status of this explanation node. </summary> - /// <returns> May be null if match status is unknown </returns> + /// Gets or Sets the match status assigned to this explanation node. + /// May be <c>null</c> if match status is unknown. + /// </summary> public virtual bool? Match { get @@ -59,13 +60,13 @@ namespace Lucene.Net.Search } /// <summary> - /// Indicates whether or not this Explanation models a good match. + /// Indicates whether or not this <see cref="Explanation"/> models a good match. /// - /// <p> + /// <para> /// If the match status is explicitly set (i.e.: not null) this method /// uses it; otherwise it defers to the superclass. - /// </p> </summary> - /// <seealso cref= #getMatch </seealso> + /// </para> </summary> + /// <seealso cref="Match"/> public override bool IsMatch { get http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/ConstantScoreAutoRewrite.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/ConstantScoreAutoRewrite.cs b/src/Lucene.Net/Search/ConstantScoreAutoRewrite.cs index a1c0cff..7c4f2a4 100644 --- a/src/Lucene.Net/Search/ConstantScoreAutoRewrite.cs +++ b/src/Lucene.Net/Search/ConstantScoreAutoRewrite.cs @@ -40,13 +40,17 @@ namespace Lucene.Net.Search // LUCENENET specific - making constructor internal since the class was meant to be internal internal ConstantScoreAutoRewrite() { } - // Defaults derived from rough tests with a 20.0 million - // doc Wikipedia index. With more than 350 terms in the - // query, the filter method is fastest: + /// <summary> + /// Defaults derived from rough tests with a 20.0 million + /// doc Wikipedia index. With more than 350 terms in the + /// query, the filter method is fastest: + /// </summary> public static int DEFAULT_TERM_COUNT_CUTOFF = 350; - // If the query will hit more than 1 in 1000 of the docs - // in the index (0.1%), the filter method is fastest: + /// <summary> + /// If the query will hit more than 1 in 1000 of the docs + /// in the index (0.1%), the filter method is fastest: + /// </summary> public static double DEFAULT_DOC_COUNT_PERCENT = 0.1; private int termCountCutoff = DEFAULT_TERM_COUNT_CUTOFF; @@ -54,8 +58,8 @@ namespace Lucene.Net.Search /// <summary> /// If the number of terms in this query is equal to or - /// larger than this setting then {@link - /// MultiTermQuery#CONSTANT_SCORE_FILTER_REWRITE} is used. + /// larger than this setting then + /// <see cref="MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE"/> is used. /// </summary> public virtual int TermCountCutoff { @@ -71,10 +75,11 @@ namespace Lucene.Net.Search /// <summary> /// If the number of documents to be visited in the - /// postings exceeds this specified percentage of the - /// maxDoc() for the index, then {@link - /// MultiTermQuery#CONSTANT_SCORE_FILTER_REWRITE} is used. </summary> - /// <param name="percent"> 0.0 to 100.0 </param> + /// postings exceeds this specified percentage of the + /// <see cref="Index.IndexReader.MaxDoc"/> for the index, then + /// <see cref="MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE"/> is used. + /// Value may be 0.0 to 100.0. + /// </summary> public virtual double DocCountPercent { set @@ -226,7 +231,7 @@ namespace Lucene.Net.Search } /// <summary> - /// Special implementation of BytesStartArray that keeps parallel arrays for <seealso cref="TermContext"/> </summary> + /// Special implementation of <see cref="BytesRefHash.BytesStartArray"/> that keeps parallel arrays for <see cref="TermContext"/> </summary> #if FEATURE_SERIALIZABLE [Serializable] #endif http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/ConstantScoreQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/ConstantScoreQuery.cs b/src/Lucene.Net/Search/ConstantScoreQuery.cs index 7ff56c2..254d267 100644 --- a/src/Lucene.Net/Search/ConstantScoreQuery.cs +++ b/src/Lucene.Net/Search/ConstantScoreQuery.cs @@ -43,7 +43,7 @@ namespace Lucene.Net.Search protected readonly Query m_query; /// <summary> - /// Strips off scores from the passed in Query. The hits will get a constant score + /// Strips off scores from the passed in <see cref="Search.Query"/>. The hits will get a constant score /// dependent on the boost factor of this query. /// </summary> public ConstantScoreQuery(Query query) @@ -57,11 +57,11 @@ namespace Lucene.Net.Search } /// <summary> - /// Wraps a Filter as a Query. The hits will get a constant score + /// Wraps a <see cref="Search.Filter"/> as a <see cref="Search.Query"/>. The hits will get a constant score /// dependent on the boost factor of this query. - /// If you simply want to strip off scores from a Query, no longer use - /// {@code new ConstantScoreQuery(new QueryWrapperFilter(query))}, instead - /// use <seealso cref="#ConstantScoreQuery(Query)"/>! + /// If you simply want to strip off scores from a <see cref="Search.Query"/>, no longer use + /// <c>new ConstantScoreQuery(new QueryWrapperFilter(query))</c>, instead + /// use <see cref="ConstantScoreQuery(Query)"/>! /// </summary> public ConstantScoreQuery(Filter filter) { @@ -74,7 +74,7 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns the encapsulated filter, returns {@code null} if a query is wrapped. </summary> + /// Returns the encapsulated filter, returns <c>null</c> if a query is wrapped. </summary> public virtual Filter Filter { get @@ -84,7 +84,7 @@ namespace Lucene.Net.Search } /// <summary> - /// Returns the encapsulated query, returns {@code null} if a filter is wrapped. </summary> + /// Returns the encapsulated query, returns <c>null</c> if a filter is wrapped. </summary> public virtual Query Query { get @@ -162,9 +162,9 @@ namespace Lucene.Net.Search public override float GetValueForNormalization() { // we calculate sumOfSquaredWeights of the inner weight, but ignore it (just to initialize everything) - /*if (InnerWeight != null) + /*if (InnerWeight != null) // LUCENENET TODO: BUG This code was in the original { - InnerWeight.ValueForNormalization; + return innerWeight.GetValueForNormalization(); }*/ queryWeight = outerInstance.Boost; return queryWeight * queryWeight; @@ -257,10 +257,10 @@ namespace Lucene.Net.Search } /// <summary> - /// We return this as our <seealso cref="bulkScorer"/> so that if the CSQ - /// wraps a query with its own optimized top-level - /// scorer (e.g. BooleanScorer) we can use that - /// top-level scorer. + /// We return this as our <see cref="BulkScorer"/> so that if the CSQ + /// wraps a query with its own optimized top-level + /// scorer (e.g. <see cref="BooleanScorer"/>) we can use that + /// top-level scorer. /// </summary> #if FEATURE_SERIALIZABLE [Serializable] http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b2db5313/src/Lucene.Net/Search/ControlledRealTimeReopenThread.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/ControlledRealTimeReopenThread.cs b/src/Lucene.Net/Search/ControlledRealTimeReopenThread.cs index 73a361b..9028c15 100644 --- a/src/Lucene.Net/Search/ControlledRealTimeReopenThread.cs +++ b/src/Lucene.Net/Search/ControlledRealTimeReopenThread.cs @@ -147,7 +147,7 @@ namespace Lucene.Net.Search /// until the searcher is reopened, by another via /// <see cref="ReferenceManager{T}.MaybeRefresh()"/> or until the <see cref="ReferenceManager{T}"/> is closed. /// </summary> - /// <param name="targetGen"> the generation to wait for </param> + /// <param name="targetGen"> The generation to wait for </param> public virtual void WaitForGeneration(long targetGen) { WaitForGeneration(targetGen, -1); @@ -160,16 +160,16 @@ namespace Lucene.Net.Search /// generation, this method will block until the /// searcher has been reopened by another thread via /// <see cref="ReferenceManager{T}.MaybeRefresh()"/>, the given waiting time has elapsed, or until - /// the <seealso cref="ReferenceManager{T}"/> is closed. + /// the <see cref="ReferenceManager{T}"/> is closed. /// <para/> /// NOTE: if the waiting time elapses before the requested target generation is /// available the current <see cref="SearcherManager"/> is returned instead. /// </summary> /// <param name="targetGen"> - /// the generation to wait for </param> + /// The generation to wait for </param> /// <param name="maxMS"> - /// maximum milliseconds to wait, or -1 to wait indefinitely </param> - /// <returns> true if the <paramref name="targetGen"/> is now available, + /// Maximum milliseconds to wait, or -1 to wait indefinitely </param> + /// <returns> <c>true</c> if the <paramref name="targetGen"/> is now available, /// or false if <paramref name="maxMS"/> wait time was exceeded </returns> public virtual bool WaitForGeneration(long targetGen, int maxMS) {
