March 2020
Intermediate to advanced
608 pages
17h 17m
English
Let's set up a multilingual search with Elasticsearch DSL by executing the following steps:
# myproject/settings/_base.pyINSTALLED_APPS = [ # other apps… "django_elasticsearch_dsl",]ELASTICSEARCH_DSL={ 'default': { 'hosts': 'localhost:9200' },}
# myproject/apps/ideas/documents.pyfrom django.conf import settingsfrom django.utils.translation import get_language, activatefrom django.db import modelsfrom django_elasticsearch_dsl import fieldsfrom django_elasticsearch_dsl.documents import ( Document, ...
Read now
Unlock full access