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+ ---
16get_one_index_1 : |-
27 curl \
38 -X GET 'http://localhost:7700/indexes/movies'
4- list_all_indexes_1 : |1 -
9+ list_all_indexes_1 : |-
510 curl \
611 -X GET 'http://localhost:7700/indexes'
712create_an_index_1 : |-
@@ -84,11 +89,10 @@ update_settings_1: |-
8489 -X POST 'http://localhost:7700/indexes/movies/settings' \
8590 --data '{
8691 "rankingRules": [
87- "typo",
8892 "words",
93+ "typo",
8994 "proximity",
9095 "attribute",
91- "wordsPosition",
9296 "exactness",
9397 "desc(release_date)",
9498 "desc(rank)"
@@ -170,19 +174,19 @@ update_distinct_attribute_1: |-
170174reset_distinct_attribute_1 : |-
171175 curl \
172176 -X DELETE 'http://localhost:7700/indexes/movies/settings/distinct-attribute'
173- get_attributes_for_faceting_1 : |-
177+ get_filterable_attributes_1 : |-
174178 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 : |-
177181 curl \
178- -X POST 'http://localhost:7700/indexes/movies/settings/attributes-for-faceting ' \
182+ -X POST 'http://localhost:7700/indexes/movies/settings/filterable-attributes ' \
179183 --data '[
180184 "genres",
181185 "director"
182186 ]'
183- reset_attributes_for_faceting_1 : |-
187+ reset_filterable_attributes_1 : |-
184188 curl \
185- -X DELETE 'http://localhost:7700/indexes/movies/settings/attributes-for-faceting '
189+ -X DELETE 'http://localhost:7700/indexes/movies/settings/filterable-attributes '
186190get_searchable_attributes_1 : |-
187191 curl \
188192 -X GET 'http://localhost:7700/indexes/movies/settings/searchable-attributes'
@@ -252,16 +256,16 @@ field_properties_guide_displayed_1: |-
252256 }'
253257filtering_guide_1 : |-
254258 curl 'http://localhost:7700/indexes/movies/search' \
255- --data '{ "q": "Avengers", "filters ": "release_date > 795484800" }'
259+ --data '{ "q": "Avengers", "filter ": "release_date > 795484800" }'
256260filtering_guide_2 : |-
257261 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\")" }'
259263filtering_guide_3 : |-
260264 curl 'http://localhost:7700/indexes/movies/search' \
261- --data '{ "q": "horror", "filters ": "director = \"Jordan Peele\"" }'
265+ --data '{ "q": "horror", "filter ": "director = \"Jordan Peele\"" }'
262266filtering_guide_4 : |-
263267 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\")" }' \
265269search_parameter_guide_query_1 : |-
266270 curl 'http://localhost:7700/indexes/movies/search' \
267271 --data '{ "q": "shifu" }'
@@ -279,16 +283,16 @@ search_parameter_guide_crop_1: |-
279283 --data '{ "q": "shifu", "attributesToCrop": ["overview"], "cropLength": 10 }'
280284search_parameter_guide_highlight_1 : |-
281285 curl 'http://localhost:7700/indexes/movies/search' \
282- --data '{ "q": "shifu ", "attributesToHighlight": ["overview"] }'
286+ --data '{ "q": "winter feast ", "attributesToHighlight": ["overview"] }'
283287search_parameter_guide_filter_1 : |-
284288 curl 'http://localhost:7700/indexes/movies/search' \
285- --data '{ "q": "n", "filters ": "title = Nightshift" }'
289+ --data '{ "q": "n", "filter ": "title = Nightshift" }'
286290search_parameter_guide_filter_2 : |-
287291 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\"" }'
289293search_parameter_guide_matches_1 : |-
290294 curl 'http://localhost:7700/indexes/movies/search' \
291- --data '{ "q": "shifu", "attributesToHighlight": ["overview"] , "matches": true }'
295+ --data '{ "q": "winter feast" , "matches": true }'
292296settings_guide_synonyms_1 : |-
293297 curl \
294298 -X POST 'http://localhost:7700/indexes/tops/settings' \
@@ -313,11 +317,10 @@ settings_guide_ranking_rules_1: |-
313317 -X POST 'http://localhost:7700/indexes/movies/settings' \
314318 --data '{
315319 "rankingRules": [
316- "typo",
317320 "words",
321+ "typo",
318322 "proximity",
319323 "attribute",
320- "wordsPosition",
321324 "exactness",
322325 "asc(release_date)",
323326 "desc(rank)"
@@ -366,7 +369,7 @@ search_guide_1: |-
366369 --data '{ "q": "shifu", "limit": 5, "offset": 10 }'
367370search_guide_2 : |-
368371 curl 'http://localhost:7700/indexes/movies/search' \
369- --data '{ "q": "Avengers", "filters ": "release_date > 795484800" }'
372+ --data '{ "q": "Avengers", "filter ": "release_date > 795484800" }'
370373getting_started_add_documents_md : |-
371374 ```bash
372375 curl \
@@ -382,35 +385,38 @@ faceted_search_update_settings_1: |-
382385 curl \
383386 -X POST 'http://localhost:7700/indexes/movies/settings' \
384387 --data '{
385- "attributesForFaceting ": [
388+ "filterableAttributes ": [
386389 "director",
387390 "genres"
388391 ]
389392 }'
390- faceted_search_facet_filters_1 : |-
393+ faceted_search_filter_1 : |-
391394 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\" "] }'
393396faceted_search_facets_distribution_1 : |-
394397 curl --get 'http://localhost:7700/indexes/movies/search' \
395398 --data '{ "q": "Batman", "facetsDistribution": ["genres"] }'
396- faceted_search_walkthrough_attributes_for_faceting_1 : |-
399+ faceted_search_walkthrough_filterable_attributes_1 : |-
397400 curl \
398401 -X POST 'http://localhost:7700/indexes/movies/settings' \
399402 --data '{
400- "attributesForFaceting ": [
403+ "filterableAttributes ": [
401404 "director",
402405 "producer",
403406 "genres",
404407 "production_companies"
405408 ]
406409 }'
407- faceted_search_walkthrough_facet_filters_1 : |-
410+ faceted_search_walkthrough_filter_1 : |-
408411 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\" "] }'
410413faceted_search_walkthrough_facets_distribution_1 : |-
411414 curl 'http://localhost:7700/indexes/movies/search' \
412415 --data '{ "q": "Batman", "facetsDistribution": ["genres"] }'
413416post_dump_1 : |-
414417 curl -X POST 'http://localhost:7700/dumps'
415418get_dump_status_1 : |-
416419 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