Price sorting issue on distinct items

We are facing an issue when sorting by price from height to lowest, when we have group by items / distinct items with prices(54, 64, 74).
As per our understanding for distinct items, the lowest price item(54) has to take as default and it has to ignore the other items(64, 74). But in current implementation, we feel that default item is for some group item it is taking 54, and for some items it is taking 64 and for some items it is taking 74.
we added Custom Ranking on Price as Desc
So can some help me to understand in which logic the default item is consider for distinct items/ group items.

Hi @shyamsunder.k
For sorting by desc price first, have you tried to add the price as a “sortByAttribute” instead of having it in the customRanking?

More info about it in the Sorting guide

HI @alex
Thanks for you replay. I tried based on your suggestions but bad luck my problem is not resolved.

After getting the sort results from algolia, for more product details am hitting my own api. some products had variants with different prices, such kind of products am displaying the price as range.

For example if one group products have the prices like (54, 64,74). If it is possible irrespective of sorting(low-high or high-low) always 54 return .my problem will solve

Hi @shyamsunder.k,
I’m surprise it doesn’t work. I think the best would be to look at your index configuration together. As you currently run on a Growth plan, you have access to the email support with our Engineering team. Maybe as a next step you could send an email to by coping the thread link, and your Application ID.

I’m having the exact same problem. Even if we sort prices desc, we still want to find the lowest price of any distinct, then sort THOSE price desc.

So sort after distinct and ranking