# Grouping in ElasticSearch

**URL:** <https://discuss.elastic.co/t/grouping-in-elasticsearch/9267>\
**Category:** Elasticsearch\
**Created:** [October 7, 2012, 12:34pm UTC](https://discuss.elastic.co/t/grouping-in-elasticsearch/9267 "2012-10-07T12:34:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Artem\_Redkin](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Artem\_Redkin](https://discuss.elastic.co/u/Artem_Redkin)\
**Post date:** [October 7, 2012, 12:34pm UTC](https://discuss.elastic.co/t/grouping-in-elasticsearch/9267/1 "2012-10-07T12:34:54Z")

</div>

Hi!

I am interested in implementing grouping feature in elasticsearch. I have  
(almost) working proof-of-concept for this. Are there any guidelines for  
contribution to es? Or maybe this feature already being implemented by core  
group?

Thanks.

--

---

<div class="post-metadata">

**Author:** ![Chris\_Male](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_male/32/2607_2.png) [@Chris\_Male](https://discuss.elastic.co/u/Chris_Male)\
**Post date:** [October 8, 2012, 3:14am UTC](https://discuss.elastic.co/t/grouping-in-elasticsearch/9267/2 "2012-10-08T03:14:36Z")

</div>

Hi,

Grouping is definitely a feature of interest and its development is on the  
horizon. That said, all contributions are welcomed. Why don't you open an  
issue detailing your implementation and file a pull request so people can  
look at your implementation.

On Monday, October 8, 2012 1:34:54 AM UTC+13, Artem Redkin wrote:

> Hi!
> 
> I am interested in implementing grouping feature in elasticsearch. I have  
> (almost) working proof-of-concept for this. Are there any guidelines for  
> contribution to es? Or maybe this feature already being implemented by core  
> group?
> 
> Thanks.

--

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [October 8, 2012, 7:46am UTC](https://discuss.elastic.co/t/grouping-in-elasticsearch/9267/3 "2012-10-08T07:46:59Z")

</div>

I would love to have a look!

Jörg

On Sunday, October 7, 2012 2:34:54 PM UTC+2, Artem Redkin wrote:

> Hi!
> 
> I am interested in implementing grouping feature in elasticsearch. I have  
> (almost) working proof-of-concept for this. Are there any guidelines for  
> contribution to es? Or maybe this feature already being implemented by core  
> group?
> 
> Thanks.

--

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [October 8, 2012, 4:01pm UTC](https://discuss.elastic.co/t/grouping-in-elasticsearch/9267/4 "2012-10-08T16:01:11Z")

</div>

Grouping is part of Lucene 4.0, so I would hate to see different potential  
implementations. Judging by LinkedIn, Martijn van Groningen, a frequent  
participant on the mailing list who has done some work with grouping in  
Lucene, now works for Elasticsearch, so I would hopefully expect some  
integration on my part (speculation on my part).

That said, there is always something to learn from good code. Shay does  
allow pull requests and does comment on them.

Cheers,

Ivan

On Sun, Oct 7, 2012 at 5:34 AM, Artem Redkin [artem.redkin@gmail.com](mailto:artem.redkin@gmail.com) wrote:

> Hi!
> 
> I am interested in implementing grouping feature in elasticsearch. I have  
> (almost) working proof-of-concept for this. Are there any guidelines for  
> contribution to es? Or maybe this feature already being implemented by core  
> group?
> 
> Thanks.
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Chris\_Male](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_male/32/2607_2.png) [@Chris\_Male](https://discuss.elastic.co/u/Chris_Male)\
**Post date:** [October 8, 2012, 10:12pm UTC](https://discuss.elastic.co/t/grouping-in-elasticsearch/9267/5 "2012-10-08T22:12:37Z")

</div>

Just a quick note, Grouping is available is Lucene 3.x.

On Tuesday, October 9, 2012 5:01:16 AM UTC+13, Ivan Brusic wrote:

> Grouping is part of Lucene 4.0, so I would hate to see different potential  
> implementations. Judging by LinkedIn, Martijn van Groningen, a frequent  
> participant on the mailing list who has done some work with grouping in  
> Lucene, now works for Elasticsearch, so I would hopefully expect some  
> integration on my part (speculation on my part).
> 
> That said, there is always something to learn from good code. Shay does  
> allow pull requests and does comment on them.
> 
> Cheers,
> 
> Ivan
> 
> On Sun, Oct 7, 2012 at 5:34 AM, Artem Redkin \<[artem....@gmail.com](mailto:artem....@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Hi!
> > 
> > I am interested in implementing grouping feature in elasticsearch. I have  
> > (almost) working proof-of-concept for this. Are there any guidelines for  
> > contribution to es? Or maybe this feature already being implemented by core  
> > group?
> > 
> > Thanks.
> > 
> > --

--

---

<div class="post-metadata">

**Author:** ![Artem\_Redkin](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Artem\_Redkin](https://discuss.elastic.co/u/Artem_Redkin)\
**Post date:** [October 10, 2012, 5:05pm UTC](https://discuss.elastic.co/t/grouping-in-elasticsearch/9267/6 "2012-10-10T17:05:46Z")

</div>

Yes, my prototype is based on lucene-grouping module for now.  
Thanks for answers, i will clean the code a bit and will submit  
pull-request later this week.

On Tuesday, October 9, 2012 2:12:37 AM UTC+4, Chris Male wrote:

> Just a quick note, Grouping is available is Lucene 3.x.
> 
> On Tuesday, October 9, 2012 5:01:16 AM UTC+13, Ivan Brusic wrote:
> 
> > Grouping is part of Lucene 4.0, so I would hate to see different  
> > potential implementations. Judging by LinkedIn, Martijn van Groningen, a  
> > frequent participant on the mailing list who has done some work with  
> > grouping in Lucene, now works for Elasticsearch, so I would hopefully  
> > expect some integration on my part (speculation on my part).
> > 
> > That said, there is always something to learn from good code. Shay does  
> > allow pull requests and does comment on them.
> > 
> > Cheers,
> > 
> > Ivan
> > 
> > On Sun, Oct 7, 2012 at 5:34 AM, Artem Redkin [artem....@gmail.com](mailto:artem....@gmail.com) wrote:
> > 
> > > Hi!
> > > 
> > > I am interested in implementing grouping feature in elasticsearch. I  
> > > have (almost) working proof-of-concept for this. Are there any guidelines  
> > > for contribution to es? Or maybe this feature already being implemented by  
> > > core group?
> > > 
> > > Thanks.
> > > 
> > > --

--

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [October 10, 2012, 10:09pm UTC](https://discuss.elastic.co/t/grouping-in-elasticsearch/9267/7 "2012-10-10T22:09:53Z")

</div>

Hi Artem,

I definitely want to take a look at your implementation. Some time ago  
I created a prototype for the result grouping:  
[https://github.com/martijnvg/elasticsearch-with-local-grouping/tree/local-result-grouping](https://github.com/martijnvg/elasticsearch-with-local-grouping/tree/local-result-grouping)

It is limited. Missing a lot of grouping features. (btw Distributed  
grouping is possible in PoC by using routing during indexing /  
searching)

Martijn

On 10 October 2012 19:05, Artem Redkin [artem.redkin@gmail.com](mailto:artem.redkin@gmail.com) wrote:

> Yes, my prototype is based on lucene-grouping module for now.  
> Thanks for answers, i will clean the code a bit and will submit pull-request  
> later this week.
> 
> On Tuesday, October 9, 2012 2:12:37 AM UTC+4, Chris Male wrote:
> 
> > Just a quick note, Grouping is available is Lucene 3.x.
> > 
> > On Tuesday, October 9, 2012 5:01:16 AM UTC+13, Ivan Brusic wrote:
> > 
> > > Grouping is part of Lucene 4.0, so I would hate to see different  
> > > potential implementations. Judging by LinkedIn, Martijn van Groningen, a  
> > > frequent participant on the mailing list who has done some work with  
> > > grouping in Lucene, now works for Elasticsearch, so I would hopefully expect  
> > > some integration on my part (speculation on my part).
> > > 
> > > That said, there is always something to learn from good code. Shay does  
> > > allow pull requests and does comment on them.
> > > 
> > > Cheers,
> > > 
> > > Ivan
> > > 
> > > On Sun, Oct 7, 2012 at 5:34 AM, Artem Redkin [artem....@gmail.com](mailto:artem....@gmail.com) wrote:
> > > 
> > > > Hi!
> > > > 
> > > > I am interested in implementing grouping feature in elasticsearch. I  
> > > > have (almost) working proof-of-concept for this. Are there any guidelines  
> > > > for contribution to es? Or maybe this feature already being implemented by  
> > > > core group?
> > > > 
> > > > Thanks.
> > > > 
> > > > --
> 
> --

--  
Met vriendelijke groet,

Martijn van Groningen

--

---

<div class="post-metadata">

**Author:** ![Artem\_Redkin](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Artem\_Redkin](https://discuss.elastic.co/u/Artem_Redkin)\
**Post date:** [October 14, 2012, 12:57pm UTC](https://discuss.elastic.co/t/grouping-in-elasticsearch/9267/8 "2012-10-14T12:57:32Z")

</div>

Hi Martin!

Here's the pull request  
[Grouping prototype implementation by artemredkin · Pull Request #2326 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/pull/2326), it's early  
work-in-progress and i haven't tested it in distributed environment (though  
it works on multiple shards), only term query without sort is implemented,  
and i will only be able to obtain some performance result tuesday next week.  
This request is more like a topic starter :)), it touches too many core  
components to be pulled right out-of-the-box.

On Thursday, October 11, 2012 2:10:16 AM UTC+4, Martijn v Groningen wrote:

> Hi Artem,
> 
> I definitely want to take a look at your implementation. Some time ago  
> I created a prototype for the result grouping:
> 
> [https://github.com/martijnvg/elasticsearch-with-local-grouping/tree/local-result-grouping](https://github.com/martijnvg/elasticsearch-with-local-grouping/tree/local-result-grouping)
> 
> It is limited. Missing a lot of grouping features. (btw Distributed  
> grouping is possible in PoC by using routing during indexing /  
> searching)
> 
> Martijn
> 
> On 10 October 2012 19:05, Artem Redkin \<[artem....@gmail.com](mailto:artem....@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > Yes, my prototype is based on lucene-grouping module for now.  
> > Thanks for answers, i will clean the code a bit and will submit  
> > pull-request  
> > later this week.
> > 
> > On Tuesday, October 9, 2012 2:12:37 AM UTC+4, Chris Male wrote:
> > 
> > > Just a quick note, Grouping is available is Lucene 3.x.
> > > 
> > > On Tuesday, October 9, 2012 5:01:16 AM UTC+13, Ivan Brusic wrote:
> > > 
> > > > Grouping is part of Lucene 4.0, so I would hate to see different  
> > > > potential implementations. Judging by LinkedIn, Martijn van Groningen,  
> > > > a  
> > > > frequent participant on the mailing list who has done some work with  
> > > > grouping in Lucene, now works for Elasticsearch, so I would hopefully  
> > > > expect  
> > > > some integration on my part (speculation on my part).
> > > > 
> > > > That said, there is always something to learn from good code. Shay  
> > > > does  
> > > > allow pull requests and does comment on them.
> > > > 
> > > > Cheers,
> > > > 
> > > > Ivan
> > > > 
> > > > On Sun, Oct 7, 2012 at 5:34 AM, Artem Redkin [artem....@gmail.com](mailto:artem....@gmail.com)  
> > > > wrote:
> > > > 
> > > > > Hi!
> > > > > 
> > > > > I am interested in implementing grouping feature in elasticsearch. I  
> > > > > have (almost) working proof-of-concept for this. Are there any  
> > > > > guidelines  
> > > > > for contribution to es? Or maybe this feature already being  
> > > > > implemented by  
> > > > > core group?
> > > > > 
> > > > > Thanks.
> > > > > 
> > > > > --
> > 
> > --
> 
> --  
> Met vriendelijke groet,
> 
> Martijn van Groningen

--

---

<div class="post-metadata">

**Author:** ![milan\_molbio](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@milan\_molbio](https://discuss.elastic.co/u/milan_molbio)\
**Post date:** [April 24, 2013, 6:15am UTC](https://discuss.elastic.co/t/grouping-in-elasticsearch/9267/9 "2013-04-24T06:15:34Z")

</div>

Hi,

any activity/plans around this recently?

regards,  
Milan

On Sunday, October 14, 2012 2:57:32 PM UTC+2, Artem Redkin wrote:

> Hi Martin!
> 
> Here's the pull request  
> [Grouping prototype implementation by artemredkin · Pull Request #2326 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/pull/2326), it's early  
> work-in-progress and i haven't tested it in distributed environment (though  
> it works on multiple shards), only term query without sort is implemented,  
> and i will only be able to obtain some performance result tuesday next week.  
> This request is more like a topic starter :)), it touches too many core  
> components to be pulled right out-of-the-box.
> 
> On Thursday, October 11, 2012 2:10:16 AM UTC+4, Martijn v Groningen wrote:
> 
> > Hi Artem,
> > 
> > I definitely want to take a look at your implementation. Some time ago  
> > I created a prototype for the result grouping:
> > 
> > [https://github.com/martijnvg/elasticsearch-with-local-grouping/tree/local-result-grouping](https://github.com/martijnvg/elasticsearch-with-local-grouping/tree/local-result-grouping)
> > 
> > It is limited. Missing a lot of grouping features. (btw Distributed  
> > grouping is possible in PoC by using routing during indexing /  
> > searching)
> > 
> > Martijn
> > 
> > On 10 October 2012 19:05, Artem Redkin [artem....@gmail.com](mailto:artem....@gmail.com) wrote:
> > 
> > > Yes, my prototype is based on lucene-grouping module for now.  
> > > Thanks for answers, i will clean the code a bit and will submit  
> > > pull-request  
> > > later this week.
> > > 
> > > On Tuesday, October 9, 2012 2:12:37 AM UTC+4, Chris Male wrote:
> > > 
> > > > Just a quick note, Grouping is available is Lucene 3.x.
> > > > 
> > > > On Tuesday, October 9, 2012 5:01:16 AM UTC+13, Ivan Brusic wrote:
> > > > 
> > > > > Grouping is part of Lucene 4.0, so I would hate to see different  
> > > > > potential implementations. Judging by LinkedIn, Martijn van  
> > > > > Groningen, a  
> > > > > frequent participant on the mailing list who has done some work with  
> > > > > grouping in Lucene, now works for Elasticsearch, so I would hopefully  
> > > > > expect  
> > > > > some integration on my part (speculation on my part).
> > > > > 
> > > > > That said, there is always something to learn from good code. Shay  
> > > > > does  
> > > > > allow pull requests and does comment on them.
> > > > > 
> > > > > Cheers,
> > > > > 
> > > > > Ivan
> > > > > 
> > > > > On Sun, Oct 7, 2012 at 5:34 AM, Artem Redkin [artem....@gmail.com](mailto:artem....@gmail.com)  
> > > > > wrote:
> > > > > 
> > > > > > Hi!
> > > > > > 
> > > > > > I am interested in implementing grouping feature in elasticsearch. I  
> > > > > > have (almost) working proof-of-concept for this. Are there any  
> > > > > > guidelines  
> > > > > > for contribution to es? Or maybe this feature already being  
> > > > > > implemented by  
> > > > > > core group?
> > > > > > 
> > > > > > Thanks.
> > > > > > 
> > > > > > --
> > > 
> > > --
> > 
> > --  
> > Met vriendelijke groet,
> > 
> > Martijn van Groningen

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:39am UTC](https://discuss.elastic.co/t/grouping-in-elasticsearch/9267/10 "2017-07-06T02:39:51Z")

</div>


