DEV Community

Anton Zobnin
Anton Zobnin

Posted on

Explain elasticsearch - pros and cons

Hi, I'm working with search in my work project right now and I'm stuck on thoughts about the best way of its' realisation. ¯\_(ツ)_/¯ There will be many search options such as time, different id and serial numbers, location, names etc.

Sooo... What does elasticsearch do? And is it better than just db querying?

Thank you for any reply and supporting information :]

Top comments (1)

Collapse
 
lukaszkuczynski profile image
lukaszkuczynski

It depends on what do you want to store there.. If the data model is relational and text that can be found inside are only keywords like

{
    "env_name": "dev",
    "user_name": "luk"
}

.. then you probably can use any of real DB.
If you want to see the good coming from Search Engine that ES is indeed, you will think how to query you text with fulltext search queries, looking how relevant information is to you:

{
   "blogger_name": "me",
   "content": "this is text with keywords that's gonna to be searched and boosted according to the needs"
}