Skip to content

Commit 23d0f42

Browse files
bors[bot]meili-botalallema
authored
Merge #723
723: Update code-samples for Meilisearch v1.1.0 r=alallema a=meili-bot _This PR is auto-generated._ Update the code-samples.meilisearch.yml according to the [integration-guides issue](meilisearch/integration-guides#254) for more information and the complete description about what should be done here check that issue. Co-authored-by: meili-bot <[email protected]> Co-authored-by: Amélie <[email protected]> Co-authored-by: alallema <[email protected]>
2 parents 8d4e0b4 + 425ffc0 commit 23d0f42

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

.code-samples.meilisearch.yaml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ delete_documents_1: |-
4545
client.index('movies').delete_documents([23488, 153738, 437035, 363869])
4646
search_post_1: |-
4747
client.index('movies').search('American ninja')
48+
multi_search_1: |-
49+
client.multi_search(
50+
[
51+
{'indexUid': 'movies', 'q': 'pooh', 'limit': 5},
52+
{'indexUid': 'movies', 'q': 'nemo', 'limit': 5},
53+
{'indexUid': 'movie_ratings', 'q': 'us'}
54+
]
55+
)
4856
get_all_tasks_1: |-
4957
client.get_tasks()
5058
get_task_1: |-
@@ -312,6 +320,14 @@ search_parameter_guide_hitsperpage_1: |-
312320
client.index('movies').search('', {'hitsPerPage': 15})
313321
search_parameter_guide_page_1: |-
314322
client.index('movies').search('', {'page': 2})
323+
search_parameter_guide_sort_1: |-
324+
client.index('books').search('science fiction', {
325+
'sort': ['price:asc']
326+
})
327+
search_parameter_guide_facet_stats_1: |-
328+
client.index('movie_ratings').search('Batman', {
329+
'facets': ['genres', 'rating']
330+
})
315331
typo_tolerance_guide_1: |-
316332
client.index('movies').update_typo_tolerance({
317333
'enabled': False
@@ -447,7 +463,7 @@ getting_started_faceting: |-
447463
client.index('movies').update_faceting_settings({'maxValuesPerFacet': 2})
448464
getting_started_pagination: |-
449465
client.index('movies').update_pagination_settings({'maxTotalHits': 500})
450-
faceted_search_update_settings_1: |-
466+
filtering_update_settings_1: |-
451467
client.index('movies').update_filterable_attributes([
452468
'director',
453469
'genres',
@@ -464,6 +480,36 @@ faceted_search_walkthrough_filter_1: |-
464480
client.index('movies').search('thriller', {
465481
'filter': [['genres = Horror', 'genres = Mystery'], 'director = "Jordan Peele"']
466482
})
483+
faceted_search_update_settings_1: |-
484+
client.index('books').update_filterable_attributes([
485+
'genres',
486+
'director',
487+
'language'
488+
])
489+
faceted_search_1: |-
490+
client.index('books').search('classic', {
491+
'facets': ['genres', 'rating', 'language']
492+
})
493+
faceted_search_2: |-
494+
client.multi_search(
495+
[
496+
{
497+
'indexUid': 'books',
498+
'facets': ['language', 'genres', 'author', 'format'],
499+
'filter': [['language = English', 'language = French'], ['genres = Fiction']]
500+
},
501+
{
502+
'indexUid': 'books',
503+
'facets': ['language'],
504+
'filter': [['genres = Fiction']]
505+
},
506+
{
507+
'indexUid': 'books',
508+
'facets': ['genres'],
509+
'filter': [['language = English', 'language = French']]
510+
},
511+
]
512+
)
467513
post_dump_1: |-
468514
client.create_dump()
469515
phrase_search_1: |-
@@ -522,6 +568,10 @@ geosearch_guide_sort_usage_2: |-
522568
client.index('restaurants').search('', {
523569
'sort': ['_geoPoint(48.8561446,2.2978204):asc', 'rating:desc']
524570
})
571+
geosearch_guide_filter_usage_3: |-
572+
client.index('restaurants').search('Batman', {
573+
'filter': '_geoBoundingBox([45.494181, 9.179175], [45.449484, 9.214024])'
574+
})
525575
primary_field_guide_update_document_primary_key: |-
526576
client.index('books').update(primary_key='title')
527577
primary_field_guide_create_index_primary_key: |-

0 commit comments

Comments
 (0)