0

Can we directly use Elasticsearch as a primary database in Django? I have tried finding the solution or a way out but could not find any relevant information. Everywhere it is said that we can use Elasticsearch as a search engine over any other primary database. But as per my understanding Elasticsearch is a NoSQL Database, so there should be a way to use it as a Primary Database in a Django Project.

Please help, if someone has any idea about it.

  • 2
    Does this answer your question? [Using ElasticSearch as Database/Storage with Django](https://stackoverflow.com/questions/40948923/using-elasticsearch-as-database-storage-with-django) – michjnich Sep 30 '22 at 06:32
  • @michjnich Yes, but can we have a latest reference which confirms that, the current version of Elasticsearch allows us to use it as a primary database is possible or not. – Pragya Bopche Oct 04 '22 at 10:01

1 Answers1

0

The short answer is no.

SO already has an answer here and this is still valid: Using ElasticSearch as Database/Storage with Django

  • ES is not a ACID compliant
  • Indexing is not immediate so any kind of load would be an issue
  • It's very weakly consistent

Use it together with a proper database and it will help with real time searches, analytics, expensive queries etc. but treat it as derived data.

michjnich
  • 2,796
  • 3
  • 15
  • 31