ElasticSearch (Nest) and grouping

Hi guys,

We have an index in ElasticSearch whose root document includes a property
called Type. Type can have one of the following values:

"Track", "Video","Ringtone".

We want to query the index, and return all documents whose Title property
includes "Micheal". However, we want exactly 10 documents of each Type in
the result set. For example 10 Tracks, 10 Videos and 10 Ringtones whose
Title property includes "Michael".

I am using Nest. How can I do this grouping?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

There are currently two options:

  • Run 3 queries - I'd recommend this approach using the multi-search
    interface
  • Request a large number of results and group client side

Baked in grouping support is lacking:
Field Collapsing/Combining · Issue #256 · elastic/elasticsearch · GitHub ( don't +1 the
issue, it has enough :slight_smile: )

Thanks,
Paul

On Monday, July 8, 2013 5:39:25 PM UTC-6, Aref Karimi wrote:

Hi guys,

We have an index in Elasticsearch whose root document includes a property
called Type. Type can have one of the following values:

"Track", "Video","Ringtone".

We want to query the index, and return all documents whose Title property
includes "Micheal". However, we want exactly 10 documents of each Type in
the result set. For example 10 Tracks, 10 Videos and 10 Ringtones whose
Title property includes "Michael".

I am using Nest. How can I do this grouping?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

I have almost stopped linking to issues because of the +1s. :slight_smile:

On Mon, Jul 8, 2013 at 10:53 PM, ppearcy ppearcy@gmail.com wrote:

Baked in grouping support is lacking:
Field Collapsing/Combining · Issue #256 · elastic/elasticsearch · GitHub ( don't +1 the
issue, it has enough :slight_smile: )

--
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.
For more options, visit https://groups.google.com/groups/opt_out.