Skip to content

Commit 6f18e5e

Browse files
committed
Remove useless code samples (not used by the docs anymore)
1 parent 9ce189d commit 6f18e5e

File tree

1 file changed

+13
-46
lines changed

1 file changed

+13
-46
lines changed

.code-samples.meilisearch.yaml

Lines changed: 13 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
---
66
synonyms_guide_1: |-
77
client.index('movies').updateSynonyms({
8-
"great": ["fantastic"],
9-
"fantastic": ["great"]
8+
'great': ['fantastic'],
9+
'fantastic': ['great']
1010
})
1111
date_guide_index_1: |-
1212
const games = require('./games.json')
@@ -35,8 +35,8 @@ delete_an_index_1: |-
3535
client.deleteIndex('movies')
3636
swap_indexes_1: |-
3737
client.swapIndexes([
38-
{ "indexes": ["indexA", "indexB"] },
39-
{ "indexes": ["indexX", "indexY"] }
38+
{ 'indexes': ['indexA', 'indexB'] },
39+
{ 'indexes': ['indexX', 'indexY'] }
4040
])
4141
get_one_document_1: |-
4242
client
@@ -106,18 +106,18 @@ async_guide_filter_by_date_1: |-
106106
client.getTasks({ afterEnqueuedAt: '2020-10-11T11:49:53.000Z' })
107107
async_guide_multiple_filters_1: |-
108108
client.getTasks({
109-
indexUids: ["movies"],
110-
types: ["documentAdditionOrUpdate","documentDeletion"],
111-
statuses: ["processing"]
109+
indexUids: ['movies'],
110+
types: ['documentAdditionOrUpdate','documentDeletion'],
111+
statuses: ['processing']
112112
})
113113
async_guide_filter_by_ids_1: |-
114114
client.getTasks({ uids: [5, 10, 13] })
115115
async_guide_filter_by_statuses_1: |-
116-
client.getTasks({ statuses: ["failed", "canceled"] })
116+
client.getTasks({ statuses: ['failed', 'canceled'] })
117117
async_guide_filter_by_types_1: |-
118-
client.getTasks({ types: ["dumpCreation", "indexSwap"] })
118+
client.getTasks({ types: ['dumpCreation', 'indexSwap'] })
119119
async_guide_filter_by_index_uids_1: |-
120-
client.getTasks({ indexUids: ["movies"] })
120+
client.getTasks({ indexUids: ['movies'] })
121121
get_all_tasks_paginating_1: |-
122122
client.getTasks({ limit: 2, from: 10 })
123123
get_all_tasks_paginating_2: |-
@@ -400,11 +400,6 @@ typo_tolerance_guide_4: |-
400400
add_movies_json_1: |-
401401
const movies = require('./movies.json')
402402
client.index('movies').addDocuments(movies).then((res) => console.log(res))
403-
documents_guide_add_movie_1: |-
404-
client.index('movies').addDocuments([{
405-
movie_id: '123sq178',
406-
title: 'Amelie Poulain'
407-
}])
408403
primary_field_guide_update_document_primary_key: |-
409404
client.updateIndex('books', {
410405
primaryKey: 'title'
@@ -492,9 +487,6 @@ getting_started_update_displayed_attributes: |-
492487
'overview',
493488
'poster'
494489
])
495-
getting_started_communicating_with_a_protected_instance: |-
496-
const client = new MeiliSearch('http://localhost:7700', 'apiKey')
497-
client.index('movies').search()
498490
getting_started_add_meteorites: |-
499491
const meteorites = require('./meteorites.json')
500492
@@ -517,7 +509,7 @@ getting_started_faceting: |-
517509
client.index('movies').updateFaceting({
518510
maxValuesPerFacet: 2,
519511
sortFacetValuesBy: {
520-
'*': "count"
512+
'*': 'count'
521513
}
522514
})
523515
getting_started_typo_tolerance: |-
@@ -529,7 +521,7 @@ getting_started_typo_tolerance: |-
529521
getting_started_filtering: |-
530522
client.index('meteorites').search('', { filter: 'mass < 200' })
531523
getting_started_pagination: |-
532-
client.index("movies").updatePagination({ maxTotalHits: 500 })
524+
client.index('movies').updatePagination({ maxTotalHits: 500 })
533525
get_filterable_attributes_1: |-
534526
client.index('movies').getFilterableAttributes()
535527
update_filterable_attributes_1: |-
@@ -546,11 +538,6 @@ filtering_update_settings_1: |-
546538
'director',
547539
'genres'
548540
])
549-
faceted_search_facets_1: |-
550-
client.index('movies')
551-
.search('Batman', {
552-
facets: ['genres']
553-
})
554541
faceted_search_walkthrough_filter_1: |-
555542
client.index('movies')
556543
.search('thriller', {
@@ -560,26 +547,6 @@ faceted_search_update_settings_1: |-
560547
client.index('movie_ratings').updateFilterableAttributes(['genres', 'rating', 'language'])
561548
faceted_search_1: |-
562549
client.index('books').search('classic', { facets: ['genres', 'rating', 'language'] })
563-
faceted_search_2: |-
564-
client.multiSearch({
565-
queries: [
566-
{
567-
indexUid: 'books',
568-
facets: ['language', 'genres', 'author', 'format'],
569-
filter: "(language = English AND language = French) OR genres = Fiction"
570-
},
571-
{
572-
indexUid: 'books',
573-
facets: ['language'],
574-
filter: 'genres = Fiction'
575-
},
576-
{
577-
indexUid: 'books',
578-
facets: ['genres'],
579-
filter: 'language = English OR language = French'
580-
}
581-
]
582-
})
583550
post_dump_1: |-
584551
client.createDump()
585552
phrase_search_1: |-
@@ -609,7 +576,7 @@ sorting_guide_sort_parameter_2: |-
609576
})
610577
sorting_guide_sort_nested_1: |-
611578
client.index('books').search('science fiction', {
612-
"sort": ["rating.users:asc"],
579+
'sort': ['rating.users:asc'],
613580
})
614581
get_sortable_attributes_1: |-
615582
client.index('books').getSortableAttributes()

0 commit comments

Comments
 (0)