lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [58/58] [abbrv] lucenenet git commit: Grouping: Updated member accessibility to be the same as Java Lucene.
Date Thu, 10 Nov 2016 11:34:09 GMT
Grouping: Updated member accessibility to be the same as Java Lucene.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/96d38eff
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/96d38eff
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/96d38eff

Branch: refs/heads/grouping
Commit: 96d38effd9f91433a21ddcbd781eb7c0b0c3df02
Parents: 987a985
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Tue Nov 8 02:05:56 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Tue Nov 8 02:48:35 2016 +0700

----------------------------------------------------------------------
 .../AbstractFirstPassGroupingCollector.cs       |  3 +-
 .../AbstractGroupFacetCollector.cs              | 12 +++---
 .../AbstractSecondPassGroupingCollector.cs      |  2 +-
 .../BlockGroupingCollector.cs                   |  5 +--
 src/Lucene.Net.Grouping/GroupingSearch.cs       | 44 ++++++++++----------
 src/Lucene.Net.Grouping/SearchGroup.cs          |  2 +-
 6 files changed, 34 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/96d38eff/src/Lucene.Net.Grouping/AbstractFirstPassGroupingCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Grouping/AbstractFirstPassGroupingCollector.cs b/src/Lucene.Net.Grouping/AbstractFirstPassGroupingCollector.cs
index 62440f1..ee58899 100644
--- a/src/Lucene.Net.Grouping/AbstractFirstPassGroupingCollector.cs
+++ b/src/Lucene.Net.Grouping/AbstractFirstPassGroupingCollector.cs
@@ -103,7 +103,7 @@ namespace Lucene.Net.Search.Grouping
         /// <param name="groupOffset">The offset in the collected groups</param>
         /// <param name="fillFields">Whether to fill to <see cref="SearchGroup.sortValues"/></param>
         /// <returns>top groups, starting from offset</returns>
-        public IEnumerable<ISearchGroup<TGroupValue>> GetTopGroups(int groupOffset,
bool fillFields)
+        public virtual IEnumerable<ISearchGroup<TGroupValue>> GetTopGroups(int
groupOffset, bool fillFields)
         {
 
             //System.out.println("FP.getTopGroups groupOffset=" + groupOffset + " fillFields="
+ fillFields + " groupMap.size()=" + groupMap.size());
@@ -371,6 +371,7 @@ namespace Lucene.Net.Search.Grouping
                 }
             }
         }
