#community-help

Resolving Sort Error in Typesense Server Application

TLDR Max reported an error with group sort in Typesense Server, which Jason resolved by correcting the parameter used, leading to functioning sorting.

Powered by Struct AI

1

1

6
1mo
Solved
Join the chat
Nov 01, 2023 (1 month ago)
Max
Photo of md5-af105ba72abf5ec8cd12637398db3c81
Max
07:11 PM
👋 We’re getting this error when trying to sort by group counts (works fine with default sort). Is there something we’re missing? Thanks 🙂
{
"query": "query",
"query_by": "description",
"group_by": "author"
"sort_by": "_group_count:desc"
}

> (404) Could not find a field named `_group_count` in the schema for sorting.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:11 PM
Could you make sure you're running Typesense Server 0.25.1 or above?
Max
Photo of md5-af105ba72abf5ec8cd12637398db3c81
Max
07:15 PM
yep, we’re on the latest 0.25.2.rc1 version
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:30 PM
The parameter is actually called _group_found:desc. Will fix the docs shortly

1

Max
Photo of md5-af105ba72abf5ec8cd12637398db3c81
Max
07:34 PM
Awesome, it works now. Thanks! :)
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:34 PM
Awesome, thank you for helping catch that!

1