Package: django-elasticsearch-dsl-drf
IntegrateElasticsearch DSLwithDjango REST frameworkin
the shortest way possible, with least efforts possible.Package provides views, serializers, filter backends, pagination and other
handy add-ons.You are expected to usedjango-elasticsearch-dslfor defining your
Elasticsearch documents.DocumentationDocumentation is available onRead the Docs.Make sure to readFAQ.PrerequisitesDjango 2.2, 3.1 and 3.2.Python 3.6, 3.7, 3.8 and 3.9.Elasticsearch 6.x, 7.x. For older versions usedjango-elasticsearch-dsl-drfversion 0.18.Main features and highlightsDynamic serializer for Documents.Search filter backend.Ordering filter backend.Filtering filter backend(big variety of
native- and functional- query lookups, such asgt,gte,lt,lte,endswith,contains,wildcard,exists,exclude,isnull,range,in,prefix(same asstartswith),termandtermsis implemented.Geo-spatial filtering filter backend(the
following filters implemented:geo_distance,geo_polygonandgeo_bounding_box).Geo-spatial ordering filter backend(the
following filters implemented:geo_distance).Faceted search filter backend.Post-filter filter backend.Nested filtering filter backend.Highlight backend.Suggester filter backend.Functional suggester filter backend.Pagination (Page number and limit/offset pagination).Ids filter backend.Multi match search filter backend.Simple search query filter backend.More-like-this support (detail action).Global aggregations support.Source filter backend.Do you need a similar tool for GraphQL? Checkgraphene-elastic.DemosOnline demoCheck thelive demo app(Django 3.1 + Django REST Framework 3.12 + Elasticsearch 7.5) hosted on Heroku
and bonsai.io.Local demoA frontend demo (React based) is available. See thededicated docsfor more information.To bootstrap evaluation, clone the repository locally and rundocker-compose.docker-composeupIt will set up:Elasticsearch onhttp://localhost:9200Django REST framework onhttp://localhost:8000React onhttp://localhost:3000InstallationInstall latest stable version from PyPI:pipinstalldjango-elasticsearch-dsl-drfor latest stable version from GitHub:pipinstallhttps://github.com/barseghyanartur/django-elasticsearch-dsl-drf/archive/stable.tar.gzAddrest_framework,django_elasticsearch_dslanddjango_elasticsearch_dsl_drftoINSTALLED_APPS:INSTALLED_APPS=(# ...# REST framework'rest_framework',# Django Elasticsearch integration'django_elasticsearch_dsl',# Django REST framework Elasticsearch integration (this package)'django_elasticsearch_dsl_drf',# ...)Quick startPerhaps the easiest way to get acquainted withdjango-elasticsearch-dsl-drfis to read thequick start tutorial.See it as a guide of diving into integration of Elasticsearch with Django
with very low knowledge entry level.TestingProject is covered with tests.To test with all supported Python/Django versions type:toxTo test against specific environment, type:tox-epy38-django30To test just your working environment type:./runtests.pyTo run a single test in your working environment type:./runtests.pysrc/django_elasticsearch_dsl_drf/tests/test_filtering.pyOr:./manage.pytestdjango_elasticsearch_dsl_drf.tests.test_orderingTo run a single test class in a given test module in your working environment
type:./runtests.pysrc/django_elasticsearch_dsl_drf/tests/test_suggesters.py::TestSuggestersIt’s assumed that you have all the requirements installed. If not, first
install the test requirements:pipinstall-rexamples/requirements/test.txtWriting documentationKeep the following hierarchy.=====
title
=====

header
======

sub-header
----------

sub-sub-header
~~~~~~~~~~~~~~

sub-sub-sub-header
^^^^^^^^^^^^^^^^^^

sub-sub-sub-sub-header
++++++++++++++++++++++

sub-sub-sub-sub-sub-header
**************************LicenseGPL-2.0-only OR LGPL-2.1-or-laterSupportFor any issues contact me at the e-mail given in theAuthorsection.AuthorArtur Barseghyan <artur.barseghyan@gmail.com>