Skip to content

Commit 422ebf4

Browse files
committed
Remove changes about create_index from this PR
1 parent d079862 commit 422ebf4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

meilisearch/client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ def __init__(self, url, apiKey=None):
2929
def create_index(self, uid, options=None):
3030
"""Create an index.
3131
32+
If the argument `uid` isn't passed in, it will be generated
33+
by MeiliSearch.
34+
3235
Parameters
3336
----------
3437
uid: str
@@ -45,8 +48,9 @@ def create_index(self, uid, options=None):
4548
HTTPError
4649
In case of any other error found here https://docs.meilisearch.com/references/#errors-status-code
4750
"""
48-
index_dict = Index.create(self.config, uid, options)
49-
return Index(self.config, index_dict['uid'], index_dict['primaryKey'])
51+
index = Index(self.config, uid)
52+
index.create(self.config, uid, options)
53+
return index
5054

5155
def get_indexes(self):
5256
"""Get all indexes.

0 commit comments

Comments
 (0)