lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [2/3] lucenenet git commit: Create AbstractDistinctValuesCollector.cs
Date Thu, 28 Jan 2016 10:42:27 GMT
Create AbstractDistinctValuesCollector.cs

Created based on 4.8 version of Lucene

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

Branch: refs/heads/master
Commit: 2906807c239b1b1aec040a8871307b8e37b73c63
Parents: 5efaf75
Author: WakeflyCBass <cbass@wakefly.com>
Authored: Wed Jan 27 12:10:41 2016 -0500
Committer: WakeflyCBass <cbass@wakefly.com>
Committed: Wed Jan 27 12:10:41 2016 -0500

----------------------------------------------------------------------
 .../Grouping/AbstractDistinctValuesCollector.cs | 49 ++++++++++++++++++++
 1 file changed, 49 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2906807c/src/Lucene.Net.Core/Search/Grouping/AbstractDistinctValuesCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Grouping/AbstractDistinctValuesCollector.cs b/src/Lucene.Net.Core/Search/Grouping/AbstractDistinctValuesCollector.cs
new file mode 100644
index 0000000..39b65b1
--- /dev/null
+++ b/src/Lucene.Net.Core/Search/Grouping/AbstractDistinctValuesCollector.cs
@@ -0,0 +1,49 @@
+using Lucene.Net.Search;
+using Lucene.Net.Util;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace Lucene.Net.Search.Grouping
+{
+	public abstract class AbstractDistinctValuesCollector<T> : Collector where T : AbstractDistinctValuesCollector.GroupCount
+	{
+
+		public abstract List<T> getGroups();
+
+		public override bool AcceptsDocsOutOfOrder()
+		{
+			return true;
+		}
+
+		public override Scorer Scorer
+		{
+			set
+			{
+				throw new NotImplementedException();
+			}
+		}
+	}
+
+
+	public abstract class AbstractDistinctValuesCollector
+	{
+		public interface GroupCount
+		{
+		}
+
+		public abstract class GroupCount<GROUP_VALUE_TYPE> : GroupCount
+		{
+			public GROUP_VALUE_TYPE groupValue;
+
+			public HashSet<GROUP_VALUE_TYPE> uniqueValues;
+
+			public GroupCount(GROUP_VALUE_TYPE groupValue)
+			{
+				this.groupValue = groupValue;
+				this.uniqueValues = new HashSet<GROUP_VALUE_TYPE>();
+			}
+		}
+	}
+}


Mime
View raw message