#community-help

Increasing `per_page` limit in typesense code

TLDR Robert asked about raising the per_page limit in typesense code. Kishore Nallan explained that while it can be increased, it would slow down search speeds. The limit is set for compiler optimizations.

Powered by Struct AI
3
14mo
Solved
Join the chat
Jul 20, 2022 (14 months ago)
Robert
Photo of md5-6384d24e1825271b2c37ad8afa24a899
Robert
11:53 PM
Is the per_page limit of 250 an arbitrary limit that could be easily increased by raising a constant in the typesense code or are there architectural limitations in the code that would make this tricky to increase?
Jul 21, 2022 (14 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:34 AM
You can increase it in code but it's going to make searching slower. 250 is a sweet spot. The reason it's a constant is for some compiler optimisations that can be done when it's a constant.
Robert
Photo of md5-6384d24e1825271b2c37ad8afa24a899
Robert
01:47 AM
Got it, thanks!