Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Erick Erickson
OK, you just don't want to group as Shawn says. The group.main=true just flattens the list but still returns the docs in groups does all the work of grouping. So instead of getting value=1 [ doc31 doc64 ] value=2 [ doc 98 doc 6 ] you get doc31 doc64 doc98 doc6 Best, Erick On Tue,

Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Shawn Heisey
On 9/11/2018 12:00 PM, Venkateswarlu Bommineni wrote: What i am expecting is (it might be silly) if i put group.main=true and sort by price then the results are: { "priceValueGLP_usd_double":32015.0, "sapRank_int":446}, { "priceValueGLP_usd_double":32015.

Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Venkateswarlu Bommineni
Erik and Shawn, Sorry for the confusion. Yes Solr is sorting inside the grouped results.but not on all the results. Example : we have got 6 records by solr response. if i do *sort=price desc , it is sorting indise each group.* *But the requirement is to sort on all the results.* *Current result

Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Erick Erickson
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 lo

Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Shawn Heisey
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

Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Venkateswarlu Bommineni
Please find the resonse and query when grouping and sorting by rank : http://localhost:8983/solr/master_shaneco_Product_flip/select?indent=on&q=rank:[1%20TO%20*]&wt=json&group=true&group.main=true&group.field=rank&rows=50&fl=code_String,price,rank&sort=rank+asc&group.limit=3 { "responseHeader":{

Re: group.limit>1 and sorting is not working as expected

2018-09-11 Thread Erick Erickson
This is still confusing: bq. But the requirement is to sort on all the results we show to the customer. What does grouping have to do with that statement? Would it be served by just _not_ grouping at all? If not, why not? Please provide a small set of example documents and what you want to show

Re: group.limit>1 and sorting is not working as expected

2018-09-10 Thread Venkateswarlu Bommineni
Hello Erik, Sorry for the confustion . here is the scenario. We have 2 fields rank,price for each product. multiple products may have same rank but different prices. So on products listing page, by default we will group on rank and show 3 products for each group and sort based on Rank. But Cust

Re: group.limit>1 and sorting is not working as expected

2018-09-10 Thread Erick Erickson
bq. I just wanted to know if there is any attribute which says sort on all the document list instead of relative to group results. I really don't know what you want here. "sort on all the document list" seems like just sorting without grouping. >From that problem statement I don't see what groupi

Re: group.limit>1 and sorting is not working as expected

2018-09-10 Thread Venkateswarlu Bommineni
Thanks for the reply Shawn. I have tried multiple combination of group.sort and sort but non of them worked. I just wanted to know if there is any attribute which says sort on all the document list instead of relative to group results. Can you please help if you have any idea or work around ? T

Re: group.limit>1 and sorting is not working as expected

2018-09-08 Thread Shawn Heisey
On 9/8/2018 8:34 PM, Venkateswarlu Bommineni wrote: Query ; https:///solr/default/select?fq=rank_int:[1%20TO%20*]&indent=on&wt=json&group=true&group.main=true&group.field= rank_int&group.limit=3&q=*&fl=code_string,sapRank_int,price&sort=price+desc I am grouping on field *rank_int with group limi

group.limit>1 and sorting is not working as expected

2018-09-08 Thread Venkateswarlu Bommineni
Hello Solr Experts, I am facing an weird issue. where if i have put group.limit>1 then sorting is not working as expected. Query ; https:///solr/default/select?fq=rank_int:[1%20TO%20*]&indent=on&wt=json&group=true&group.main=true&group.field= rank_int&group.limit=3&q=*&fl=code_string,sapRank_int,