#community-help

Typesense's Support for Facets with Range and Pagination

TLDR Stelios inquires about Typesense's handling of facets with range and pagination. Jason & Kishore Nallan clarify its current limitations and future developments.

Powered by Struct AI

1

Oct 12, 2022 (14 months ago)
Stelios
Photo of md5-9f42198ca33ef8712d912bce15375d1b
Stelios
10:04 PM
Hello all.
Typesense looks like a very interesting project, grats to the team here!

One small question from my side: Does typesense support facets with range?
For example counters for documents with posted date (yesterday, three days ago, last week, all time).

Thanks in advance,
Stelios
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
10:15 PM
Thanks Stelios!

Typesense does not support facets with ranges like you describe, for timestamps. But we’re working on adding support ranges with numbers: https://github.com/typesense/typesense/issues/386
Stelios
Photo of md5-9f42198ca33ef8712d912bce15375d1b
Stelios
10:19 PM
That's some good news! Thank you for the quick reply
10:21
Stelios
10:21 PM
One more question if you know, while using the paging feature I can see that the request does not contain any type of timestamp or versioning for prohibiting any new/modified documents after the first page on the index
10:22
Stelios
10:22 PM
Is this being handled somehow or any possible duplicates due to the score changing for example should be handled in the front client?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
10:23 PM
I’ll defer to Kishore Nallan to speak to this ^

1

Oct 13, 2022 (14 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:26 PM
If you are doing updates during pagination, then yes, the next page could have duplicates because of the order changing. This is tricky to handle generically, so it must be handled on the frontend. Let me know if you have any suggestions on supporting this natively.