Pragya Bopche
Pragya Bopche

Reputation: 1

Can Elasticsearch be used as a database in a Django Project?

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.

Upvotes: 0

Views: 256

Answers (1)

michjnich
michjnich

Reputation: 3395

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.

Upvotes: 0

Related Questions