Skip to content

Commit 9522669

Browse files
committed
[DOCS] Removes include statements, adds explanation.
1 parent bffe18b commit 9522669

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

docs/sphinx/quickstart.rst

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ Using the client
4444
----------------
4545

4646
Time to use Elasticsearch! This section walks you through the most important
47-
operations of Elasticsearch.
47+
operations of Elasticsearch. The following examples assume that the Python
48+
client has already initiated and don't contain the Elasticsearch `include`
49+
statement.
4850

4951

5052
Creating an index
@@ -54,8 +56,6 @@ This is how you create the `my_index` index:
5456

5557
.. code-block:: python
5658
57-
from elasticsearch import Elasticsearch
58-
5959
client.indices.create(index="my_index")
6060
6161
@@ -66,8 +66,6 @@ This indexes a document with the index API:
6666

6767
.. code-block:: python
6868
69-
from elasticsearch import Elasticsearch
70-
7169
client.index(
7270
index="my_index",
7371
id="my_document_id",
@@ -84,8 +82,6 @@ Getting documents
8482
You can get documents by using the following code:
8583

8684
.. code-block:: python
87-
88-
from elasticsearch import Elasticsearch
8985
9086
client.get(index="my_index", id="my_document_id")
9187
@@ -98,8 +94,6 @@ This is how you can create a single match query with the Python client:
9894

9995
.. code-block:: python
10096
101-
from elasticsearch import Elasticsearch
102-
10397
client.search(index="my_index", query={"match": {"foo": "foo"}})
10498
10599
@@ -110,8 +104,6 @@ This is how you can update a document, for example to add a new field:
110104

111105
.. code-block:: python
112106
113-
from elasticsearch import Elasticsearch
114-
115107
client.update(
116108
index="my_index",
117109
id="my_document_id",
@@ -126,8 +118,6 @@ Deleting documents
126118
^^^^^^^^^^^^^^^^^^
127119

128120
.. code-block:: python
129-
130-
from elasticsearch import Elasticsearch
131121
132122
client.delete(index="my_index", id="my_document_id")
133123
@@ -136,7 +126,5 @@ Deleting an index
136126
^^^^^^^^^^^^^^^^^
137127

138128
.. code-block:: python
139-
140-
from elasticsearch import Elasticsearch
141129
142130
client.indices.delete(index="my_index")

0 commit comments

Comments
 (0)