From 36d60a69539863a2a54f7fd258d3707b81834fc4 Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Fri, 5 Apr 2024 19:23:14 +0100 Subject: [PATCH] Documentation fixes --- docs/api.rst | 8 +++++++- docs/configuration.rst | 2 +- elasticsearch_dsl/_async/document.py | 4 ++-- elasticsearch_dsl/_sync/document.py | 4 ++-- elasticsearch_dsl/search_base.py | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index a89943b12..52979d22a 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -9,22 +9,28 @@ The :ref:`Asynchronous API ` classes are documented separately. .. py:module:: elasticsearch_dsl .. autoclass:: Search + :inherited-members: :members: .. autoclass:: MultiSearch + :inherited-members: :members: .. autoclass:: Document + :inherited-members: :members: .. autoclass:: Index + :inherited-members: :members: .. autoclass:: FacetedSearch + :inherited-members: :members: .. autoclass:: UpdateByQuery - :members: + :inherited-members: + :members: Mappings -------- diff --git a/docs/configuration.rst b/docs/configuration.rst index 7b2b54cf0..14c4d8538 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -45,7 +45,7 @@ to the ``Elasticsearch`` class from ``elasticsearch-py``. To see all possible configuration options refer to the `documentation -`_. +`_. Multiple clusters ----------------- diff --git a/elasticsearch_dsl/_async/document.py b/elasticsearch_dsl/_async/document.py index 8f1b50a2a..e3cfa38d1 100644 --- a/elasticsearch_dsl/_async/document.py +++ b/elasticsearch_dsl/_async/document.py @@ -255,7 +255,7 @@ async def update( :arg return_doc_meta: set to ``True`` to return all metadata from the index API call instead of only the operation result - :return operation result noop/updated + :return: operation result noop/updated """ body = { "doc_as_upsert": doc_as_upsert, @@ -346,7 +346,7 @@ async def save( Any additional keyword arguments will be passed to ``Elasticsearch.index`` unchanged. - :return operation result created/updated + :return: operation result created/updated """ if validate: self.full_clean() diff --git a/elasticsearch_dsl/_sync/document.py b/elasticsearch_dsl/_sync/document.py index 05df47536..850de9a4b 100644 --- a/elasticsearch_dsl/_sync/document.py +++ b/elasticsearch_dsl/_sync/document.py @@ -253,7 +253,7 @@ def update( :arg return_doc_meta: set to ``True`` to return all metadata from the index API call instead of only the operation result - :return operation result noop/updated + :return: operation result noop/updated """ body = { "doc_as_upsert": doc_as_upsert, @@ -344,7 +344,7 @@ def save( Any additional keyword arguments will be passed to ``Elasticsearch.index`` unchanged. - :return operation result created/updated + :return: operation result created/updated """ if validate: self.full_clean() diff --git a/elasticsearch_dsl/search_base.py b/elasticsearch_dsl/search_base.py index 3241baf80..50117e1bc 100644 --- a/elasticsearch_dsl/search_base.py +++ b/elasticsearch_dsl/search_base.py @@ -143,7 +143,7 @@ def params(self, **kwargs): """ Specify query params to be used when executing the search. All the keyword arguments will override the current values. See - https://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch.Elasticsearch.search + https://elasticsearch-py.readthedocs.io/en/latest/api/elasticsearch.html#elasticsearch.Elasticsearch.search for all available parameters. Example::