django-anysearch-dsl


Namedjango-anysearch-dsl JSON
Version 7.2.2.1 PyPI version JSON
download
home_pagehttps://github.com/django-anysearch/django-anysearch-dsl
SummaryWrapper around elasticsearch-dsl and opensearch-dsl for Django models
upload_time2022-12-30 23:28:48
maintainerArtur Barseghyan
docs_urlNone
authorSabricot
requires_python
licenseApache Software License 2.0
keywords django elasticsearch elasticsearch-dsl
VCS
bugtrack_url
requirements django elasticsearch-dsl
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ====================
Django AnySearch DSL
====================

.. image:: https://github.com/django-anysearch/django-anysearch-dsl/actions/workflows/ci.yml/badge.svg
    :target: https://github.com/django-anysearch/django-anysearch-dsl/actions/workflows/ci.yml
.. image:: https://codecov.io/gh/django-anysearch/django-anysearch-dsl/coverage.svg?branch=master
    :target: https://codecov.io/gh/django-anysearch/django-anysearch-dsl
.. image:: https://badge.fury.io/py/django-anysearch-dsl.svg
    :target: https://pypi.python.org/pypi/django-anysearch-dsl
.. image:: https://readthedocs.org/projects/django-anysearch-dsl/badge/?version=latest&style=flat
    :target: https://django-anysearch-dsl.readthedocs.io/en/latest/

Django AnySearch DSL is a package that allows indexing of Django models in Elasticsearch/OpenSearch.
It is built as a thin wrapper around elasticsearch-dsl-py_ (and OpenSearch alternative).

You can view the full documentation at https://django-anysearch-dsl.readthedocs.io

.. _elasticsearch-dsl-py: https://github.com/elastic/elasticsearch-dsl-py
.. _django-elasticsearch-dsl: https://github.com/django-es/django-elasticsearch-dsl
.. _django-anysearch-dsl: https://github.com/django-anysearch/django-anysearch-dsl
.. _anysearch: https://github.com/barseghyanartur/anysearch
.. _changelog: https://github.com/django-anysearch/django-anysearch-dsl/blob/django-anysearch-dsl/CHANGELOG.rst

Manifest
--------

This project is a fork of django-elasticsearch-dsl_ with a single ultimate
purpose of supporting both Elasticsearch and OpenSearch. Compatibility is
achieved through anysearch_ which does necessary import replacements depending
on which one (Elasticsearch or OpenSearch) is chosen (similarly to what ``six``
package does to support both 2.x and 3.x branches of Python).

- Both ``elasticsearch`` and ``elasticsearch-dsl`` are optional
  dependencies (as well as ``opensearch-py`` and ``opensearch-dsl``) and are
  installed when instructed (like ``pip install django-anysearch-dsl[elasticsearch]``
  or ``pip install django-anysearch-dsl[opensearch]``).
- ``anysearch`` is a required dependency.

The plan is to stay in sync with the django-elasticsearch-dsl_, so if you're
missing a feature or have a bugfix, please propose it in the upstream.

- Submit PRs here only if they are solely related to this package and not
  the django-elasticsearch-dsl_.
- Do not propose code style changes or changes that contain reformatting
  of the code (like ``black`` or ``isort`` fixes). Such things shall be
  proposed in the django-elasticsearch-dsl_. Code changes to this package
  are kept minimal, so that it's easier to stay in sync.

