Skip to content

Commit c9574f9

Browse files
Merge #1457
1457: Update code-samples request from Feb/23 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#246) 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 e488af7 + 61e5660 commit c9574f9

File tree

1 file changed

+21
-83
lines changed

1 file changed

+21
-83
lines changed

.code-samples.meilisearch.yaml

Lines changed: 21 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -254,24 +254,22 @@ get_health_1: |-
254254
get_version_1: |-
255255
client.getVersion()
256256
distinct_attribute_guide_1: |-
257-
client.index('jackets').updateSettings({ distinctAttribute: 'product_id' })
257+
client.index('jackets').updateDistinctAttribute('product_id')
258258
field_properties_guide_searchable_1: |-
259-
client.index('movies').updateSettings({
260-
searchableAttributes: [
261-
'title',
262-
'overview',
263-
'genres'
259+
client.index('movies').updateSearchableAttributes([
260+
'title',
261+
'overview',
262+
'genres',
264263
]
265-
})
264+
)
266265
field_properties_guide_displayed_1: |-
267-
client.index('movies').updateSettings({
268-
displayedAttributes: [
269-
'title',
270-
'overview',
271-
'genres',
272-
'release_date'
273-
]
274-
})
266+
client.index('movies').updateDisplayedAttributes([
267+
'title',
268+
'overview',
269+
'genres',
270+
'release_date',
271+
]
272+
)
275273
filtering_guide_1: |-
276274
client.index('movies').search('Avengers', {
277275
filter: 'release_date > 795484800'
@@ -284,6 +282,10 @@ filtering_guide_3: |-
284282
client.index('movies').search('Planet of the Apes', {
285283
filter: 'rating >= 3 AND (NOT director = "Tim Burton")'
286284
})
285+
filtering_guide_nested_1: |-
286+
client.index('movie_ratings').search('thriller', {
287+
filter: 'rating.users >= 90'
288+
})
287289
search_parameter_guide_query_1: |-
288290
client.index('movies').search('shifu')
289291
search_parameter_guide_offset_1: |-
@@ -338,70 +340,6 @@ search_parameter_guide_page_1: |-
338340
client.index('movies').search('', {
339341
"page": 2
340342
})
341-
settings_guide_synonyms_1: |-
342-
client.index('tops').updateSettings({
343-
synonyms: {
344-
sweater: ['jumper'],
345-
jumper: ['sweater']
346-
})
347-
settings_guide_stop_words_1: |-
348-
client.index('movies').updateSettings({
349-
stopWords: [
350-
'the',
351-
'a',
352-
'an'
353-
]
354-
})
355-
settings_guide_ranking_rules_1: |-
356-
client.index('movies').updateSettings({
357-
rankingRules: [
358-
'words',
359-
'typo',
360-
'proximity',
361-
'attribute',
362-
'sort',
363-
'exactness',
364-
'release_date:asc',
365-
'rank:desc'
366-
]
367-
})
368-
settings_guide_distinct_1: |-
369-
client.index('jackets').updateSettings({
370-
distinctAttribute: 'product_id'
371-
})
372-
settings_guide_searchable_1: |-
373-
client.index('movies').updateSettings({
374-
searchableAttributes: [
375-
'title',
376-
'overview',
377-
'genres'
378-
]
379-
})
380-
settings_guide_displayed_1: |-
381-
client.index('movies').updateSettings({
382-
displayedAttributes: [
383-
'title',
384-
'overview',
385-
'genres',
386-
'release_date',
387-
]
388-
})
389-
settings_guide_sortable_1: |-
390-
client.index('books').updateSettings({
391-
sortableAttributes: [
392-
'author',
393-
'price'
394-
]
395-
})
396-
settings_guide_typo_tolerance_1: |-
397-
client.index('movies').updateTypoTolerance({
398-
minWordSizeForTypos: {
399-
twoTypos: 12
400-
},
401-
disableOnAttributes: [
402-
'title'
403-
]
404-
})
405343
typo_tolerance_guide_1: |-
406344
client.index('movies').updateTypoTolerance({
407345
enabled: false
@@ -598,6 +536,10 @@ sorting_guide_sort_parameter_2: |-
598536
client.index('books').search('butler', {
599537
sort: ['author:desc'],
600538
})
539+
sorting_guide_sort_nested_1: |-
540+
client.index('books').search('science fiction', {
541+
"sort": ["rating.users:asc"],
542+
})
601543
get_sortable_attributes_1: |-
602544
client.index('books').getSortableAttributes()
603545
update_sortable_attributes_1: |-
@@ -620,10 +562,6 @@ update_faceting_settings_1: |-
620562
client.index('books').updateFaceting({ maxValuesPerFacet: 2 })
621563
reset_faceting_settings_1: |-
622564
client.index('books').resetFaceting()
623-
settings_guide_faceting_1: |-
624-
client.index('movies').updateSettings({ faceting: { maxValuesPerFacet: 5 }})
625-
settings_guide_pagination_1: |-
626-
client.index('movies').updateSettings({ pagination: { maxTotalHits: 50 }})
627565
search_parameter_guide_sort_1: |-
628566
client.index('books').search('science fiction', {
629567
sort: ['price:asc'],

0 commit comments

Comments
 (0)