Skip to content

Commit a27a936

Browse files
committed
Apply code review suggestions
1 parent f049e97 commit a27a936

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.code-samples.meilisearch.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ get_one_index_1: |-
88
list_all_indexes_1: |-
99
client.indexes
1010
create_an_index_1: |-
11-
client.create_index('movies')
11+
client.create_index('movies', primary_key: 'id')
1212
document_guide_create_index_primary_key: |-
1313
client.create_index('movies', primary_key: 'reference_number')
1414
update_an_index_1: |-
@@ -20,15 +20,15 @@ get_one_document_1: |-
2020
get_documents_1: |-
2121
client.index('movies').documents(limit: 2)
2222
document_guide_add_document_primary_key: |-
23-
client.index('movies', primary_key: 'reference_number').add_documents([
23+
client.index('movies').add_documents([
2424
{
2525
reference_number: 287947,
2626
title: 'Shazam',
2727
poster: 'https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg',
2828
overview: 'A boy is given the ability to become an adult superhero in times of need with a single magic word.',
2929
release_date: '2019-03-23'
3030
}
31-
])
31+
], 'reference_number')
3232
add_or_replace_documents_1: |-
3333
client.index('movies').add_documents([
3434
{
@@ -466,9 +466,7 @@ getting_started_update_searchableAttributes: |-
466466
'title'
467467
])
468468
getting_started_update_stop_words: |-
469-
client.index('movies').update_searchable_attributes([
470-
'title'
471-
])
469+
client.index('movies').update_stop_words(['the'])
472470
getting_started_check_task_status_md: |-
473471
```rb
474472
client.index('movies').task(0)
@@ -488,7 +486,7 @@ getting_started_communicating_with_a_protected_instance: |-
488486
client = MeiliSearch::Client.new('http://127.0.0.1:7700', 'apiKey')
489487
client.index('movies').search
490488
getting_started_add_meteorites: |-
491-
file = File.read("meteorites.json")
489+
file = File.read('meteorites.json')
492490
json = JSON.parse(file)
493491
494492
client.index('meteorites').add_documents(json)

0 commit comments

Comments
 (0)