I want to use elasticsearch for my mobile app (android and ios).
I installed elasticsearch-js using Node.js : https://github.com/elastic/elasticsearch-js
But I couldn't manage to make it works. So I made some researches and I read that it was a bad idea to "directly" use elasticsearch on mobile and that it was better to use an API.
I don't understand: elasticsearch-js is not already what I need ? If it is not the case then what should I use ?
In advance thanks
Elasticsearch has to be back end. It's not something you install on a mobile or something. The minimum spec to have something working in production is like 5 instances of ES with 8Go of ram and 1 to 2 vCPU per server.
Elasticsearch has an API that you can call to have real time search. You can also tune the system to have suggestions or fuzzy searches (and even more). An ebook is available online for more info : https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html
It's not a plugin that you can add in the front.
On your app (Desktop/Web/Mobile) you need to implement an input where you do a specific search based on what the user writes inside it.
It's like an intern google engine (the principle between Google and ES are the same). You build the server and implement its API on your front.
I can give you a hand to install ES.
For React side as I said you can you consume the API : https://www.elastic.co/guide/en/elasticsearch/reference/current/docs.html
But there is npm package that handle that for you. Read this tutorial (with React but I'm pretty sure you can use this for your project) : https://codeburst.io/how-to-build-an-e-commerce-search-ui-with-react-and-elasticsearch-a581c823b2c3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With