Did anyone try FlexSearch?

I've found this alternative to Algolia which is open source, self-hostable and free, however I've been having some problems with it. Let me paint you my use case. I wanted to do a full text search on a lot of data. In this regard FlexSeach is quire performant. But to persist that data I have to save it in a JSON file, then before searching I import it, and only then FlexSearch splits the data into searchable Indexes, in Algolia those are Documents. The problem is that as far as I've found this full text search engine is not in-memory, which means whenever a request is sent to search (for example if we talk about an API endpoint for searching) it needs to load that JSON first, then index it, then search, and only after that it returns the results. My question is, did anyone try this out? And is there maybe a way to make it in-memory? For example, like Elastic Search, where it gives you a Docker container that has the engine inside and runs it the whole time. And also, in that case with the docker images, what would be the best (cheapest) way to host it?
2 Replies
Andric
Andric13mo ago
Did you manage to figure this out yet? I’m curious about self-hosted search solutions, too. Am looking at Typesense, mostly. But will look into Flexsearch too As for cheapest way to host it, Fly.io has a generous free plan that seems like it might work
JulieCezar
JulieCezar13mo ago
I didn't try it yet but I believe I did... Basically you have 3 options, FlexSearch, MeiliSearch and ElasticSearch --> all can be self hosted You will need to have a stateful server somewhere that will always run so that the results come in fast Which in most cases means create a Docker image with what you need and run it somewhere, e.g. fly.io Meili and Elastic come with Docker images out of the box, so you can just start a container with what you get + Elastic also has a nice UI which is run locally to input data if you need that For Flex you would need to create a docker image/container yourself or some other type of server that will run FlexSearch in the background And then it's basically just calling an api endpoint to get the results But there is a catch Both Meili and Elastic use quite a bit of resources... For example, Elastic needs at least 5-6GB of RAM just to run Which can potentially mean high prices for you, depeding where you deploy it
Want results from more Discord servers?
Add your server
More Posts