Alexandre, I did not because the default value of 5 was sufficient for the number of results I am getting back. It is a result set of 7 documents total and each group should have at max 2 documents in my case. Groping feature (as opposed to collapse-expand feature) is working as expected. I am not sure why collapse-expand feature is not working correctly (especially expand, collapse is working fine)
Michael, I don't want to filter expand result set further. All I want is basically un-collapse the collapsed result set. I tried expand.q=*:* just for the experimentation. There was definitely a change in 'expanded' section but it was incorrect. There were only two documents with same y value for X field in original result set but 'expanded' section shows 5 documents with value y grouped into one group. Some of those documents are not even returned in original result set. On Thu, May 20, 2021 at 1:46 PM Michael Gibney <mich...@michaelgibney.net> wrote: > Depending on what your goals/expectations are, it could also be worth > noting the `expand.q` and `expand.fq` params, which are applied when > fetching "expanded docs" (intersecting with the union of > `expand.field` result values). In cases where you want to "pivot" to > an unrestricted set of related clustered results, it may be helpful to > specify `expand.q=*:*`, or something similar. > > On Thu, May 20, 2021 at 1:20 PM Alexandre Rafalovitch > <arafa...@gmail.com> wrote: > > > > Did you try expand.rows parameter for how many items to include in each > group? > > https://solr.apache.org/guide/8_7/collapse-and-expand-results.html > > > > Regards, > > Alex. > > > > On Thu, 20 May 2021 at 13:02, gnandre <arnoldbron...@gmail.com> wrote: > > > > > > Hi, > > > > > > I am using Solr 8.5.2 (non-SolrCloud) mode. It is a non-sharded > scenario. I > > > am trying to collapse the resultset based on one of the string fields > (say > > > X). Collapse query works as expected. It collapses the result set by > > > excluding the documents that have the same field X and retains only > the top > > > raking document from each collapsed group. > > > > > > Now, I want to expand the collapsed results to achieve similar > > > functionality like result grouping. However, when I add expand=true to > > > query, the returned expanded section doesn't include all collapsed > groups. > > > It also doesn't include all collapsed documents for the collapsed > groups > > > returned. Is there some issue with the 'expand' feature? >