Skip to content

Commit

Permalink
Update settings code-sample for v0.28.0 (#1293)
Browse files Browse the repository at this point in the history
* Update settings code-sample for v0.28.0

* Add additional code-samples of settings sub-routes
  • Loading branch information
bidoubiwa authored Jul 6, 2022
1 parent 407f800 commit 5752e0d
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
# the documentation on build
# You can read more on https://github.com/meilisearch/documentation/tree/master/.vuepress/code-samples
---
get_pagination_settings_1: |-
update_pagination_settings_1: |-
reset_pagination_settings_1: |-
get_faceting_settings_1: |-
update_faceting_settings_1: |-
reset_faceting_settings_1: |-
settings_guide_faceting_1: |-
settings_guide_pagination_1: |-
get_one_index_1: |-
client.index('movies').getRawInfo()
list_all_indexes_1: |-
Expand Down Expand Up @@ -82,7 +73,7 @@ delete_a_key_1: |-
client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d')
get_settings_1: |-
client.index('movies').getSettings()
PLEASE_UPDATE_ME>>>>>>>>>>>>>update_settings_1: |-
update_settings_1: |-
client.index('movies').updateSettings({
rankingRules: [
'words',
Expand Down Expand Up @@ -127,6 +118,12 @@ PLEASE_UPDATE_ME>>>>>>>>>>>>>update_settings_1: |-
'disableOnAttributes': [
'title'
]
},
pagination: {
maxTotalHits: 5000
},
faceting: {
maxValuesPerFacet: 200
}
})
reset_settings_1: |-
Expand Down Expand Up @@ -546,6 +543,18 @@ update_sortable_attributes_1: |-
])
reset_sortable_attributes_1: |-
client.index('books').resetSortableAttributes()
get_pagination_settings_1: |-
update_pagination_settings_1: |-
client.index('books').updateSettings({ pagination: { maxTotalHits: 100 }})
reset_pagination_settings_1: |-
get_faceting_settings_1: |-
update_faceting_settings_1: |-
client.index('books').updateSettings({ faceting: { maxValuesPerFacet: 2 }})
reset_faceting_settings_1: |-
settings_guide_faceting_1: |-
client.index('books').updateSettings({ faceting: { maxValuesPerFacet: 5 }})
settings_guide_pagination_1: |-
client.index('books').updateSettings({ pagination: { maxTotalHits: 50 }})
search_parameter_guide_sort_1: |-
client.index('books').search('science fiction', {
sort: ['price:asc'],
Expand Down

0 comments on commit 5752e0d

Please sign in to comment.