Hacker News new | past | comments | ask | show | jobs | submit login
Elasticsearch as Primary Database
2 points by joshwoodcock on Dec 11, 2020 | hide | past | favorite | 3 comments
Having gone through the product development lifecycle several times, I find that at some point in you almost always end up needing to search data in your database. In the cases where we started out with a traditional document store db like mongodb when we tried to start implementing search capabilities mongo performed very poorly. Innevitably we had to use a multi-database approach where via event sourcing we would store data in 2 databases and took a lot of time away from building new features.

I am just starting a new product and wanted to know what you think about just using eleasticsearch as a document db from day 1, seeing as how it can perform just well for normal key/value pair lookups and very well for the innevitable search features we'll want later down the road. I'm interested to hear your thoughts overall on working with elasticsearch from a developer's point of view, eg, ease of use, tooling, sdk support, etc.




At least you'd need to pay careful attention to eventual consistency: https://www.elastic.co/guide/en/elasticsearch/reference/curr...

I have done this in many of my hobby projects. An other important point is how you'll re-index the data when the need arises. This has occured to me several times during the development phase. You'll kinda have to store it into two places anyway or be ready to lose the already indexed data.


Are you going to change the mapping? You cannot change the mapping of an existing field. You must create a new index with the new mapping and reindex.


sorry, I'm not sure what you mean. The mapping of what? I'm talking about using an elasticsearch database as a primary database for greenfield projects.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: