Sorry this is a stupid question, but does typesens...
# community-help
t
Sorry this is a stupid question, but does typesense also act as a DB storage, or just efficient searching algorithm?
j
Typesense is not meant to be used as your primary data store. It's designed to be a search engine and is optimized for it. So you'd typically replicate data from your primary data store into Typesense
That's a fair question btw, one that others have asked before and considered!
t
Okay thank you!
@Jason Bosco One more question. So if I want to implement a search functionality of my database using Typesense, I assume I won't be loading all the data into Typesense database every search request. So does that mean I should have a primary database like Redis and load new data (for example everytime data updates) into Typesense, and fetch data to front-end from Typesense? (kind of like how caches work)
j
I assume I won't be loading all the data into Typesense database every search request
Correct. You'd push data into Typesense either periodically in a batch from your primary data store or any time data changes. And then when you need to search, instead of querying your primary data store, you'd send the search request to Typesense
j
It can work in nicely with event sourcing I think. I haven't looked at this document much but it seems OK on first glance: https://dev.to/barryosull/event-sourcing-what-it-is-and-why-its-awesome . On another note, getting Typesense up and running, at least in Docker, has been a breeze. Similar offerings like ElasticSearch are a real headache. The only thing I'd question at this stage is pushing clustering support onto the client, I'd normally see that more as a load balancer issue on the backend and give the clients one address to talk to but supporting both is nice also.