Hii Joel, Thanks for the reply.
But I was not able to find any official documentation stating multiple
collapses. It would be helpful if you got any article about that.
Also the second collapse would be on the main result set I believe. We
can't do that on expanded results?


On Tue, 6 Sept 2022 at 20:27, Joel Bernstein <joels...@gmail.com> wrote:

> I believe this is supported on newer of Solr 8.5 and above.  The expand
> code has a specific comment that deals with multiple collapse fields:
>
>        // if there are multiple collapse pick the low cost one
>        // if cost are equal then first one is picked
>
> So, you can specify a cost on the collapse filter which will control the
> order of the collapse and select the expand field.
>
> There is also an undocumented expand parameter:
>
> expand.field
>
> This will allow you to specify which field to expand on.
>
> Collapse will support more than one collapse with versions Solr 8.5+.
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
>
> On Tue, Sep 6, 2022 at 8:29 AM Daxesh Parmar <daxeshparmar0...@gmail.com>
> wrote:
>
> > Hii, I wanted to know whether solr provides a feature to do a second
> > collapse on expanded results or not?
> > For my use case I am doing collapse of fieldA, and getting
> expandedResults.
> > I need the expanded results in such a way that all the values under
> fieldB
> > are present in expandedResults.
> >
> > Eg. I am doing a collapse on  MovieCategory, and each MovieCategory will
> > have a subcategory,
> > So how Can I ensure I get all Possible Subcategories in expanedResults.
> > (Can we do a second collapse on subCategories also?)
> >
> >
> > Thanks.
> > Daxesh.
> >
>

Reply via email to