1
+ # This code-samples file is used by the MeiliSearch documentation
2
+ # Every example written here will be automatically fetched by
3
+ # the documentation on build
4
+ # You can read more at https://github.com/meilisearch/documentation/tree/master/.vuepress/code-samples
5
+ ---
1
6
get_one_index_1 : |-
2
7
curl \
3
8
-X GET 'http://localhost:7700/indexes/movies'
4
- list_all_indexes_1 : |1 -
9
+ list_all_indexes_1 : |-
5
10
curl \
6
11
-X GET 'http://localhost:7700/indexes'
7
12
create_an_index_1 : |-
@@ -84,11 +89,10 @@ update_settings_1: |-
84
89
-X POST 'http://localhost:7700/indexes/movies/settings' \
85
90
--data '{
86
91
"rankingRules": [
87
- "typo",
88
92
"words",
93
+ "typo",
89
94
"proximity",
90
95
"attribute",
91
- "wordsPosition",
92
96
"exactness",
93
97
"desc(release_date)",
94
98
"desc(rank)"
@@ -170,19 +174,19 @@ update_distinct_attribute_1: |-
170
174
reset_distinct_attribute_1 : |-
171
175
curl \
172
176
-X DELETE 'http://localhost:7700/indexes/movies/settings/distinct-attribute'
173
- get_attributes_for_faceting_1 : |-
177
+ get_filterable_attributes_1 : |-
174
178
curl \
175
- -X GET 'http://localhost:7700/indexes/movies/settings/attributes-for-faceting '
176
- update_attributes_for_faceting_1 : |-
179
+ -X GET 'http://localhost:7700/indexes/movies/settings/filterable-attributes '
180
+ update_filterable_attributes_1 : |-
177
181
curl \
178
- -X POST 'http://localhost:7700/indexes/movies/settings/attributes-for-faceting ' \
182
+ -X POST 'http://localhost:7700/indexes/movies/settings/filterable-attributes ' \
179
183
--data '[
180
184
"genres",
181
185
"director"
182
186
]'
183
- reset_attributes_for_faceting_1 : |-
187
+ reset_filterable_attributes_1 : |-
184
188
curl \
185
- -X DELETE 'http://localhost:7700/indexes/movies/settings/attributes-for-faceting '
189
+ -X DELETE 'http://localhost:7700/indexes/movies/settings/filterable-attributes '
186
190
get_searchable_attributes_1 : |-
187
191
curl \
188
192
-X GET 'http://localhost:7700/indexes/movies/settings/searchable-attributes'
@@ -252,16 +256,16 @@ field_properties_guide_displayed_1: |-
252
256
}'
253
257
filtering_guide_1 : |-
254
258
curl 'http://localhost:7700/indexes/movies/search' \
255
- --data '{ "q": "Avengers", "filters ": "release_date > 795484800" }'
259
+ --data '{ "q": "Avengers", "filter ": "release_date > 795484800" }'
256
260
filtering_guide_2 : |-
257
261
curl 'http://localhost:7700/indexes/movies/search' \
258
- --data '{ "q":"Batman", "filters ": "release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")" }'
262
+ --data '{ "q":"Batman", "filter ": "release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")" }'
259
263
filtering_guide_3 : |-
260
264
curl 'http://localhost:7700/indexes/movies/search' \
261
- --data '{ "q": "horror", "filters ": "director = \"Jordan Peele\"" }'
265
+ --data '{ "q": "horror", "filter ": "director = \"Jordan Peele\"" }'
262
266
filtering_guide_4 : |-
263
267
curl 'http://localhost:7700/indexes/movies/search' \
264
- --data '{ "q": "Planet of the Apes", "filters ": "rating >= 3 AND (NOT director = \"Tim Burton\")" }' \
268
+ --data '{ "q": "Planet of the Apes", "filter ": "rating >= 3 AND (NOT director = \"Tim Burton\")" }' \
265
269
search_parameter_guide_query_1 : |-
266
270
curl 'http://localhost:7700/indexes/movies/search' \
267
271
--data '{ "q": "shifu" }'
@@ -279,16 +283,16 @@ search_parameter_guide_crop_1: |-
279
283
--data '{ "q": "shifu", "attributesToCrop": ["overview"], "cropLength": 10 }'
280
284
search_parameter_guide_highlight_1 : |-
281
285
curl 'http://localhost:7700/indexes/movies/search' \
282
- --data '{ "q": "shifu ", "attributesToHighlight": ["overview"] }'
286
+ --data '{ "q": "winter feast ", "attributesToHighlight": ["overview"] }'
283
287
search_parameter_guide_filter_1 : |-
284
288
curl 'http://localhost:7700/indexes/movies/search' \
285
- --data '{ "q": "n", "filters ": "title = Nightshift" }'
289
+ --data '{ "q": "n", "filter ": "title = Nightshift" }'
286
290
search_parameter_guide_filter_2 : |-
287
291
curl 'http://localhost:7700/indexes/movies/search' \
288
- --data '{ "q": "shifu", "filters ": "title=\"Kung Fu Panda\"" }'
292
+ --data '{ "q": "shifu", "filter ": "title=\"Kung Fu Panda\"" }'
289
293
search_parameter_guide_matches_1 : |-
290
294
curl 'http://localhost:7700/indexes/movies/search' \
291
- --data '{ "q": "shifu", "attributesToHighlight": ["overview"] , "matches": true }'
295
+ --data '{ "q": "winter feast" , "matches": true }'
292
296
settings_guide_synonyms_1 : |-
293
297
curl \
294
298
-X POST 'http://localhost:7700/indexes/tops/settings' \
@@ -313,11 +317,10 @@ settings_guide_ranking_rules_1: |-
313
317
-X POST 'http://localhost:7700/indexes/movies/settings' \
314
318
--data '{
315
319
"rankingRules": [
316
- "typo",
317
320
"words",
321
+ "typo",
318
322
"proximity",
319
323
"attribute",
320
- "wordsPosition",
321
324
"exactness",
322
325
"asc(release_date)",
323
326
"desc(rank)"
@@ -366,7 +369,7 @@ search_guide_1: |-
366
369
--data '{ "q": "shifu", "limit": 5, "offset": 10 }'
367
370
search_guide_2 : |-
368
371
curl 'http://localhost:7700/indexes/movies/search' \
369
- --data '{ "q": "Avengers", "filters ": "release_date > 795484800" }'
372
+ --data '{ "q": "Avengers", "filter ": "release_date > 795484800" }'
370
373
getting_started_add_documents_md : |-
371
374
```bash
372
375
curl \
@@ -382,35 +385,38 @@ faceted_search_update_settings_1: |-
382
385
curl \
383
386
-X POST 'http://localhost:7700/indexes/movies/settings' \
384
387
--data '{
385
- "attributesForFaceting ": [
388
+ "filterableAttributes ": [
386
389
"director",
387
390
"genres"
388
391
]
389
392
}'
390
- faceted_search_facet_filters_1 : |-
393
+ faceted_search_filter_1 : |-
391
394
curl 'http://localhost:7700/indexes/movies/search' \
392
- --data '{ "q": "thriller", "facetFilters ": [["genres: Horror", "genres: Mystery"], "director: Jordan Peele"] }'
395
+ --data '{ "q": "thriller", "filter ": [["genres = Horror", "genres = Mystery"], "director = \" Jordan Peele\" "] }'
393
396
faceted_search_facets_distribution_1 : |-
394
397
curl --get 'http://localhost:7700/indexes/movies/search' \
395
398
--data '{ "q": "Batman", "facetsDistribution": ["genres"] }'
396
- faceted_search_walkthrough_attributes_for_faceting_1 : |-
399
+ faceted_search_walkthrough_filterable_attributes_1 : |-
397
400
curl \
398
401
-X POST 'http://localhost:7700/indexes/movies/settings' \
399
402
--data '{
400
- "attributesForFaceting ": [
403
+ "filterableAttributes ": [
401
404
"director",
402
405
"producer",
403
406
"genres",
404
407
"production_companies"
405
408
]
406
409
}'
407
- faceted_search_walkthrough_facet_filters_1 : |-
410
+ faceted_search_walkthrough_filter_1 : |-
408
411
curl 'http://localhost:7700/indexes/movies/search' \
409
- --data '{ "q": "thriller", "facetFilters ": [["genres: Horror", "genres: Mystery"], "director: Jordan Peele"] }'
412
+ --data '{ "q": "thriller", "filter ": [["genres = Horror", "genres = Mystery"], "director = \" Jordan Peele\" "] }'
410
413
faceted_search_walkthrough_facets_distribution_1 : |-
411
414
curl 'http://localhost:7700/indexes/movies/search' \
412
415
--data '{ "q": "Batman", "facetsDistribution": ["genres"] }'
413
416
post_dump_1 : |-
414
417
curl -X POST 'http://localhost:7700/dumps'
415
418
get_dump_status_1 : |-
416
419
curl -X GET 'http://localhost:7700/dumps/20201101-110357260/status'
420
+ phrase_search_1 : |-
421
+ curl -X POST 'http://localhost:7700/indexes/movies/search' \
422
+ --data '{ "q": "\"african american\" horror" }'
0 commit comments