@@ -32,14 +32,14 @@ def create_index(self, uid, options=None):
32
32
Parameters
33
33
----------
34
34
uid: str
35
- UID of the index
35
+ UID of the index.
36
36
options: dict, optional
37
- Options passed during index creation (ex: primaryKey)
37
+ Options passed during index creation (ex: primaryKey).
38
38
39
39
Returns
40
40
-------
41
41
index : Index
42
- An instance of Index containing the information of the newly created index
42
+ An instance of Index containing the information of the newly created index.
43
43
Raises
44
44
------
45
45
HTTPError
@@ -57,7 +57,7 @@ def get_indexes(self):
57
57
In case of any error found here https://docs.meilisearch.com/references/#errors-status-code
58
58
Returns
59
59
-------
60
- list
60
+ indexes: list
61
61
List of indexes in dictionnary format. (e.g [{ 'uid': 'movies' 'primaryKey': 'objectID' }])
62
62
"""
63
63
return Index .list_all (self .config )
@@ -66,6 +66,11 @@ def get_index(self, uid):
66
66
"""Get the index.
67
67
This index should already exist.
68
68
69
+ Parameters
70
+ ----------
71
+ uid: str
72
+ UID of the index.
73
+
69
74
Raises
70
75
------
71
76
HTTPError
@@ -82,10 +87,15 @@ def index(self, uid):
82
87
"""Create an Index instance.
83
88
This method doesn't trigger any HTTP call.
84
89
90
+ Parameters
91
+ ----------
92
+ uid: str
93
+ UID of the index.
94
+
85
95
Returns
86
96
-------
87
97
index : Index
88
- An Index instance
98
+ An Index instance.
89
99
"""
90
100
if uid is not None :
91
101
return Index (self .config , uid = uid )
@@ -104,7 +114,7 @@ def get_or_create_index(self, uid, options=None):
104
114
Returns
105
115
-------
106
116
index : Index
107
- An instance of Index containing the information of the retrieved or newly created index
117
+ An instance of Index containing the information of the retrieved or newly created index.
108
118
Raises
109
119
------
110
120
HTTPError
@@ -123,15 +133,16 @@ def get_all_stats(self):
123
133
124
134
Get information about database size and all indexes
125
135
https://docs.meilisearch.com/references/stats.html
136
+
126
137
Returns
127
- ----------
138
+ -------
128
139
stats: `dict`
129
- Dictionnary containing stats about your MeiliSearch instance
140
+ Dictionnary containing stats about your MeiliSearch instance.
130
141
"""
131
142
return self .http .get (self .config .paths .stat )
132
143
133
144
def health (self ):
134
- """Get health of MeiliSearch
145
+ """Get health of the MeiliSearch server.
135
146
136
147
`204` HTTP status response when MeiliSearch is healthy.
137
148
@@ -143,9 +154,9 @@ def health(self):
143
154
return self .http .get (self .config .paths .health )
144
155
145
156
def get_keys (self ):
146
- """Get all keys created
157
+ """Get all keys.
147
158
148
- Get list of all the keys that were created and all their related information .
159
+ Get list of all the keys.
149
160
150
161
Returns
151
162
----------
@@ -176,7 +187,7 @@ def version(self):
176
187
return self .get_version ()
177
188
178
189
def create_dump (self ):
179
- """Triggers the creation of a MeiliSearch dump
190
+ """Triggers the creation of a MeiliSearch dump.
180
191
181
192
Returns
182
193
----------
@@ -187,15 +198,15 @@ def create_dump(self):
187
198
return self .http .post (self .config .paths .dumps )
188
199
189
200
def get_dump_status (self , uid ):
190
- """Retrieves the status of a MeiliSearch dump creation
201
+ """Retrieves the status of a MeiliSearch dump creation.
191
202
192
203
Parameters
193
204
----------
194
205
uid: str
195
- UID of the dump
206
+ UID of the dump.
196
207
197
208
Returns
198
- ----------
209
+ -------
199
210
Dump status: dict
200
211
Information about the dump status.
201
212
https://docs.meilisearch.com/references/dump.html#get-dump-status
0 commit comments