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 Aditya Sundaram <ad...@myntra.com> on 2016/07/12 11:29:47 UTC
Multilevel grouping?
Does solr support multilevel grouping? I want to group upto 2/3 levels
based on different fields i.e 1st group on field one, within which i group
by field 2 etc.
I am aware of facet.pivot which does the same but retrieves only the count.
Is there anyway to get the documents as well along with the count in
facet.pivot???
--
Aditya Sundaram
Re: Multilevel grouping?
Posted by William Bell <bi...@gmail.com>.
On grouping, if I only want the first 5 responses, it would be great if the
code short-circuited to improve performance.
I am not sure I want it grouping 10M results, when I already have 5 that
are good enough. ?
On Thu, Jul 14, 2016 at 10:33 AM, Callum Lamb <cl...@mintel.com> wrote:
> Look at the collapse module
>
> https://cwiki.apache.org/confluence/display/solr/Collapse+and+Expand+Results
> .
> It can the same thing as group.
>
> If you want to get counts/facets from before the collapse, tag the collapse
> statement use the exclude tags tags in your json facets (there's an
> equivalent for non json facets). I think the default nullpolicy is
> different from grouping too, but you can change it to be the same.
>
> I've not been able to get 2 collapses to work on my version of Solr. But
> collapse + group works and you can get 2 levels. Not being able to do
> multiple collapses appears to be a bug (it sorta works). I recall there
> being JIRA case somewhere stating it was fixed in some version. So you may
> be able to do as many levels as you like if you upgrade/already run a very
> recent version of Solr.
>
>
>
>
>
> On Thu, Jul 14, 2016 at 3:52 PM, Aditya Sundaram <
> aditya.sundaram@myntra.com
> > wrote:
>
> > Thanks Yonik, was looking for exactly that, is there any workaround to
> > achieve that currently?
> >
> > On Tue, Jul 12, 2016 at 5:07 PM, Yonik Seeley <ys...@gmail.com> wrote:
> >
> > > I started this a while ago, but haven't found the time to finish:
> > > https://issues.apache.org/jira/browse/SOLR-7830
> > >
> > > -Yonik
> > >
> > >
> > > On Tue, Jul 12, 2016 at 7:29 AM, Aditya Sundaram
> > > <ad...@myntra.com> wrote:
> > > > Does solr support multilevel grouping? I want to group upto 2/3
> levels
> > > > based on different fields i.e 1st group on field one, within which i
> > > group
> > > > by field 2 etc.
> > > > I am aware of facet.pivot which does the same but retrieves only the
> > > count.
> > > > Is there anyway to get the documents as well along with the count in
> > > > facet.pivot???
> > > >
> > > > --
> > > > Aditya Sundaram
> > >
> >
> >
> >
> > --
> > Aditya Sundaram
> > Software Engineer, Technology team
> > AKR Tech park B Block, B1 047
> > +91-9844006866
> >
>
> --
>
> Mintel Group Ltd | 11 Pilgrim Street | London | EC4V 6RN
> Registered in England: Number 1475918. | VAT Number: GB 232 9342 72
>
> Contact details for our other offices can be found at
> http://www.mintel.com/office-locations.
>
> This email and any attachments may include content that is confidential,
> privileged
> or otherwise protected under applicable law. Unauthorised disclosure,
> copying, distribution
> or use of the contents is prohibited and may be unlawful. If you have
> received this email in error,
> including without appropriate authorisation, then please reply to the
> sender about the error
> and delete this email and any attachments.
>
>
--
Bill Bell
billnbell@gmail.com
cell 720-256-8076
Re: Multilevel grouping?
Posted by Callum Lamb <cl...@mintel.com>.
Look at the collapse module
https://cwiki.apache.org/confluence/display/solr/Collapse+and+Expand+Results.
It can the same thing as group.
If you want to get counts/facets from before the collapse, tag the collapse
statement use the exclude tags tags in your json facets (there's an
equivalent for non json facets). I think the default nullpolicy is
different from grouping too, but you can change it to be the same.
I've not been able to get 2 collapses to work on my version of Solr. But
collapse + group works and you can get 2 levels. Not being able to do
multiple collapses appears to be a bug (it sorta works). I recall there
being JIRA case somewhere stating it was fixed in some version. So you may
be able to do as many levels as you like if you upgrade/already run a very
recent version of Solr.
On Thu, Jul 14, 2016 at 3:52 PM, Aditya Sundaram <aditya.sundaram@myntra.com
> wrote:
> Thanks Yonik, was looking for exactly that, is there any workaround to
> achieve that currently?
>
> On Tue, Jul 12, 2016 at 5:07 PM, Yonik Seeley <ys...@gmail.com> wrote:
>
> > I started this a while ago, but haven't found the time to finish:
> > https://issues.apache.org/jira/browse/SOLR-7830
> >
> > -Yonik
> >
> >
> > On Tue, Jul 12, 2016 at 7:29 AM, Aditya Sundaram
> > <ad...@myntra.com> wrote:
> > > Does solr support multilevel grouping? I want to group upto 2/3 levels
> > > based on different fields i.e 1st group on field one, within which i
> > group
> > > by field 2 etc.
> > > I am aware of facet.pivot which does the same but retrieves only the
> > count.
> > > Is there anyway to get the documents as well along with the count in
> > > facet.pivot???
> > >
> > > --
> > > Aditya Sundaram
> >
>
>
>
> --
> Aditya Sundaram
> Software Engineer, Technology team
> AKR Tech park B Block, B1 047
> +91-9844006866
>
--
Mintel Group Ltd | 11 Pilgrim Street | London | EC4V 6RN
Registered in England: Number 1475918. | VAT Number: GB 232 9342 72
Contact details for our other offices can be found at
http://www.mintel.com/office-locations.
This email and any attachments may include content that is confidential,
privileged
or otherwise protected under applicable law. Unauthorised disclosure,
copying, distribution
or use of the contents is prohibited and may be unlawful. If you have
received this email in error,
including without appropriate authorisation, then please reply to the
sender about the error
and delete this email and any attachments.
Re: Multilevel grouping?
Posted by Aditya Sundaram <ad...@myntra.com>.
Thanks Yonik, was looking for exactly that, is there any workaround to
achieve that currently?
On Tue, Jul 12, 2016 at 5:07 PM, Yonik Seeley <ys...@gmail.com> wrote:
> I started this a while ago, but haven't found the time to finish:
> https://issues.apache.org/jira/browse/SOLR-7830
>
> -Yonik
>
>
> On Tue, Jul 12, 2016 at 7:29 AM, Aditya Sundaram
> <ad...@myntra.com> wrote:
> > Does solr support multilevel grouping? I want to group upto 2/3 levels
> > based on different fields i.e 1st group on field one, within which i
> group
> > by field 2 etc.
> > I am aware of facet.pivot which does the same but retrieves only the
> count.
> > Is there anyway to get the documents as well along with the count in
> > facet.pivot???
> >
> > --
> > Aditya Sundaram
>
--
Aditya Sundaram
Software Engineer, Technology team
AKR Tech park B Block, B1 047
+91-9844006866
Re: Multilevel grouping?
Posted by Yonik Seeley <ys...@gmail.com>.
I started this a while ago, but haven't found the time to finish:
https://issues.apache.org/jira/browse/SOLR-7830
-Yonik
On Tue, Jul 12, 2016 at 7:29 AM, Aditya Sundaram
<ad...@myntra.com> wrote:
> Does solr support multilevel grouping? I want to group upto 2/3 levels
> based on different fields i.e 1st group on field one, within which i group
> by field 2 etc.
> I am aware of facet.pivot which does the same but retrieves only the count.
> Is there anyway to get the documents as well along with the count in
> facet.pivot???
>
> --
> Aditya Sundaram