Skip to content

Commit 0b90dfd

Browse files
meili-bors[bot]meili-botbrunoocasali
authored
Merge #409
409: Update code-samples r=brunoocasali a=meili-bot _This PR is auto-generated._ Update the code-samples.meilisearch.yml according to the [integration-guides issue](meilisearch/integration-guides#216) for more information and the complete description about what should be done here check that issue. :warning: Check the global issue before implementing the code-samples. The issue may have changed since the last time. Co-authored-by: meili-bot <[email protected]> Co-authored-by: Bruno Casali <[email protected]>
2 parents a009c02 + 3f28cfa commit 0b90dfd

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

.code-samples.meilisearch.yaml

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,56 @@
33
# the documentation on build
44
# You can read more on https://github.com/meilisearch/documentation/tree/master/.vuepress/code-samples
55
---
6+
getting_started_faceting: |-
7+
client.index('movies').update_faceting(max_values_per_facet: 2)
8+
getting_started_pagination: |-
9+
client.index('movies').update_pagination(max_total_hits: 500)
10+
synonyms_guide_1: |-
11+
client.index('movies').update_synonyms({
12+
great: ['fantastic'],
13+
fantastic: ['great']
14+
})
15+
date_guide_index_1: |-
16+
require 'json'
17+
18+
games = JSON.parse(File.read('games.json'))
19+
client.index('games').add_documents(games)
20+
date_guide_filterable_attributes_1: |-
21+
client.index('games').update_filterable_attributes(['release_timestamp'])
22+
date_guide_filter_1: |-
23+
client.index('games').search('', {
24+
filter: 'release_timestamp >= 1514761200 AND release_timestamp < 1672527600'
25+
})
26+
date_guide_sortable_attributes_1: |-
27+
client.index('games').update_sortable_attributes(['release_timestamp'])
28+
date_guide_sort_1: |-
29+
client.index('games').search('', sort: ['release_timestamp:desc'])
630
async_guide_filter_by_date_1: |-
731
client.get_tasks(after_enqueued_at: DateTime.new(2020, 10, 11, 11, 49, 53))
8-
932
async_guide_multiple_filters_1: |-
1033
client.get_tasks(index_uids: ['movies'], types: ['documentAdditionOrUpdate', 'documentDeletion'], statuses: ['processing'])
11-
1234
async_guide_filter_by_ids_1: |-
1335
client.get_tasks(uids: [5, 10, 13])
14-
1536
async_guide_filter_by_statuses_1: |-
1637
client.get_tasks(statuses: ['failed', 'canceled'])
17-
1838
async_guide_filter_by_types_1: |-
1939
client.get_tasks(types: ['dumpCreation', 'indexSwap'])
20-
2140
async_guide_filter_by_index_uids_1: |-
2241
client.get_tasks(index_uids: ['movies'])
23-
2442
delete_tasks_1: |-
2543
client.delete_tasks(uids: [1, 2])
26-
2744
cancel_tasks_1: |-
2845
client.cancel_tasks(uids: [1, 2])
29-
3046
async_guide_canceled_by_1: |-
3147
client.get_tasks(canceled_by: [9, 15])
32-
3348
swap_indexes_1: |-
3449
client.swap_indexes(['indexA', 'indexB'], ['indexX', 'indexY'])
35-
3650
search_parameter_guide_hitsperpage_1: |-
3751
client.index('movies').search('', hits_per_page: 15)
38-
3952
search_parameter_guide_page_1: |-
4053
client.index('movies').search('', page: 2)
41-
4254
getting_started_typo_tolerance: |-
4355
client.index('movies').update_typo_tolerance({ min_word_size_for_typos: { one_typo: 4 } })
44-
4556
get_all_tasks_paginating_1: |-
4657
client.tasks(limit: 2, from: 10)
4758
get_all_tasks_paginating_2: |-

0 commit comments

Comments
 (0)