Aljosa Asanovic
10/23/2021, 3:48 PMAljosa Asanovic
10/23/2021, 3:48 PMAljosa Asanovic
10/23/2021, 3:49 PMKishore Nallan
10/23/2021, 3:49 PMKishore Nallan
10/23/2021, 3:50 PMAljosa Asanovic
10/23/2021, 3:51 PMAljosa Asanovic
10/23/2021, 3:51 PMKishore Nallan
10/23/2021, 3:54 PMKishore Nallan
10/23/2021, 3:55 PMsort_by=field1:asc,field2:asc
Kishore Nallan
10/23/2021, 3:56 PMKishore Nallan
10/23/2021, 3:57 PMAljosa Asanovic
10/23/2021, 3:58 PMAljosa Asanovic
10/23/2021, 3:59 PMKishore Nallan
10/23/2021, 4:00 PMKishore Nallan
10/23/2021, 4:01 PMKishore Nallan
10/23/2021, 4:03 PMAljosa Asanovic
10/23/2021, 4:08 PM@AfterInsert
and @AfterUpdate
events which keeps Typesense in sync. We'd need to add a trigger which updates the sort on all items if the title field is modified on one of them.
It works better for our case because despite having millions of documents, they are segregated cleanly into about 5-10k chunks.
As for supporting sorting on any string length, it doesn't seem worth it. Algolia certainly discourage people from doing it except in rare circumstances and even then as a separate index or something.
Sorting by a fixed length title sort of field could be interesting but I'm not sure how to determine what an optimal length is. 8 characters is probably good enough because at a glance I doubt most people can mentally sort past a certain number of characters, although in titles starting with the same word it would be easier to identify something that's not sorted correctly past the first 8 characters.Kishore Nallan
10/23/2021, 4:13 PMKishore Nallan
10/23/2021, 4:13 PMAljosa Asanovic
10/23/2021, 4:15 PMAljosa Asanovic
10/23/2021, 4:16 PMKishore Nallan
10/23/2021, 4:16 PMAndrew Sittermann
10/23/2021, 5:43 PM