Versioning is kept in sync up to the ``build`` (in terms of Semantic
versioning ``major.minor[.build[.revision]``), so version 7.2.2.x of this
library would represent the version 7.2.2 of the upstream. All changes
are mentioned in the changelog_.

This library is a drop-in replacement, it does have the same namespace as
``django-elasticsearch-dsl``, thus you can't have both installed.

Due to complexities, no support for older versions of Elasticsearch (< 7.x)
is provided (and will never be).

Features
--------

- Based on elasticsearch-dsl-py_ so you can make queries with the Search_ class.
- Django signal receivers on save and delete for keeping Elasticsearch in sync.
- Management commands for creating, deleting, rebuilding and populating indices.
- Elasticsearch auto mapping from django models fields.
- Complex field type support (ObjectField, NestedField).
- Index fast using `parallel` indexing.
- Requirements

   - Django >= 2.2
   - Python 3.6, 3.7, 3.8, 3.9, 3.10 or 3.10.

**Elasticsearch Compatibility:**
The library is compatible with Elasticsearch 7.x, OpenSearch 1.x and OpenSearch 2.x.

.. code-block:: python

    # Elasticsearch 7.x
    elasticsearch-dsl>=7.0.0,<8.0.0

    # OpenSearch 1.x
    opensearch-dsl>=1.0,<2.0

    # OpenSearch 2.x
    opensearch-dsl>=2.0,<3.0

.. _Search: http://elasticsearch-dsl.readthedocs.io/en/stable/search_dsl.html




History
-------
7.1.4 (2020-07-05)
~~~~~~~~~~~~~~~~~~
* Configure Elasticsearch _id dynamically from document (#272)
* Use chain.from_iterable in for performance improvement (#278)
* Handle case where SimpleLazyObject being treated as an Iterable (#255)
* Camelcase default value in management command (#254)
* Various updates and fixup in docs (#250, #276)
* Start testing against Python 3.8 (#266)


7.1.1 (2019-12-26)
~~~~~~~~~~~~~~~~~~
* Adding detailed documentation and published to Read The Docs #222
* Resolve name resolution while delete, create index (#228)
* Added support for Django 3.0. (#230)
* Removing old Elasticsearc compatibility (#219)
* Drop StringField in favor of TextField.


7.1.0 (2019-10-29)
~~~~~~~~~~~~~~~~~~
* Support for Django `DecimalField` #141
* Indexing speedup by using `parallel` indexing. #213.
  Now you can pass `--parallel` or set `ELASTICSEARCH_DSL_PARALLEL`
  in your settings to get indexing speed boost while indexing
  through management command.
* Fixing name resolution in management command #206
* Small documentation fixes. #196


7.0.0 (2019-08-11)
~~~~~~~~~~~~~~~~~~
* Support Elasticsearch 7.0 (See PR #176)
* Added order by to paginate queryset properly (See PR #153)
* Remove `standard` token filter from `README.md` and test files
* Various documentation fixes


6.4.2 (2019-07-26)
~~~~~~~~~~~~~~~~~~
* Fix document importing path
* Update readme



6.4.1 (2019-06-14)
~~~~~~~~~~~~~~~~~~
* The `DocType` import has changed to `Document`



6.4.0 (2019-06-01)
~~~~~~~~~~~~~~~~~~
* Support elasticsearch-dsl>6.3.0
* Class `Meta` has changed to class `Django` (See PR #136)
* Add `register_document` decorator to register a document (See PR #136)
* Additional Bug fixing and others


0.5.1 (2018-11-07)
~~~~~~~~~~~~~~~~~~
* Limit elastsearch-dsl to supported versions

0.5.0 (2018-04-22)
~~~~~~~~~~~~~~~~~~
* Add Support for Elasticsearch 6 thanks to HansAdema

Breaking Change:
~~~~~~~~~~~~~~~~
Django string fields now point to ES text field by default.
Nothing should change for ES 2.X but if you are using ES 5.X,
you may need to rebuild and/or update some of your documents.


0.4.5 (2018-04-22)
~~~~~~~~~~~~~~~~~~
* Fix prepare with related models when deleted (See PR #99)
* Fix unwanted calls to get_instances_from_related
* Fix for empty ArrayField (CBinyenya)
* Fix nested OneToOneField when related object doesn't exist (CBinyenya)
* Update elasticsearch-dsl minimal version

0.4.4 (2017-12-13)
~~~~~~~~~~~~~~~~~~
* Fix to_queryset with es 5.0/5.1

0.4.3 (2017-12-12)
~~~~~~~~~~~~~~~~~~
* Fix syncing of related objects when deleted
* Add django 2.0 support

0.4.2 (2017-11-27)
~~~~~~~~~~~~~~~~~~
* Convert lazy string to string before serialization
* Readme update (arielpontes)

0.4.1 (2017-10-17)
~~~~~~~~~~~~~~~~~~
* Update example app with get_instances_from_related
* Typo/grammar fixes

0.4.0 (2017-10-07)
~~~~~~~~~~~~~~~~~~
* Add a method on the Search class to return a django queryset from an es result
* Add a queryset_pagination option to DocType.Meta for allow the pagination of
  big django querysets during the index populating
* Remove the call to iterator method for the django queryset
* Fix DocType inheritance. The DocType is store in the registry as a class and not anymore as an instance


0.3.0 (2017-10-01)
~~~~~~~~~~~~~~~~~~
* Add support for resynching ES documents if related models are updated (HansAdema)
* Better management for django FileField and ImageField
* Fix some errors in the doc (barseghyanartur, diwu1989)

0.2.0 (2017-07-02)
~~~~~~~~~~~~~~~~~~
* Replace simple model signals with easier to customise signal processors (barseghyanartur)
* Add options to disable automatic index refreshes (HansAdema)
* Support defining DocType indexes through Meta class (HansAdema)
* Add option to set default Index settings through Django config (HansAdema)

0.1.0 (2017-05-26)
~~~~~~~~~~~~~~~~~~
* First release on PyPI.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/django-anysearch/django-anysearch-dsl",
    "name": "django-anysearch-dsl",
    "maintainer": "Artur Barseghyan",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "django elasticsearch elasticsearch-dsl",
    "author": "Sabricot",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/65/ad/882cf6b35bdc1e6820f4774c00c9fda434737e5629049017a19d7fede283/django-anysearch-dsl-7.2.2.1.tar.gz",
    "platform": null,
    "description": "====================\nDjango AnySearch DSL\n====================\n\n.. image:: https://github.com/django-anysearch/django-anysearch-dsl/actions/workflows/ci.yml/badge.svg\n    :target: https://github.com/django-anysearch/django-anysearch-dsl/actions/workflows/ci.yml\n.. image:: https://codecov.io/gh/django-anysearch/django-anysearch-dsl/coverage.svg?branch=master\n    :target: https://codecov.io/gh/django-anysearch/django-anysearch-dsl\n.. image:: https://badge.fury.io/py/django-anysearch-dsl.svg\n    :target: https://pypi.python.org/pypi/django-anysearch-dsl\n.. image:: https://readthedocs.org/projects/django-anysearch-dsl/badge/?version=latest&style=flat\n    :target: https://django-anysearch-dsl.readthedocs.io/en/latest/\n\nDjango AnySearch DSL is a package that allows indexing of Django models in Elasticsearch/OpenSearch.\nIt is built as a thin wrapper around elasticsearch-dsl-py_ (and OpenSearch alternative).\n\nYou can view the full documentation at https://django-anysearch-dsl.readthedocs.io\n\n.. _elasticsearch-dsl-py: https://github.com/elastic/elasticsearch-dsl-py\n.. _django-elasticsearch-dsl: https://github.com/django-es/django-elasticsearch-dsl\n.. _django-anysearch-dsl: https://github.com/django-anysearch/django-anysearch-dsl\n.. _anysearch: https://github.com/barseghyanartur/anysearch\n.. _changelog: https://github.com/django-anysearch/django-anysearch-dsl/blob/django-anysearch-dsl/CHANGELOG.rst\n\nManifest\n--------\n\nThis project is a fork of django-elasticsearch-dsl_ with a single ultimate\npurpose of supporting both Elasticsearch and OpenSearch. Compatibility is\nachieved through anysearch_ which does necessary import replacements depending\non which one (Elasticsearch or OpenSearch) is chosen (similarly to what ``six``\npackage does to support both 2.x and 3.x branches of Python).\n\n- Both ``elasticsearch`` and ``elasticsearch-dsl`` are optional\n  dependencies (as well as ``opensearch-py`` and ``opensearch-dsl``) and are\n  installed when instructed (like ``pip install django-anysearch-dsl[elasticsearch]``\n  or ``pip install django-anysearch-dsl[opensearch]``).\n- ``anysearch`` is a required dependency.\n\nThe plan is to stay in sync with the django-elasticsearch-dsl_, so if you're\nmissing a feature or have a bugfix, please propose it in the upstream.\n\n- Submit PRs here only if they are solely related to this package and not\n  the django-elasticsearch-dsl_.\n- Do not propose code style changes or changes that contain reformatting\n  of the code (like ``black`` or ``isort`` fixes). Such things shall be\n  proposed in the django-elasticsearch-dsl_. Code changes to this package\n  are kept minimal, so that it's easier to stay in sync.\n\nVersioning is kept in sync up to the ``build`` (in terms of Semantic\nversioning ``major.minor[.build[.revision]``), so version 7.2.2.x of this\nlibrary would represent the version 7.2.2 of the upstream. All changes\nare mentioned in the changelog_.\n\nThis library is a drop-in replacement, it does have the same namespace as\n``django-elasticsearch-dsl``, thus you can't have both installed.\n\nDue to complexities, no support for older versions of Elasticsearch (< 7.x)\nis provided (and will never be).\n\nFeatures\n--------\n\n- Based on elasticsearch-dsl-py_ so you can make queries with the Search_ class.\n- Django signal receivers on save and delete for keeping Elasticsearch in sync.\n- Management commands for creating, deleting, rebuilding and populating indices.\n- Elasticsearch auto mapping from django models fields.\n- Complex field type support (ObjectField, NestedField).\n- Index fast using `parallel` indexing.\n- Requirements\n\n   - Django >= 2.2\n   - Python 3.6, 3.7, 3.8, 3.9, 3.10 or 3.10.\n\n**Elasticsearch Compatibility:**\nThe library is compatible with Elasticsearch 7.x, OpenSearch 1.x and OpenSearch 2.x.\n\n.. code-block:: python\n\n    # Elasticsearch 7.x\n    elasticsearch-dsl>=7.0.0,<8.0.0\n\n    # OpenSearch 1.x\n    opensearch-dsl>=1.0,<2.0\n\n    # OpenSearch 2.x\n    opensearch-dsl>=2.0,<3.0\n\n.. _Search: http://elasticsearch-dsl.readthedocs.io/en/stable/search_dsl.html\n\n\n\n\nHistory\n-------\n7.1.4 (2020-07-05)\n~~~~~~~~~~~~~~~~~~\n* Configure Elasticsearch _id dynamically from document (#272)\n* Use chain.from_iterable in for performance improvement (#278)\n* Handle case where SimpleLazyObject being treated as an Iterable (#255)\n* Camelcase default value in management command (#254)\n* Various updates and fixup in docs (#250, #276)\n* Start testing against Python 3.8 (#266)\n\n\n7.1.1 (2019-12-26)\n~~~~~~~~~~~~~~~~~~\n* Adding detailed documentation and published to Read The Docs #222\n* Resolve name resolution while delete, create index (#228)\n* Added support for Django 3.0. (#230)\n* Removing old Elasticsearc compatibility (#219)\n* Drop StringField in favor of TextField.\n\n\n7.1.0 (2019-10-29)\n~~~~~~~~~~~~~~~~~~\n* Support for Django `DecimalField` #141\n* Indexing speedup by using `parallel` indexing. #213.\n  Now you can pass `--parallel` or set `ELASTICSEARCH_DSL_PARALLEL`\n  in your settings to get indexing speed boost while indexing\n  through management command.\n* Fixing name resolution in management command #206\n* Small documentation fixes. #196\n\n\n7.0.0 (2019-08-11)\n~~~~~~~~~~~~~~~~~~\n* Support Elasticsearch 7.0 (See PR #176)\n* Added order by to paginate queryset properly (See PR #153)\n* Remove `standard` token filter from `README.md` and test files\n* Various documentation fixes\n\n\n6.4.2 (2019-07-26)\n~~~~~~~~~~~~~~~~~~\n* Fix document importing path\n* Update readme\n\n\n\n6.4.1 (2019-06-14)\n~~~~~~~~~~~~~~~~~~\n* The `DocType` import has changed to `Document`\n\n\n\n6.4.0 (2019-06-01)\n~~~~~~~~~~~~~~~~~~\n* Support elasticsearch-dsl>6.3.0\n* Class `Meta` has changed to class `Django` (See PR #136)\n* Add `register_document` decorator to register a document (See PR #136)\n* Additional Bug fixing and others\n\n\n0.5.1 (2018-11-07)\n~~~~~~~~~~~~~~~~~~\n* Limit elastsearch-dsl to supported versions\n\n0.5.0 (2018-04-22)\n~~~~~~~~~~~~~~~~~~\n* Add Support for Elasticsearch 6 thanks to HansAdema\n\nBreaking Change:\n~~~~~~~~~~~~~~~~\nDjango string fields now point to ES text field by default.\nNothing should change for ES 2.X but if you are using ES 5.X,\nyou may need to rebuild and/or update some of your documents.\n\n\n0.4.5 (2018-04-22)\n~~~~~~~~~~~~~~~~~~\n* Fix prepare with related models when deleted (See PR #99)\n* Fix unwanted calls to get_instances_from_related\n* Fix for empty ArrayField (CBinyenya)\n* Fix nested OneToOneField when related object doesn't exist (CBinyenya)\n* Update elasticsearch-dsl minimal version\n\n0.4.4 (2017-12-13)\n~~~~~~~~~~~~~~~~~~\n* Fix to_queryset with es 5.0/5.1\n\n0.4.3 (2017-12-12)\n~~~~~~~~~~~~~~~~~~\n* Fix syncing of related objects when deleted\n* Add django 2.0 support\n\n0.4.2 (2017-11-27)\n~~~~~~~~~~~~~~~~~~\n* Convert lazy string to string before serialization\n* Readme update (arielpontes)\n\n0.4.1 (2017-10-17)\n~~~~~~~~~~~~~~~~~~\n* Update example app with get_instances_from_related\n* Typo/grammar fixes\n\n0.4.0 (2017-10-07)\n~~~~~~~~~~~~~~~~~~\n* Add a method on the Search class to return a django queryset from an es result\n* Add a queryset_pagination option to DocType.Meta for allow the pagination of\n  big django querysets during the index populating\n* Remove the call to iterator method for the django queryset\n* Fix DocType inheritance. The DocType is store in the registry as a class and not anymore as an instance\n\n\n0.3.0 (2017-10-01)\n~~~~~~~~~~~~~~~~~~\n* Add support for resynching ES documents if related models are updated (HansAdema)\n* Better management for django FileField and ImageField\n* Fix some errors in the doc (barseghyanartur, diwu1989)\n\n0.2.0 (2017-07-02)\n~~~~~~~~~~~~~~~~~~\n* Replace simple model signals with easier to customise signal processors (barseghyanartur)\n* Add options to disable automatic index refreshes (HansAdema)\n* Support defining DocType indexes through Meta class (HansAdema)\n* Add option to set default Index settings through Django config (HansAdema)\n\n0.1.0 (2017-05-26)\n~~~~~~~~~~~~~~~~~~\n* First release on PyPI.\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Wrapper around elasticsearch-dsl and opensearch-dsl for Django models",
    "version": "7.2.2.1",
    "split_keywords": [
        "django",
        "elasticsearch",
        "elasticsearch-dsl"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "980230eaca1888b78ec43bd05568a22f",
                "sha256": "03c06323a9d7c397bc53dadc4c4eece2993a19fad5e9bad2d74145223396113a"
            },
            "downloads": -1,
            "filename": "django_anysearch_dsl-7.2.2.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "980230eaca1888b78ec43bd05568a22f",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 20354,
            "upload_time": "2022-12-30T23:28:46",
            "upload_time_iso_8601": "2022-12-30T23:28:46.875859Z",
            "url": "https://files.pythonhosted.org/packages/74/30/9daa6b51171235d8c2138e1fdad0f8e316acda6b49b1aff80bf24be8f407/django_anysearch_dsl-7.2.2.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "eb0fe8c539e33cb379f00823a577126a",
                "sha256": "121bf5d994263662eb94ff3a80c749537099cef5e31fc2176091a44664c93bd4"
            },
            "downloads": -1,
            "filename": "django-anysearch-dsl-7.2.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "eb0fe8c539e33cb379f00823a577126a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 18230,
            "upload_time": "2022-12-30T23:28:48",
            "upload_time_iso_8601": "2022-12-30T23:28:48.615976Z",
            "url": "https://files.pythonhosted.org/packages/65/ad/882cf6b35bdc1e6820f4774c00c9fda434737e5629049017a19d7fede283/django-anysearch-dsl-7.2.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-30 23:28:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "django-anysearch",
    "github_project": "django-anysearch-dsl",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "django",
            "specs": [
                [
                    ">=",
                    "1.9.6"
                ]
            ]
        },
        {
            "name": "elasticsearch-dsl",
            "specs": [
                [
                    "<",
                    "8.0.0"
                ],
                [
                    ">=",
                    "7.0.0"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "django-anysearch-dsl"
}
        
Elapsed time: 0.03012s