Skip to content

Commit dee4333

Browse files
authored
Merge pull request #597 from meilisearch/update_filter_names_for_v.30.0
Update filter names for v.30.0
2 parents 6dd53c9 + a92f0b0 commit dee4333

File tree

6 files changed

+97
-69
lines changed

6 files changed

+97
-69
lines changed

.code-samples.meilisearch.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,8 @@ get_all_tasks_filtering_1: |-
623623
client.get_tasks({'indexUid': ['movies']})
624624
get_all_tasks_filtering_2: |-
625625
client.get_tasks({
626-
'status': ['succeeded', 'failed'],
627-
'type': ['documentAdditionOrUpdate']
626+
'statuses': ['succeeded', 'failed'],
627+
'types': ['documentAdditionOrUpdate']
628628
})
629629
get_all_tasks_paginating_1: |-
630630
client.get_tasks({

meilisearch/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,7 @@ def get_tasks(
407407
Parameters
408408
----------
409409
parameters (optional):
410-
parameters accepted by the get tasks route: https://docs.meilisearch.com/reference/api/tasks.html#get-all-tasks.
411-
`indexUid` should be set as a List.
410+
parameters accepted by the get tasks route: https://docs.meilisearch.com/reference/api/tasks.html#get-tasks.
412411
413412
Returns
414413
-------

meilisearch/index.py

Lines changed: 61 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ def __init__(
4949
def delete(self) -> dict[str, Any]:
5050
"""Delete the index.
5151
52+
Returns
53+
-------
54+
task_info:
55+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
56+
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
57+
5258
Raises
5359
------
5460
MeiliSearchApiError
@@ -67,8 +73,8 @@ def update(self, primary_key: str) -> dict[str, Any]:
6773
6874
Returns
6975
-------
70-
task:
71-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
76+
task_info:
77+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
7278
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
7379
7480
Raises
@@ -116,8 +122,8 @@ def create(config: Config, uid: str, options: dict[str, Any] | None = None) -> d
116122
117123
Returns
118124
-------
119-
task:
120-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
125+
task_info:
126+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
121127
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
122128
123129
Raises
@@ -136,8 +142,7 @@ def get_tasks(self, parameters: dict[str, Any] | None = None) -> TaskResults:
136142
Parameters
137143
----------
138144
parameters (optional):
139-
parameters accepted by the get tasks route: https://docs.meilisearch.com/reference/api/tasks.html#get-all-tasks.
140-
`indexUid` should be set as a List.
145+
parameters accepted by the get tasks route: https://docs.meilisearch.com/reference/api/tasks.html#get-tasks.
141146
142147
Returns
143148
-------
@@ -154,9 +159,9 @@ def get_tasks(self, parameters: dict[str, Any] | None = None) -> TaskResults:
154159
An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors
155160
"""
156161
if parameters is not None:
157-
parameters.setdefault("indexUid", []).append(self.uid)
162+
parameters.setdefault("indexUids", []).append(self.uid)
158163
else:
159-
parameters = {"indexUid": [self.uid]}
164+
parameters = {"indexUids": [self.uid]}
160165

161166
tasks = get_tasks(self.config, parameters=parameters)
162167
return TaskResults(tasks)
@@ -756,8 +761,8 @@ def update_settings(self, body: dict[str, Any]) -> dict[str, Any]:
756761
757762
Returns
758763
-------
759-
task:
760-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
764+
task_info:
765+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
761766
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
762767
763768
Raises
@@ -776,8 +781,8 @@ def reset_settings(self) -> dict[str, Any]:
776781
777782
Returns
778783
-------
779-
task:
780-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
784+
task_info:
785+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
781786
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
782787
783788
Raises
@@ -814,8 +819,8 @@ def update_ranking_rules(self, body: list[str]) -> dict[str, Any]:
814819
815820
Returns
816821
-------
817-
task:
818-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
822+
task_info:
823+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
819824
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
820825
821826
Raises
@@ -830,8 +835,8 @@ def reset_ranking_rules(self) -> dict[str, Any]:
830835
831836
Returns
832837
-------
833-
task:
834-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
838+
task_info:
839+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
835840
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
836841
837842
Raises
@@ -870,8 +875,8 @@ def update_distinct_attribute(self, body: dict[str, Any]) -> dict[str, Any]:
870875
871876
Returns
872877
-------
873-
task:
874-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
878+
task_info:
879+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
875880
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
876881
877882
Raises
@@ -886,8 +891,8 @@ def reset_distinct_attribute(self) -> dict[str, Any]:
886891
887892
Returns
888893
-------
889-
task:
890-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
894+
task_info:
895+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
891896
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
892897
893898
Raises
@@ -926,8 +931,8 @@ def update_searchable_attributes(self, body: list[str]) -> dict[str, Any]:
926931
927932
Returns
928933
-------
929-
task:
930-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
934+
task_info:
935+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
931936
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
932937
933938
Raises
@@ -942,8 +947,8 @@ def reset_searchable_attributes(self) -> dict[str, Any]:
942947
943948
Returns
944949
-------
945-
task:
946-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
950+
task_info:
951+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
947952
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
948953
949954
Raises
@@ -982,8 +987,8 @@ def update_displayed_attributes(self, body: list[str]) -> dict[str, Any]:
982987
983988
Returns
984989
-------
985-
task:
986-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
990+
task_info:
991+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
987992
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
988993
989994
Raises
@@ -998,8 +1003,8 @@ def reset_displayed_attributes(self) -> dict[str, Any]:
9981003
9991004
Returns
10001005
-------
1001-
task:
1002-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1006+
task_info:
1007+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
10031008
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
10041009
10051010
Raises
@@ -1038,8 +1043,8 @@ def update_stop_words(self, body: list[str]) -> dict[str, Any]:
10381043
10391044
Returns
10401045
-------
1041-
task:
1042-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1046+
task_info:
1047+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
10431048
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
10441049
10451050
Raises
@@ -1054,8 +1059,8 @@ def reset_stop_words(self) -> dict[str, Any]:
10541059
10551060
Returns
10561061
-------
1057-
task:
1058-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1062+
task_info:
1063+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
10591064
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
10601065
10611066
Raises
@@ -1094,8 +1099,8 @@ def update_synonyms(self, body: dict[str, list[str]]) -> dict[str, Any]:
10941099
10951100
Returns
10961101
-------
1097-
task:
1098-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1102+
task_info:
1103+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
10991104
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
11001105
11011106
Raises
@@ -1110,8 +1115,8 @@ def reset_synonyms(self) -> dict[str, Any]:
11101115
11111116
Returns
11121117
-------
1113-
task:
1114-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1118+
task_info:
1119+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
11151120
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
11161121
11171122
Raises
@@ -1150,8 +1155,8 @@ def update_filterable_attributes(self, body: list[str]) -> dict[str, Any]:
11501155
11511156
Returns
11521157
-------
1153-
task:
1154-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1158+
task_info:
1159+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
11551160
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
11561161
11571162
Raises
@@ -1166,8 +1171,8 @@ def reset_filterable_attributes(self) -> dict[str, Any]:
11661171
11671172
Returns
11681173
-------
1169-
task:
1170-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1174+
task_info:
1175+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
11711176
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
11721177
11731178
Raises
@@ -1206,8 +1211,8 @@ def update_sortable_attributes(self, body: list[str]) -> dict[str, Any]:
12061211
12071212
Returns
12081213
-------
1209-
task:
1210-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1214+
task_info:
1215+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
12111216
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
12121217
12131218
Raises
@@ -1222,8 +1227,8 @@ def reset_sortable_attributes(self) -> dict[str, Any]:
12221227
12231228
Returns
12241229
-------
1225-
task:
1226-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1230+
task_info:
1231+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
12271232
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
12281233
12291234
Raises
@@ -1262,8 +1267,8 @@ def update_typo_tolerance(self, body: dict[str, Any]) -> dict[str, Any]:
12621267
12631268
Returns
12641269
-------
1265-
task:
1266-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1270+
task_info:
1271+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
12671272
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
12681273
12691274
Raises
@@ -1278,8 +1283,8 @@ def reset_typo_tolerance(self) -> dict[str, Any]:
12781283
12791284
Returns
12801285
-------
1281-
task:
1282-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1286+
task_info:
1287+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
12831288
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
12841289
12851290
Raises
@@ -1317,8 +1322,8 @@ def update_pagination_settings(self, body: dict[str, Any]) -> dict[str, Any]:
13171322
13181323
Returns
13191324
-------
1320-
task:
1321-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1325+
task_info:
1326+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
13221327
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
13231328
13241329
Raises
@@ -1335,8 +1340,8 @@ def reset_pagination_settings(self) -> dict[str, Any]:
13351340
13361341
Returns
13371342
-------
1338-
task:
1339-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1343+
task_info:
1344+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
13401345
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
13411346
13421347
Raises
@@ -1373,8 +1378,8 @@ def update_faceting_settings(self, body: dict[str, Any]) -> dict[str, Any]:
13731378
13741379
Returns
13751380
-------
1376-
task:
1377-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1381+
task_info:
1382+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
13781383
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
13791384
13801385
Raises
@@ -1389,8 +1394,8 @@ def reset_faceting_settings(self) -> dict[str, Any]:
13891394
13901395
Returns
13911396
-------
1392-
task:
1393-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
1397+
task_info:
1398+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
13941399
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
13951400
13961401
Raises

meilisearch/task.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ def get_tasks(
2020
config:
2121
Config object containing permission and location of Meilisearch.
2222
parameters (optional):
23-
parameters accepted by the get tasks route: https://docs.meilisearch.com/reference/api/tasks.html#get-all-tasks.
24-
`indexUid` should be set as a List.
23+
parameters accepted by the get tasks route: https://docs.meilisearch.com/reference/api/tasks.html#get-tasks.
2524
2625
Returns
2726
-------

0 commit comments

Comments
 (0)