Skip to content

Commit 2fc2902

Browse files
Merge #428
428: Update code-samples for Meilisearch v1.1.0 r=bidoubiwa 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]>
2 parents cd0e9c6 + daae419 commit 2fc2902

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

.code-samples.meilisearch.yaml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ add_movies_json_1: |-
389389
client.index('movies').add_documents(movies)
390390
documents_guide_add_movie_1: |-
391391
client.index('movies').add_documents([{
392-
"movie_id": "123sq178",
393-
"title": "Amelie Poulain"
392+
movie_id: '123sq178',
393+
title: 'Amelie Poulain'
394394
}])
395395
getting_started_add_documents_md: |-
396396
```bash
@@ -416,11 +416,33 @@ getting_started_search_md: |-
416416
```
417417
418418
[About this SDK](https://www.github.com/meilisearch/meilisearch-ruby)
419-
faceted_search_update_settings_1: |-
419+
filtering_update_settings_1: |-
420420
client.index('movies').update_filterable_attributes([
421421
'director',
422422
'genres'
423423
])
424+
faceted_search_1: |-
425+
client.index('books').search('classic', {
426+
facets: ['genres', 'rating', 'language']
427+
})
428+
faceted_search_2: |-
429+
client.multi_search([
430+
{
431+
indexUid: 'books',
432+
facets: ['language', 'genres', 'author', 'format'],
433+
filter: [['language = English', 'language = French'], ['genres = Fiction']]
434+
},
435+
{
436+
indexUid: 'books',
437+
facets: ['language'],
438+
filter: [['genres = Fiction']]
439+
},
440+
{
441+
indexUid: 'books',
442+
facets: ['genres'],
443+
filter: [['language = English', 'language = French']]
444+
}
445+
])
424446
faceted_search_filter_1: |-
425447
client.index('movies').search('thriller', {
426448
filter: [['genres = Horror', 'genres = Mystery'], 'director = "Jordan Peele"']
@@ -431,6 +453,8 @@ faceted_search_walkthrough_filter_1: |-
431453
client.index('movies').search('thriller', {
432454
filter: [['genres = Horror', 'genres = Mystery'], 'director = "Jordan Peele"']
433455
})
456+
faceted_search_update_settings_1: |-
457+
client.index('books').update_filterable_attributes(['genres', 'rating', 'language'])
434458
post_dump_1: |-
435459
client.create_dump
436460
phrase_search_1: |-
@@ -467,6 +491,8 @@ geosearch_guide_filter_usage_1: |-
467491
client.index('restaurants').search('', { filter: '_geoRadius(45.472735, 9.184019, 2000)' })
468492
geosearch_guide_filter_usage_2: |-
469493
client.index('restaurants').search('', { filter: '_geoRadius(45.472735, 9.184019, 2000) AND type = pizza' })
494+
geosearch_guide_filter_usage_3: |-
495+
client.index('restaurants').search('', { filter: ['_geoBoundingBox([45.494181, 9.179175], [45.449484, 9.214024])'] })
470496
geosearch_guide_sort_settings_1: |-
471497
client.index('restaurants').update_sortable_attributes(['_geo'])
472498
geosearch_guide_sort_usage_1: |-
@@ -629,3 +655,10 @@ settings_guide_typo_tolerance_1: |-
629655
},
630656
disable_on_attributes: ['title']
631657
})
658+
multi_search_1: |-
659+
client.multi_search([
660+
{ index_uid: 'books', q: 'prince' },
661+
{ index_uid: 'movies', q: 'pooh', limit: 5 }
662+
{ index_uid: 'movies', q: 'nemo', limit: 5 }
663+
{ index_uid: 'movie_ratings', q: 'us' }
664+
])

0 commit comments

Comments
 (0)