Re: Nested grouping or equivalent.

2016-05-12 Thread Callum Lamb
Thank you so much Erick. The CollapsingQparse was exactly what I needed. I'm able to group by the field and then do the collapse from products into items and get the correct answer. The Collapsing is also more appropriate for the general grouping we need to do all the time now as well, so we'll pro

Re: Nested grouping or equivalent.

2016-05-12 Thread Alessandro Benedetti
"Unfortunately our documents now need to be grouped as well (product variants into items) and that grouping query needs to work on that grouping instead. As far as I'm aware you can't do nested grouping in Solr." What about collapsing the product variants into a group Head which will become the "p

Re: Nested grouping or equivalent.

2016-05-11 Thread Erick Erickson
A couple of ideas. If this is 5x consider Streaming Aggregation. The idea here is that you stream the docs back to a SolrJ client and slice and dice them there. SA is designed to export 400K docs/sec, but the returned values must be DocValues (i.e. no text types, strings are OK). Have you seen the

Nested grouping or equivalent.

2016-05-11 Thread Callum Lamb
We have a horrible Solr query that groups by a field and then sorts by another. My understanding is that for this to happen it has to sort by the grouping field, group it and then sort the resulting result set. It's not a fast query. Unfortunately our documents now need to be grouped as well (prod