#community-help

Default Sorting Field Issue in Typesense Cloud

TLDR Jide needed help with setting "default_sorting_field" in Typesense cloud. Jason clarified that id is restricted as it's used internally by Typesense.

Powered by Struct AI
+12
6
8mo
Solved
Join the chat
Jan 16, 2023 (8 months ago)
Jide
Photo of md5-7d2796ababc14477f4c09abc2e8edb05
Jide
06:17 PM
hi I'm a front end dev taking a stab at some backend work. Currently I'm creating a New Collection in Typesense cloud and it looks like the "default_sorting_field" value has to be snake case. All my documents are camel case. Is there any way to get around this?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:21 PM
> it looks like the “default_sorting_field” value has to be snake case.
Not really… May I know where you’re seeing this?
Jide
Photo of md5-7d2796ababc14477f4c09abc2e8edb05
Jide
06:28 PM
having a default_sorting_field value of id_id works but a value of id does not. Is the value id just restricted?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:28 PM
Correct id is a special field that’s used by Typesense internally. So it can’t be set in the schema or the default_sorting_field
06:29
Jason
06:29 PM
But you can send an id in the documents, which is what will then be used by Typesense internally to identify and dedupe documents
+11
Jide
Photo of md5-7d2796ababc14477f4c09abc2e8edb05
Jide
06:32 PM
got it. thanks for the clarification!
+11