Grouping and sorting Together

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Grouping and sorting Together

neotorand
Hi List
I need your help to resolve a problem for which i had been struggling for
days.
Lets take an example of Shoes which are grouped on basis of size and Price

With first group as size and price as "7 and 7000" i have 2 documents as
below

{id:1,color:blue,item sold:10}
{id:5,price:yellow,item sold:1}


with second group as size and price as "8 and 8000"  i have 2 documents as
below

{id:2,color:blue,item sold:3}
{id:3,price:yellow,item sold:5}

Now i want to sort the records based on item sold.
How I should look at  the problem.should i remove grouping and sort result
and show.I m asking this as u can see first group has item with item sold as
10,1 and second group as 3 and 5.
What approach i should have to look at the problem

Regards
Neo







--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: Grouping and sorting Together

Paras Lehana
Hi Neo,

Please mention the expected result as well. Do you want to sort "item sold"
group wise or result wise? Use sort
<https://lucene.apache.org/solr/guide/8_3/common-query-parameters.html#sort-parameter>
for the former while group.sort
<https://lucene.apache.org/solr/guide/8_3/result-grouping.html#grouping-parameters>
for the later. Describe your expected result set if I'm not answering
your question.

On Thu, 14 Nov 2019 at 19:35, neotorand <[hidden email]> wrote:

> Hi List
> I need your help to resolve a problem for which i had been struggling for
> days.
> Lets take an example of Shoes which are grouped on basis of size and Price
>
> With first group as size and price as "7 and 7000" i have 2 documents as
> below
>
> {id:1,color:blue,item sold:10}
> {id:5,price:yellow,item sold:1}
>
>
> with second group as size and price as "8 and 8000"  i have 2 documents as
> below
>
> {id:2,color:blue,item sold:3}
> {id:3,price:yellow,item sold:5}
>
> Now i want to sort the records based on item sold.
> How I should look at  the problem.should i remove grouping and sort result
> and show.I m asking this as u can see first group has item with item sold
> as
> 10,1 and second group as 3 and 5.
> What approach i should have to look at the problem
>
> Regards
> Neo
>
>
>
>
>
>
>
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>


--
--
Regards,

*Paras Lehana* [65871]
Development Engineer, Auto-Suggest,
IndiaMART Intermesh Ltd.

8th Floor, Tower A, Advant-Navis Business Park, Sector 142,
Noida, UP, IN - 201303

Mob.: +91-9560911996
Work: 01203916600 | Extn:  *8173*

--
IMPORTANT: 
NEVER share your IndiaMART OTP/ Password with anyone.