Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update code-samples Apr/23 #1558

Merged
merged 3 commits into from
Aug 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,16 @@ field_properties_guide_displayed_1: |-
]
)
filtering_guide_1: |-
client.index('movies').search('Avengers', {
client.index('movie_ratings').search('Avengers', {
filter: 'release_date > 795484800'
})
filtering_guide_2: |-
client.index('movies').search('Batman', {
client.index('movie_ratings').search('Batman', {
filter: 'release_date > 795484800 AND (director = "Tim Burton" OR director = "Christopher Nolan")'
})
filtering_guide_3: |-
client.index('movies').search('Planet of the Apes', {
filter: 'rating >= 3 AND (NOT director = "Tim Burton")'
client.index('movie_ratings').search('Planet of the Apes', {
filter: "release_date > 1577884550 AND (NOT director = \"Tim Burton\")"
})
filtering_guide_nested_1: |-
client.index('movie_ratings').search('thriller', {
Expand Down Expand Up @@ -540,11 +540,6 @@ filtering_update_settings_1: |-
'director',
'genres'
])
faceted_search_filter_1: |-
client.index('movies')
.search('thriller', {
filter: [['genres = Horror', 'genres = Mystery'], 'director = "Jordan Peele"']
})
faceted_search_facets_1: |-
client.index('movies')
.search('Batman', {
Expand All @@ -556,25 +551,26 @@ faceted_search_walkthrough_filter_1: |-
filter: [['genres = Horror', 'genres = Mystery'], 'director = "Jordan Peele"']
})
faceted_search_update_settings_1: |-
client.index('books').updateFilterableAttributes(['genres', 'rating', 'language'])
client.index('movie_ratings').updateFilterableAttributes(['genres', 'rating', 'language'])
faceted_search_1: |-
client.index('books').search('classic', { facets: ['genres', 'rating', 'language'] })
faceted_search_2: |-
client.multiSearch({ queries: [
PLEASE_UPDATE_ME>>>>>>>>>>>>>faceted_search_2: |-
client.multiSearch({
queries: [
{
indexUid: 'books',
facets: ['language', 'genres', 'author', 'format'],
filter: [['language = English', 'language = French'], ['genres = Fiction']]
filter: "(language = English AND language = French) OR genres = Fiction"
},
{
indexUid: 'books',
facets: ['language'],
filter: [['genres = Fiction']]
filter: 'genres = Fiction'
},
{
indexUid: 'books',
facets: ['genres'],
filter: [['language = English', 'language = French']]
filter: 'language = English OR language = French'
}
]
})
Expand Down Expand Up @@ -658,7 +654,7 @@ geosearch_guide_filter_usage_2: |-
})
geosearch_guide_filter_usage_3: |-
client.index('restaurants').search('', {
filter: ['_geoBoundingBox([45.494181, 9.179175], [45.449484, 9.214024])'],
filter: ['_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])'],
})
geosearch_guide_sort_settings_1: |-
client.index('restaurants').updateSortableAttributes([
Expand Down