Using Elasticity Search as a Django Database

I want to use elastic-search as a database in my project, which I create based on django . As I found out, elastic search used together with the database through haystack , where elastic-search used only for indexing and quick searches. This explains how to integrate the database and elastic-search with haystack However, I would like to use elastic-search without a database, in other words, I will index all the data. I have not seen anything like this below that you can use elastic-search as a database in the django settings module.

 # settings.py DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { 'read_default_file': '/path/to/my.cnf', }, } 

}

Is it possible to use only elastic-search with the django model level? Here is the django-elasticsearch backend and in the examples section which it does as we would like, but I don’t know if it first stores in the database indexing on elastic-search or just saving and indexing on elastic-search .

+6
source share
1 answer

I think the short answer to your question is no. I looked over this a while ago and found that there is a project to create an elasticsearch database engine ( https://github.com/aparo/django-elasticsearch ), but with the latter in 2011, I would not have thought it was viable with version versions 1.0 for version 1.0 and possibly 1.6.x Django.

+1
source

Source: https://habr.com/ru/post/969845/


All Articles