Antoon Van Dessel
04/02/2026, 1:40 PMIntArray field to each book document. This array would contain the IDs of the libraries where the book is available. Then, filtering by library would simply involve filtering on this field.
I chose an IntArray over a StringArray (e.g. library names) for performance reasons.
Scale:
• ~700 libraries
• ~4 million books
Question:
Does this approach make sense from a performance and scalability perspective in Typesense? Or would you recommend a different data modeling strategy?Alan Martini
04/02/2026, 9:28 PMfilter_by: library_ids:=42 for per-library search. For searching all books, use an unscoped key.
2. Filtering on many library IDs at once (library_ids:=[41, 42, 43, ...]) adds latency as the list grows - keep multi-value filters short when possible.
3. Avoid range_index on this field (not needed for exact matching, adds overhead).
4. Avoid faceting on this field if possible (adds memory overhead).
Once you have this set up and start running some searches, let us know and we can review your full configuration.Antoon Van Dessel
04/03/2026, 6:27 AMAntoon Van Dessel
04/03/2026, 10:50 AMAlan Martini
04/03/2026, 12:23 PM