Skip to content

Commit cf00a30

Browse files
add DSL module reference documentation to sphinx docs
1 parent 8aee949 commit cf00a30

File tree

2 files changed

+77
-11
lines changed

2 files changed

+77
-11
lines changed

docs/sphinx/dsl.rst

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
.. _dsl:
2+
3+
Python DSL Reference
4+
====================
5+
6+
.. py:module:: elasticsearch.dsl
7+
8+
Synchronous classes
9+
-------------------
10+
11+
.. autoclass:: Search
12+
:inherited-members:
13+
:members:
14+
15+
.. autoclass:: MultiSearch
16+
:inherited-members:
17+
:members:
18+
19+
.. autoclass:: Document
20+
:inherited-members:
21+
:members:
22+
23+
.. autoclass:: Index
24+
:inherited-members:
25+
:members:
26+
27+
.. autoclass:: Mapping
28+
:inherited-members:
29+
:members:
30+
31+
.. autoclass:: FacetedSearch
32+
:inherited-members:
33+
:members:
34+
35+
.. autoclass:: UpdateByQuery
36+
:inherited-members:
37+
:members:
38+
39+
Asynchronous classes
40+
--------------------
41+
42+
.. autoclass:: AsyncSearch
43+
:inherited-members:
44+
:members:
45+
46+
.. autoclass:: AsyncMultiSearch
47+
:inherited-members:
48+
:members:
49+
50+
.. autoclass:: AsyncDocument
51+
:inherited-members:
52+
:members:
53+
54+
.. autoclass:: AsyncIndex
55+
:inherited-members:
56+
:members:
57+
58+
.. autoclass:: AsyncMapping
59+
:inherited-members:
60+
:members:
61+
62+
.. autoclass:: AsyncFacetedSearch
63+
:inherited-members:
64+
:members:
65+
66+
.. autoclass:: AsyncUpdateByQuery
67+
:inherited-members:
68+
:members:

docs/sphinx/index.rst

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,28 +96,25 @@ This client was designed as very thin wrapper around Elasticsearch's REST API to
9696
allow for maximum flexibility. This means that there are no opinions in this
9797
client; it also means that some of the APIs are a little cumbersome to use from
9898
Python. We have created some :ref:`helpers` to help with this issue as well as
99-
a more high level library (`elasticsearch-dsl`_) on top of this one to provide
100-
a more convenient way of working with Elasticsearch.
99+
a more high level `DSL module`_ to provide a more convenient way of working
100+
with Elasticsearch.
101101

102102

103103

104-
Elasticsearch-DSL
104+
Elasticsearch DSL
105105
-----------------
106106

107-
For a more high level client library with more limited scope, have a look at
108-
`elasticsearch-dsl`_ - a more pythonic library sitting on top of
109-
``elasticsearch-py``.
110-
111-
`elasticsearch-dsl`_ provides a more convenient and idiomatic way to write and manipulate
112-
`queries`_ by mirroring the terminology and structure of Elasticsearch JSON DSL
113-
while exposing the whole range of the DSL from Python
107+
For a higher level access with more limited scope, have a look at the `DSL
108+
module`_, which provides a more convenient and idiomatic way to write and
109+
manipulate `queries`_ by mirroring the terminology and structure of
110+
Elasticsearch JSON DSL while exposing the whole range of the DSL from Python
114111
either directly using defined classes or a queryset-like expressions.
115112

116113
It also provides an optional `persistence layer`_ for working with documents as
117114
Python objects in an ORM-like fashion: defining mappings, retrieving and saving
118115
documents, wrapping the document data in user-defined classes.
119116

120-
.. _elasticsearch-dsl: https://elasticsearch-dsl.readthedocs.io/
117+
.. _DSL module: https://elasticsearch-dsl.readthedocs.io/
121118
.. _queries: https://elasticsearch-dsl.readthedocs.io/en/latest/search_dsl.html
122119
.. _persistence layer: https://elasticsearch-dsl.readthedocs.io/en/latest/persistence.html#doctype
123120

@@ -131,6 +128,7 @@ Contents
131128
quickstart
132129
interactive
133130
api
131+
dsl
134132
exceptions
135133
async
136134
helpers

0 commit comments

Comments
 (0)