#community-help

Using TypeSense without Query String for Sorting Documents

TLDR Sidharth asked about using TypeSense without a query string for sorting. Jason suggested setting the q parameter to * and using the sort_by param.

Powered by Struct AI

1

May 12, 2023 (7 months ago)
Sidharth
Photo of md5-051f535431ff484f44f165e9a0b696a5
Sidharth
06:48 PM
Hello Team,
Is there a way to use TypeSense with NO query str but just Sorting the documents basis some attribute and get as an output??
Thanks
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:49 PM
Yup, you can set the q parameter to *
06:49
Jason
06:49 PM
And then use sort_by param
Sidharth
Photo of md5-051f535431ff484f44f165e9a0b696a5
Sidharth
06:55 PM
Got it,
Thanks Jason for lightening fast response 😀
We'll Try this 👍

1