hi <@U01PL2YSG8L>, <@U01NZ4D0LDD>, i have problem ...
# community-help
a
hi @Kishore Nallan, @Jason Bosco, i have problem with sorting. Here is my search request http://XX.XX.XX.XX:8108/collections/contracts/documents/search/?q=*&amp;filter_by=id:189738&amp;sort_by=rootfield__document_lastmodifiedat:asc and i get this error back:
"message": "Could not find a field named 
rootfield__document_lastmodifiedat
 in the schema for sorting."
The field of course exists in my schema. It seems that TS throws this error because of special symbols in the name of the field. Could you pls confirm that? As i understand there is no nice workaround at the moment?
j
Hmmm, could you do a GET on the collection and post the schema?
a
of course
collections/contracts
contracts_schema.json
here you go
j
Looks like
rootfield__document_lastmodifiedat
is a string. We don't support sorting by strings. Could you try setting it to an integer?
a
hmm i see, thank you. The error message is not intuitive clear though
m
Is it planned to support sorting by string in the future?
k
Yes, it's on our roadmap but sort by string tends to be pretty memory intensive so it's not a very popular ask so far.
m
In order for it to be faster are you looking into replicas like Algolia is doing? E.g. you copy the data and settings from a primary index, then you add a strict sorting (so it's sorted at indexing time, not search time) and you specify what index to use for each sort.
k
I'm not worried about performance, which I am sure we can meet. When I meant by "memory intensive", I mean memory consumption. We certainly do plan to implement it because I understand that it's useful when displaying model numbers etc.
m
Oh ok I see! Thanks for the info. 😄
🙌 1