#community-help

Sorting by Boolean Values in Typesense

TLDR Andrew sought to sort documents by Boolean value in Typesense. Jason indicated this is possible from v0.24.0.rcn25 and recommended an upgrade for Typesense Cloud users.

Powered by Struct AI
6
11mo
Solved
Join the chat
Oct 28, 2022 (11 months ago)
Andrew
Photo of md5-7766f890de99fa72a6d81315691a6758
Andrew
04:51 PM
Can i sort by Boolean value? Ie prioritize documents where val==true? I dont want to filter out documents that are false however.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:53 PM
Andrew
Photo of md5-7766f890de99fa72a6d81315691a6758
Andrew
04:56 PM
doing

_eval(isRude:true):desc

Gets me the error:

Could not find a field named `_eval` in the schema for sorting.

Did i do something wrong? I see the flutter api hasnt been updated in a while, not sure if its out of date or an error on my part.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:57 PM
It’s only available on v0.24.0.rcn25 and above
04:57
Jason
04:57 PM
If you’re on Typesense Cloud, we can upgrade you to that build from our side, if you can email your cluster ID to [email protected]
Andrew
Photo of md5-7766f890de99fa72a6d81315691a6758
Andrew
04:58 PM
Gotcha, will do!