Sam
02/13/2025, 11:45 AMJason Bosco
02/13/2025, 11:06 PMIs the only real strategy probably something along the lines of sync less json/data from your master databaseThat pretty much sums it up! Because Typesense is an in-memory data store, so you need to have sufficient RAM to hold the full dataset in RAM. But one common way to blow up RAM usage is to index every single field in your dataset in RAM. So you want to be cognizant about which fields you want to use for search / filtering / sorting and which fields are display-only fields (for eg: image URLs) that are only needed to render the search results. For any display-only fields, you want to leave them out of the collection schema, but you can still the field into the collection when indexing the document. Any fields not mentioned in the schema, but present in documents, will be treated as an unindexed field and will only be stored on disk and won't take up RAM. So optimizing your collection schema is a good way to control RAM usage. Separately, enabling
facet: true
on a field increases RAM usage. So you want to be judicious about that as wellSam
02/21/2025, 3:44 PMFanis Tharropoulos
02/21/2025, 3:46 PMindex: false
to the field definition