How this all works will be much clearer if you don't use "group.main=true"
But you still haven't _shown_ us what you _expect_. In the second query, Solr is doing exactly what you're telling it to. Return groups of up to three docs lowest-priced docs in each group and ordering the groups by the lowest price doc appearing in the group. What I'm guessing you want to do is specify sort=rank asc&group.sort=price asc Best, Erick On Tue, Sep 11, 2018 at 10:23 AM Shawn Heisey <apa...@elyograg.org> wrote: > > On 9/11/2018 10:14 AM, Venkateswarlu Bommineni wrote: > > Please find the resonse and query when grouping and sorting by rank : > > I see no evidence of grouping happening in either of those responses. > They look like standard responses do when grouping is not enabled. > > Here's an example of a grouped result from the techproducts example that > ships with Solr. The "response" section is gone and has been replaced > by a "grouped" section: > > |{ "responseHeader":{ "status":0, "QTime":0, "params":{ "q":"*:*", > "fl":"id,manu,price", "group.limit":"3", "group.field":"manu", > "_":"1536686115965", "group":"true"}}, "grouped":{ "manu":{ > "matches":32, "groups":[{ "groupValue":null, > "doclist":{"numFound":12,"start":0,"docs":[ { "id":"GB18030TEST", > "price":0.0}, { "id":"adata"}, { "id":"apple"}] }}, { > "groupValue":"Samsung Electronics Co. Ltd.", > "doclist":{"numFound":1,"start":0,"docs":[ { "id":"SP2514N", > "manu":"Samsung Electronics Co. Ltd.", "price":92.0}] }}, { > "groupValue":"Maxtor Corp.", "doclist":{"numFound":1,"start":0,"docs":[ > { "id":"6H500F0", "manu":"Maxtor Corp.", "price":350.0}] }}, { > "groupValue":"Belkin", "doclist":{"numFound":2,"start":0,"docs":[ { > "id":"F8V7067-APL-KIT", "manu":"Belkin", "price":19.95}, { "id":"IW-02", > "manu":"Belkin", "price":11.5}] }}, { "groupValue":"Apple Computer > Inc.", "doclist":{"numFound":1,"start":0,"docs":[ { "id":"MA147LL/A", > "manu":"Apple Computer Inc.", "price":399.0}] }}, { > "groupValue":"Corsair Microsystems Inc.", > "doclist":{"numFound":2,"start":0,"docs":[ { "id":"TWINX2048-3200PRO", > "manu":"Corsair Microsystems Inc.", "price":185.0}, { "id":"VS1GB400C3", > "manu":"Corsair Microsystems Inc.", "price":74.99}] }}, { > "groupValue":"A-DATA Technology Inc.", > "doclist":{"numFound":1,"start":0,"docs":[ { "id":"VDBDB1A16", > "manu":"A-DATA Technology Inc."}] }}, { "groupValue":"Bank of America", > "doclist":{"numFound":1,"start":0,"docs":[ { "id":"USD", "manu":"Bank of > America"}] }}, { "groupValue":"European Union", > "doclist":{"numFound":1,"start":0,"docs":[ { "id":"EUR", > "manu":"European Union"}] }}, { "groupValue":"U.K.", > "doclist":{"numFound":1,"start":0,"docs":[ { "id":"GBP", "manu":"U.K."}] > }}]}}} ||Thanks,||Shawn| > > ||||