> Case 3 let;s extend it with expand=true: > { "responseHeader":{ "status":0, "QTime":1, "params":{ > "q":"author:\"William > Shakespeare\"", "fq":"{!collapse field=title}&expand=true", "_": > "1585603593269"}}, > I think it is because, expand=true parameter is not passed properly. As you can see from the params in the responseHeader section, q , fq are separate keys but expand=true is appended to fq value.
If passed correctly, it should look something like this > { "responseHeader":{ "status":0, "QTime":1, "params":{ > "q":"author:\"William > Shakespeare\"", "fq":"{!collapse field=title}", "expand": "true", "_": > "1585603593269"}}, > Regards, Munendra S N On Tue, Mar 31, 2020 at 3:07 AM Szűcs Roland <szucs.rol...@bookandwalk.hu> wrote: > Hi Munendra, > Let's see the 3 scenario: > 1. Query without collapse > 2. Query with collapse > 3. Query with collapse and expand > I made a mini book database for this: > Case 1: > { "responseHeader":{ "status":0, "QTime":0, "params":{ > "q":"author:\"William > Shakespeare\"", "_":"1585603593269"}}, "response":{"numFound":4,"start":0," > docs":[ { "id":"1", "author":"William Shakespeare", "title":"The Taming of > the Shrew", "format":"ebook", "_version_":1662625767773700096}, { "id":"2", > "author":"William Shakespeare", "title":"The Taming of the Shrew", > "format": > "paper", "_version_":1662625790857052160}, { "id":"3", "author":"William > Shakespeare", "title":"The Taming of the Shrew", "format":"audiobook", " > _version_":1662625809553162240}, { "id":"4", "author":"William > Shakespeare", > "title":"Much Ado about Nothing", "format":"paper", "_version_": > 1662625868323749888}] }} > As you can see there are 3 different format from the same book. > > Case 2: > { "responseHeader":{ "status":0, "QTime":2, "params":{ > "q":"author:\"William > Shakespeare\"", "fq":"{!collapse field=title}", "_":"1585603593269"}}, " > response":{"numFound":2,"start":0,"docs":[ { "id":"1", "author":"William > Shakespeare", "title":"The Taming of the Shrew", "format":"ebook", " > _version_":1662625767773700096}, { "id":"4", "author":"William > Shakespeare", > "title":"Much Ado about Nothing", "format":"paper", "_version_": > 1662625868323749888}] }} > Collapse post filter worked as I expected. > Case 3 let;s extend it with expand=true: > { "responseHeader":{ "status":0, "QTime":1, "params":{ > "q":"author:\"William > Shakespeare\"", "fq":"{!collapse field=title}&expand=true", "_": > "1585603593269"}}, "response":{"numFound":2,"start":0,"docs":[ { "id":"1", > " > author":"William Shakespeare", "title":"The Taming of the Shrew", "format": > "ebook", "_version_":1662625767773700096}, { "id":"4", "author":"William > Shakespeare", "title":"Much Ado about Nothing", "format":"paper", > "_version_ > ":1662625868323749888}] }} > > As you can see nothing as changed. There is no additional section of the > response. > > Cheers, > Roland > > Munendra S N <sn.munendr...@gmail.com> ezt írta (időpont: 2020. márc. 30., > H, 17:46): > > > Please share the complete request. Also, does number of results change > with > > & without collapse. Usually title would be unique every document. If that > > is the case then, there won't be anything to expand right? > > > > On Mon, Mar 30, 2020, 8:22 PM Szűcs Roland <szucs.rol...@bookandwalk.hu> > > wrote: > > > > > Hi Munendra, > > > I do not get error . The strange thing is that I get exactly the same > > > response with fq={!collapse field=title} versus fq={!collapse > > > field=title}&expand=true. > > > Collapse works properly as a standalone fq but expand has no impact. > How > > > can I have access to the "hidden" documents then? > > > > > > Roland > > > > > > Munendra S N <sn.munendr...@gmail.com> ezt írta (időpont: 2020. márc. > > 30., > > > H, 16:47): > > > > > > > Hey, > > > > Could you please share the stacktrace or error message you received? > > > > > > > > On Mon, Mar 30, 2020, 7:58 PM Szűcs Roland < > > szucs.rol...@bookandwalk.hu> > > > > wrote: > > > > > > > > > Hi All, > > > > > > > > > > I manage to use edismax queryparser in solr 8.4.1 with collapse > > without > > > > any > > > > > problem. I tested it with the SOLR admin GUI. So fq={!collapse > > > > field=title} > > > > > worked fine. > > > > > > > > > > As soon as I use the example from the documentation and use: > > > > fq={!collapse > > > > > field=title}&expand=true, I did not get back any additional output > > with > > > > > section expanded. > > > > > > > > > > Any idea? > > > > > > > > > > Thanks in advance, > > > > > Roland > > > > > > > > > > > > > > >