You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Martijn Laarman <mp...@gmail.com> on 2011/05/27 12:13:44 UTC

Nested grouping/field collapsing

Hi,

I was wondering if this issue had already been raised.

We currently have a use case where nested field collapsing would be really
helpful

I.e Collapse on field X then Collapse on Field Y within the groups returned
by field X

The current behavior of specifying multiple fields seem to be returning
mutiple result sets.

Has this already been feature requested ? Does anybody know of a workaround
?

Many thanks,

Martijn

Re: Nested grouping/field collapsing

Posted by Bill Bell <bi...@gmail.com>.
Did you try pivot?

Bill Bell
Sent from mobile


On May 27, 2011, at 4:13 AM, Martijn Laarman <mp...@gmail.com> wrote:

> Hi,
> 
> I was wondering if this issue had already been raised.
> 
> We currently have a use case where nested field collapsing would be really
> helpful
> 
> I.e Collapse on field X then Collapse on Field Y within the groups returned
> by field X
> 
> The current behavior of specifying multiple fields seem to be returning
> mutiple result sets.
> 
> Has this already been feature requested ? Does anybody know of a workaround
> ?
> 
> Many thanks,
> 
> Martijn

Re: Nested grouping/field collapsing

Posted by Juan Antonio Farré Basurte <ju...@reviewpro.com>.
I've found the same issue.
As long as I know, the only solution is to create a copy field which combines both-fields values and facet on this field.
If one of the fields has a set of distinct values known in advance and its cardinality c is not too big, it isn't a great problem: you can do with c queries.

El 27/05/2011, a las 15:03, Martijn Laarman escribió:

> Hi,
> I was wondering if this issue had already been raised.
> 
> We currently have a use case where nested field collapsing would be really
> helpful
> 
> I.e Collapse on field X then Collapse on Field Y within the groups returned
> by field X
> 
> The current behavior of specifying multiple fields seem to be returning
> mutiple result sets.
> 
> Has this already been feature requested ? Does anybody know of a workaround
> ?
> 
> Many thanks,
> 
> Martijn


Re: Nested grouping/field collapsing

Posted by Martijn Laarman <mp...@gmail.com>.
Hi,
I was wondering if this issue had already been raised.

We currently have a use case where nested field collapsing would be really
helpful

I.e Collapse on field X then Collapse on Field Y within the groups returned
by field X

The current behavior of specifying multiple fields seem to be returning
mutiple result sets.

Has this already been feature requested ? Does anybody know of a workaround
?

Many thanks,

Martijn

Re: Nested grouping/field collapsing

Posted by Rih <ta...@gmail.com>.
Hey Martijn,

Did you find a good workaround?

Rih


On Sat, May 28, 2011 at 5:35 AM, Martijn Laarman <mp...@gmail.com> wrote:

> Thanks Mike,
>
> I've opened https://issues.apache.org/jira/browse/SOLR-2553 for this.
>
> It's exciting to hear a workable implementation might be possible!
>
> On Fri, May 27, 2011 at 6:23 PM, Michael McCandless <
> lucene@mikemccandless.com> wrote:
>
> > Can you open a Lucene issue (against the new grouping module) for
> > this?
> >
> > I think this is a compelling use case that we should try to support.
> >
> > In theory, with the "general" two-pass grouping collector, this should
> > be possible, but will require three passes, and we also must
> > generalize the 2nd pass collector to accept arbitrary collectors for
> > each group (today it's "hardwired" to sort-by-SortField collectors).
> >
> > I suspect coupling the single-pass grouping collector (currently still
> > a patch on LUCENE-3129) with the two-pass collector could also work.
> >
> > Also, can you describe more details about the two fields you want to
> > group/collapse by?
> >
> > Mike
> >
> > http://blog.mikemccandless.com
> >
> > On Fri, May 27, 2011 at 6:13 AM, Martijn Laarman <mp...@gmail.com>
> > wrote:
> > > Hi,
> > >
> > > I was wondering if this issue had already been raised.
> > >
> > > We currently have a use case where nested field collapsing would be
> > really
> > > helpful
> > >
> > > I.e Collapse on field X then Collapse on Field Y within the groups
> > returned
> > > by field X
> > >
> > > The current behavior of specifying multiple fields seem to be returning
> > > mutiple result sets.
> > >
> > > Has this already been feature requested ? Does anybody know of a
> > workaround
> > > ?
> > >
> > > Many thanks,
> > >
> > > Martijn
> > >
> >
>

Re: Nested grouping/field collapsing

Posted by Martijn Laarman <mp...@gmail.com>.
Thanks Mike,

I've opened https://issues.apache.org/jira/browse/SOLR-2553 for this.

It's exciting to hear a workable implementation might be possible!

On Fri, May 27, 2011 at 6:23 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> Can you open a Lucene issue (against the new grouping module) for
> this?
>
> I think this is a compelling use case that we should try to support.
>
> In theory, with the "general" two-pass grouping collector, this should
> be possible, but will require three passes, and we also must
> generalize the 2nd pass collector to accept arbitrary collectors for
> each group (today it's "hardwired" to sort-by-SortField collectors).
>
> I suspect coupling the single-pass grouping collector (currently still
> a patch on LUCENE-3129) with the two-pass collector could also work.
>
> Also, can you describe more details about the two fields you want to
> group/collapse by?
>
> Mike
>
> http://blog.mikemccandless.com
>
> On Fri, May 27, 2011 at 6:13 AM, Martijn Laarman <mp...@gmail.com>
> wrote:
> > Hi,
> >
> > I was wondering if this issue had already been raised.
> >
> > We currently have a use case where nested field collapsing would be
> really
> > helpful
> >
> > I.e Collapse on field X then Collapse on Field Y within the groups
> returned
> > by field X
> >
> > The current behavior of specifying multiple fields seem to be returning
> > mutiple result sets.
> >
> > Has this already been feature requested ? Does anybody know of a
> workaround
> > ?
> >
> > Many thanks,
> >
> > Martijn
> >
>

Re: Nested grouping/field collapsing

Posted by Michael McCandless <lu...@mikemccandless.com>.
Can you open a Lucene issue (against the new grouping module) for
this?

I think this is a compelling use case that we should try to support.

In theory, with the "general" two-pass grouping collector, this should
be possible, but will require three passes, and we also must
generalize the 2nd pass collector to accept arbitrary collectors for
each group (today it's "hardwired" to sort-by-SortField collectors).

I suspect coupling the single-pass grouping collector (currently still
a patch on LUCENE-3129) with the two-pass collector could also work.

Also, can you describe more details about the two fields you want to
group/collapse by?

Mike

http://blog.mikemccandless.com

On Fri, May 27, 2011 at 6:13 AM, Martijn Laarman <mp...@gmail.com> wrote:
> Hi,
>
> I was wondering if this issue had already been raised.
>
> We currently have a use case where nested field collapsing would be really
> helpful
>
> I.e Collapse on field X then Collapse on Field Y within the groups returned
> by field X
>
> The current behavior of specifying multiple fields seem to be returning
> mutiple result sets.
>
> Has this already been feature requested ? Does anybody know of a workaround
> ?
>
> Many thanks,
>
> Martijn
>