Grouping of facets based on a field

Hi ,

I have the following requirement

DataSet - Following are different feeds

{ "person" : "Bill Gates" , "type" : "IT guy"}
{ "person" : "Bill Clinton" , "type" : "Politician"}
{ "person" : "Trivolta" , "type" : "Film guy"}
{ "person" : "Johny Depp" , "type" : "Film Guy"}
{ "person" : "Obama" , "type" : "Politician"}
{ "person" : "Marissa Mayor" , "type" : "IT Guy"}

Here i want the following output

"IT guy" - "Bill Gates","Marissa Mayor" , "Politician" - "Bill
Clinton","Obama" , "Film guy" - "Johny Depp", "Trivolta"

I cant think of a way to achieve this using simple facet query.
Running a facet in type and sending different facet query for each type is
the only solution i could come up with.
Kindly throw in your ideas here.

Thanks
Vineeth

--

Didn't you give a +1 to the field-collapsing issue a year ago? :slight_smile:

I expect that grouping and field collapsing are the same issue. There is a
non-sharded grouping implementation, but nothing distributed.

Why would you send a facet query for each type? Wouldn't the first query be
a query faceted on type, and then a separate query (multisearch?) for each
facet entry?

--
Ivan

On Fri, Dec 21, 2012 at 11:09 AM, Vineeth Mohan
vineethmohan@algotree.comwrote:

Hi ,

I have the following requirement

DataSet - Following are different feeds

{ "person" : "Bill Gates" , "type" : "IT guy"}
{ "person" : "Bill Clinton" , "type" : "Politician"}
{ "person" : "Trivolta" , "type" : "Film guy"}
{ "person" : "Johny Depp" , "type" : "Film Guy"}
{ "person" : "Obama" , "type" : "Politician"}
{ "person" : "Marissa Mayor" , "type" : "IT Guy"}

Here i want the following output

"IT guy" - "Bill Gates","Marissa Mayor" , "Politician" - "Bill
Clinton","Obama" , "Film guy" - "Johny Depp", "Trivolta"

I cant think of a way to achieve this using simple facet query.
Running a facet in type and sending different facet query for each type is
the only solution i could come up with.
Kindly throw in your ideas here.

Thanks
Vineeth

--

--

Hello Ivan ,

I totally forgot about that issue.
Many thanks for reminding me.
Multisearch was what i had in mind , thanks for pointing out that also.

Thanks
Vineeth

On Sat, Dec 22, 2012 at 1:10 AM, Ivan Brusic ivan@brusic.com wrote:

Didn't you give a +1 to the field-collapsing issue a year ago? :slight_smile:

Field Collapsing/Combining · Issue #256 · elastic/elasticsearch · GitHub

I expect that grouping and field collapsing are the same issue. There is a
non-sharded grouping implementation, but nothing distributed.

Why would you send a facet query for each type? Wouldn't the first query
be a query faceted on type, and then a separate query (multisearch?) for
each facet entry?

--
Ivan

On Fri, Dec 21, 2012 at 11:09 AM, Vineeth Mohan <vineethmohan@algotree.com

wrote:

Hi ,

I have the following requirement

DataSet - Following are different feeds

{ "person" : "Bill Gates" , "type" : "IT guy"}
{ "person" : "Bill Clinton" , "type" : "Politician"}
{ "person" : "Trivolta" , "type" : "Film guy"}
{ "person" : "Johny Depp" , "type" : "Film Guy"}
{ "person" : "Obama" , "type" : "Politician"}
{ "person" : "Marissa Mayor" , "type" : "IT Guy"}

Here i want the following output

"IT guy" - "Bill Gates","Marissa Mayor" , "Politician" - "Bill
Clinton","Obama" , "Film guy" - "Johny Depp", "Trivolta"

I cant think of a way to achieve this using simple facet query.
Running a facet in type and sending different facet query for each type
is the only solution i could come up with.
Kindly throw in your ideas here.

Thanks

      Vineeth

--

--

--