+
         private void BuildSortedSet()
         {
             var comparator = new BuildSortedSetComparer(this);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/96d38eff/src/Lucene.Net.Grouping/AbstractGroupFacetCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Grouping/AbstractGroupFacetCollector.cs b/src/Lucene.Net.Grouping/AbstractGroupFacetCollector.cs
index 6e3e014..30c7bd4 100644
--- a/src/Lucene.Net.Grouping/AbstractGroupFacetCollector.cs
+++ b/src/Lucene.Net.Grouping/AbstractGroupFacetCollector.cs
@@ -57,7 +57,7 @@ namespace Lucene.Net.Search.Grouping
         /// </param>
         /// <returns>grouped facet results</returns>
         /// <exception cref="IOException">If I/O related errors occur during merging
segment grouped facet counts.</exception>
-        public GroupedFacetResult MergeSegmentResults(int size, int minCount, bool orderByCount)
+        public virtual GroupedFacetResult MergeSegmentResults(int size, int minCount, bool
orderByCount)
         {
             if (segmentFacetCounts != null)
             {
@@ -200,7 +200,7 @@ namespace Lucene.Net.Search.Grouping
             /// <param name="offset">The offset in the collected facet entries during
merging</param>
             /// <param name="limit">The number of facets to return starting from the
offset.</param>
             /// <returns>a list of facet entries to be rendered based on the specified
offset and limit</returns>
-            public List<FacetEntry> GetFacetEntries(int offset, int limit)
+            public virtual List<FacetEntry> GetFacetEntries(int offset, int limit)
             {
                 List<FacetEntry> entries = new List<FacetEntry>();
 
@@ -225,7 +225,7 @@ namespace Lucene.Net.Search.Grouping
             /// <summary>
             /// Gets the sum of all facet entries counts.
             /// </summary>
-            public int TotalCount
+            public virtual int TotalCount
             {
                 get
                 {
@@ -236,7 +236,7 @@ namespace Lucene.Net.Search.Grouping
             /// <summary>
             /// Gets the number of groups that didn't have a facet value.
             /// </summary>
-            public int TotalMissingCount
+            public virtual int TotalMissingCount
             {
                 get
                 {
@@ -291,7 +291,7 @@ namespace Lucene.Net.Search.Grouping
             /// <summary>
             /// Gets the value of this facet entry
             /// </summary>
-            public BytesRef Value
+            public virtual BytesRef Value
             {
                 get
                 {
@@ -302,7 +302,7 @@ namespace Lucene.Net.Search.Grouping
             /// <summary>
             /// Gets the count (number of groups) of this facet entry.
             /// </summary>
-            public int Count
+            public virtual int Count
             {
                 get
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/96d38eff/src/Lucene.Net.Grouping/AbstractSecondPassGroupingCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Grouping/AbstractSecondPassGroupingCollector.cs b/src/Lucene.Net.Grouping/AbstractSecondPassGroupingCollector.cs
index e8aedc8..30f8c0b 100644
--- a/src/Lucene.Net.Grouping/AbstractSecondPassGroupingCollector.cs
+++ b/src/Lucene.Net.Grouping/AbstractSecondPassGroupingCollector.cs
@@ -129,7 +129,7 @@ namespace Lucene.Net.Search.Grouping
             return false;
         }
 
-        public ITopGroups<TGroupValue> GetTopGroups(int withinGroupOffset)
+        public virtual ITopGroups<TGroupValue> GetTopGroups(int withinGroupOffset)
         {
             GroupDocs<TGroupValue>[] groupDocsResult = new GroupDocs<TGroupValue>[groups.Count()];
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/96d38eff/src/Lucene.Net.Grouping/BlockGroupingCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Grouping/BlockGroupingCollector.cs b/src/Lucene.Net.Grouping/BlockGroupingCollector.cs
index 0f3549f..6a7afd5 100644
--- a/src/Lucene.Net.Grouping/BlockGroupingCollector.cs
+++ b/src/Lucene.Net.Grouping/BlockGroupingCollector.cs
@@ -132,7 +132,6 @@ namespace Lucene.Net.Search.Grouping
                 }
             }
 
-
             public override ICollection<ChildScorer> Children
             {
                 get
@@ -354,7 +353,7 @@ namespace Lucene.Net.Search.Grouping
         /// <param name="fillSortFields">
         /// If true then the Comparable values for the sort fields will be set
         /// </param>
-        public ITopGroups<object> GetTopGroups(Sort withinGroupSort, int groupOffset,
int withinGroupOffset, int maxDocsPerGroup, bool fillSortFields)
+        public virtual ITopGroups<object> GetTopGroups(Sort withinGroupSort, int groupOffset,
int withinGroupOffset, int maxDocsPerGroup, bool fillSortFields)
         {
             return GetTopGroups<object>(withinGroupSort, groupOffset, withinGroupOffset,
maxDocsPerGroup, fillSortFields);
         }
@@ -388,7 +387,7 @@ namespace Lucene.Net.Search.Grouping
         /// <param name="fillSortFields">
         /// If true then the Comparable values for the sort fields will be set
         /// </param>
-        public ITopGroups<TGroupValue> GetTopGroups<TGroupValue>(Sort withinGroupSort,
int groupOffset, int withinGroupOffset, int maxDocsPerGroup, bool fillSortFields)
+        public virtual ITopGroups<TGroupValue> GetTopGroups<TGroupValue>(Sort
withinGroupSort, int groupOffset, int withinGroupOffset, int maxDocsPerGroup, bool fillSortFields)
         {
 
             //if (queueFull) {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/96d38eff/src/Lucene.Net.Grouping/GroupingSearch.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Grouping/GroupingSearch.cs b/src/Lucene.Net.Grouping/GroupingSearch.cs
index 5bb98c5..4f46f1a 100644
--- a/src/Lucene.Net.Grouping/GroupingSearch.cs
+++ b/src/Lucene.Net.Grouping/GroupingSearch.cs
@@ -105,7 +105,7 @@ namespace Lucene.Net.Search.Grouping
         /// <param name="groupLimit">The number of groups to return from the specified
group offset</param>
         /// <returns>the grouped result as a <see cref="ITopGroups{Object}"/>
instance</returns>
         /// <exception cref="IOException">If any I/O related errors occur</exception>
-        public ITopGroups<object> Search(IndexSearcher searcher, Query query, int groupOffset,
int groupLimit)
+        public virtual ITopGroups<object> Search(IndexSearcher searcher, Query query,
int groupOffset, int groupLimit)
         {
             return Search<object>(searcher, null, query, groupOffset, groupLimit);
         }
@@ -121,7 +121,7 @@ namespace Lucene.Net.Search.Grouping
         /// <param name="groupLimit">The number of groups to return from the specified
group offset</param>
         /// <returns>the grouped result as a <see cref="ITopGroups{Object}"/>
instance</returns>
         /// <exception cref="IOException">If any I/O related errors occur</exception>
-        public ITopGroups<TGroupValue> Search<TGroupValue>(IndexSearcher searcher,
Query query, int groupOffset, int groupLimit)
+        public virtual ITopGroups<TGroupValue> Search<TGroupValue>(IndexSearcher
searcher, Query query, int groupOffset, int groupLimit)
         {
             return Search<TGroupValue>(searcher, null, query, groupOffset, groupLimit);
         }
@@ -136,7 +136,7 @@ namespace Lucene.Net.Search.Grouping
         /// <param name="groupLimit">The number of groups to return from the specified
group offset</param>
         /// <returns>the grouped result as a <see cref="ITopGroups{Object}"/>
instance</returns>
         /// <exception cref="IOException">If any I/O related errors occur</exception>
-        public ITopGroups<object> Search(IndexSearcher searcher, Filter filter, Query
query, int groupOffset, int groupLimit)
+        public virtual ITopGroups<object> Search(IndexSearcher searcher, Filter filter,
Query query, int groupOffset, int groupLimit)
         {
             if (groupFunction != null)
             {
@@ -167,7 +167,7 @@ namespace Lucene.Net.Search.Grouping
         /// <param name="groupLimit">The number of groups to return from the specified
group offset</param>
         /// <returns>the grouped result as a <see cref="ITopGroups{Object}"/>
instance</returns>
         /// <exception cref="IOException">If any I/O related errors occur</exception>
-        public ITopGroups<TGroupValue> Search<TGroupValue>(IndexSearcher searcher,
Filter filter, Query query, int groupOffset, int groupLimit)
+        public virtual ITopGroups<TGroupValue> Search<TGroupValue>(IndexSearcher
searcher, Filter filter, Query query, int groupOffset, int groupLimit)
         {
             if (groupField != null || groupFunction != null)
             {
@@ -183,7 +183,7 @@ namespace Lucene.Net.Search.Grouping
             }
         }
 
-        protected ITopGroups<TGroupValue> GroupByFieldOrFunction<TGroupValue>(IndexSearcher
searcher, Filter filter, Query query, int groupOffset, int groupLimit)
+        protected virtual ITopGroups<TGroupValue> GroupByFieldOrFunction<TGroupValue>(IndexSearcher
searcher, Filter filter, Query query, int groupOffset, int groupLimit)
         {
             int topN = groupOffset + groupLimit;
             IAbstractFirstPassGroupingCollector<TGroupValue> firstPassCollector;
@@ -335,7 +335,7 @@ namespace Lucene.Net.Search.Grouping
             }
         }
 
-        protected ITopGroups<TGroupValue> GroupByDocBlock<TGroupValue>(IndexSearcher
searcher, Filter filter, Query query, int groupOffset, int groupLimit)
+        protected virtual ITopGroups<TGroupValue> GroupByDocBlock<TGroupValue>(IndexSearcher
searcher, Filter filter, Query query, int groupOffset, int groupLimit)
         {
             int topN = groupOffset + groupLimit;
             BlockGroupingCollector c = new BlockGroupingCollector(groupSort, topN, includeScores,
groupEndDocs);
@@ -352,7 +352,7 @@ namespace Lucene.Net.Search.Grouping
         /// <param name="maxCacheRAMMB">The maximum amount in MB the cache is allowed
to hold</param>
         /// <param name="cacheScores">Whether to cache the scores</param>
         /// <returns><c>this</c></returns>
-        public GroupingSearch SetCachingInMB(double maxCacheRAMMB, bool cacheScores)
+        public virtual GroupingSearch SetCachingInMB(double maxCacheRAMMB, bool cacheScores)
         {
             this.maxCacheRAMMB = maxCacheRAMMB;
             this.maxDocsToCache = null;
@@ -368,7 +368,7 @@ namespace Lucene.Net.Search.Grouping
         /// <param name="maxDocsToCache">The maximum number of documents the cache
is allowed to hold</param>
         /// <param name="cacheScores">Whether to cache the scores</param>
         /// <returns><c>this</c></returns>
-        public GroupingSearch SetCaching(int maxDocsToCache, bool cacheScores)
+        public virtual GroupingSearch SetCaching(int maxDocsToCache, bool cacheScores)
         {
             this.maxDocsToCache = maxDocsToCache;
             this.maxCacheRAMMB = null;
@@ -380,7 +380,7 @@ namespace Lucene.Net.Search.Grouping
         /// Disables any enabled cache.
         /// </summary>
         /// <returns><c>this</c></returns>
-        public GroupingSearch DisableCaching()
+        public virtual GroupingSearch DisableCaching()
         {
             this.maxCacheRAMMB = null;
             this.maxDocsToCache = null;
@@ -393,7 +393,7 @@ namespace Lucene.Net.Search.Grouping
         /// </summary>
         /// <param name="groupSort">The sort for the groups.</param>
         /// <returns><c>this</c></returns>
-        public GroupingSearch SetGroupSort(Sort groupSort)
+        public virtual GroupingSearch SetGroupSort(Sort groupSort)
         {
             this.groupSort = groupSort;
             return this;
@@ -405,7 +405,7 @@ namespace Lucene.Net.Search.Grouping
         /// </summary>
         /// <param name="sortWithinGroup">The sort for documents inside a group</param>
         /// <returns><c>this</c></returns>
-        public GroupingSearch SetSortWithinGroup(Sort sortWithinGroup)
+        public virtual GroupingSearch SetSortWithinGroup(Sort sortWithinGroup)
         {
             this.sortWithinGroup = sortWithinGroup;
             return this;
@@ -416,7 +416,7 @@ namespace Lucene.Net.Search.Grouping
         /// </summary>
         /// <param name="groupDocsOffset">The offset for documents inside a</param>
         /// <returns><c>this</c></returns>
-        public GroupingSearch SetGroupDocsOffset(int groupDocsOffset)
+        public virtual GroupingSearch SetGroupDocsOffset(int groupDocsOffset)
         {
             this.groupDocsOffset = groupDocsOffset;
             return this;
@@ -427,7 +427,7 @@ namespace Lucene.Net.Search.Grouping
         /// </summary>
         /// <param name="groupDocsLimit">The number of documents to return inside a
group</param>
         /// <returns><c>this</c></returns>
-        public GroupingSearch SetGroupDocsLimit(int groupDocsLimit)
+        public virtual GroupingSearch SetGroupDocsLimit(int groupDocsLimit)
         {
             this.groupDocsLimit = groupDocsLimit;
             return this;
@@ -438,7 +438,7 @@ namespace Lucene.Net.Search.Grouping
         /// </summary>
         /// <param name="fillSortFields">Whether to also fill the sort fields per returned
group and groups docs</param>
         /// <returns><c>this</c></returns>
-        public GroupingSearch SetFillSortFields(bool fillSortFields)
+        public virtual GroupingSearch SetFillSortFields(bool fillSortFields)
         {
             this.fillSortFields = fillSortFields;
             return this;
@@ -449,7 +449,7 @@ namespace Lucene.Net.Search.Grouping
         /// </summary>
         /// <param name="includeScores">Whether to include the scores per doc inside
a group</param>
         /// <returns><c>this</c></returns>
-        public GroupingSearch SetIncludeScores(bool includeScores)
+        public virtual GroupingSearch SetIncludeScores(bool includeScores)
         {
             this.includeScores = includeScores;
             return this;
@@ -460,7 +460,7 @@ namespace Lucene.Net.Search.Grouping
         /// </summary>
         /// <param name="includeMaxScore">Whether to include the score of the most
relevant document per group</param>
         /// <returns><c>this</c></returns>
-        public GroupingSearch SetIncludeMaxScore(bool includeMaxScore)
+        public virtual GroupingSearch SetIncludeMaxScore(bool includeMaxScore)
         {
             this.includeMaxScore = includeMaxScore;
             return this;
@@ -476,7 +476,7 @@ namespace Lucene.Net.Search.Grouping
         /// </summary>
         /// <param name="allGroups">to also compute all groups matching the query</param>
         /// <returns><c>this</c></returns>
-        public GroupingSearch SetAllGroups(bool allGroups)
+        public virtual GroupingSearch SetAllGroups(bool allGroups)
         {
             this.allGroups = allGroups;
             return this;
@@ -489,7 +489,7 @@ namespace Lucene.Net.Search.Grouping
         /// <typeparam name="T">The group value type. This can be a <see cref="BytesRef"/>
or a <see cref="MutableValue"/> instance. 
         /// If grouping by doc block this the group value is always <c>null</c>.</typeparam>
         /// <returns>all matching groups are returned, or an empty collection</returns>
-        public ICollection<T> GetAllMatchingGroups<T>()
+        public virtual ICollection<T> GetAllMatchingGroups<T>()
         {
             return (ICollection<T>)matchingGroups;
         }
@@ -504,7 +504,7 @@ namespace Lucene.Net.Search.Grouping
         /// any type, since <see cref="GetAllMatchingGroups{T}"/>
         /// will throw an exception if the return type is incorrect.
         /// </remarks>
-        public ICollection GetAllMatchingGroups()
+        public virtual ICollection GetAllMatchingGroups()
         {
             return matchingGroups;
         }
@@ -517,7 +517,7 @@ namespace Lucene.Net.Search.Grouping
         /// </summary>
         /// <param name="allGroupHeads">Whether to compute all group heads (most relevant
document per group) matching the query</param>
         /// <returns><c>this</c></returns>
-        public GroupingSearch SetAllGroupHeads(bool allGroupHeads)
+        public virtual GroupingSearch SetAllGroupHeads(bool allGroupHeads)
         {
             this.allGroupHeads = allGroupHeads;
             return this;
@@ -527,7 +527,7 @@ namespace Lucene.Net.Search.Grouping
         /// Returns the matching group heads if <see cref="SetAllGroupHeads(bool)"/>
was set to true or an empty bit set.
         /// </summary>
         /// <returns>The matching group heads if <see cref="SetAllGroupHeads(bool)"/>
was set to true or an empty bit set</returns>
-        public Bits GetAllGroupHeads()
+        public virtual Bits GetAllGroupHeads()
         {
             return matchingGroupHeads;
         }
@@ -543,7 +543,7 @@ namespace Lucene.Net.Search.Grouping
         /// </summary>
         /// <param name="initialSize">The initial size of some internal used data structures</param>
         /// <returns><c>this</c></returns>
-        public GroupingSearch SetInitialSize(int initialSize)
+        public virtual GroupingSearch SetInitialSize(int initialSize)
         {
             this.initialSize = initialSize;
             return this;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/96d38eff/src/Lucene.Net.Grouping/SearchGroup.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Grouping/SearchGroup.cs b/src/Lucene.Net.Grouping/SearchGroup.cs
index a3ad0d3..b0116ae 100644
--- a/src/Lucene.Net.Grouping/SearchGroup.cs
+++ b/src/Lucene.Net.Grouping/SearchGroup.cs
@@ -338,7 +338,7 @@ namespace Lucene.Net.Search.Grouping
                 }
             }
 
-            public ICollection<SearchGroup<T>> Merge(IList<IEnumerable<ISearchGroup<T>>>
shards, int offset, int topN)
+            public virtual ICollection<SearchGroup<T>> Merge(IList<IEnumerable<ISearchGroup<T>>>
shards, int offset, int topN)
             {
 
                 int maxQueueSize = offset + topN;


Mime
View raw message