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 for april 2023 #649

Merged
merged 1 commit into from
Sep 12, 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
17 changes: 6 additions & 11 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,13 @@ field_properties_guide_displayed_1: |-
client.index("movies").updateDisplayedAttributesSettings(attributes);
filtering_guide_1: |-
SearchRequest searchRequest = SearchRequest.builder().q("Avengers").filter(new String[] {"release_date > \"795484800\""}).build();
client.index("movies").search(searchRequest);
client.index("movie_ratings").search(searchRequest);
filtering_guide_2: |-
SearchRequest searchRequest = SearchRequest.builder().q("Batman").filter(new String[] {"release_date > 795484800 AND (director = \"Tim Burton\" OR director = \"Christopher Nolan\")"}).build();
client.index("movies").search(searchRequest);
client.index("movie_ratings").search(searchRequest);
filtering_guide_3: |-
SearchRequest searchRequest = SearchRequest.builder().q("Planet of the Apes").filter(new String[] {"rating >= 3 AND (NOT director = \"Tim Burton\")"}).build();
client.index("movies").search(searchRequest);
SearchRequest searchRequest = SearchRequest.builder().q("Planet of the Apes").filter(new String[] {"release_date > 1577884550 AND (NOT director = \"Tim Burton\")"}).build();
client.index("movie_ratings").search(searchRequest);
filtering_guide_nested_1: |-
SearchRequest searchRequest = SearchRequest.builder().q("thriller").filter(new String[] {"rating.users >= 90"}).build();
client.index("movie_ratings").search(searchRequest);
Expand Down Expand Up @@ -536,13 +536,8 @@ search_parameter_guide_facet_stats_1: |-
"rating"
}).build();
client.index("movies").search(searchRequest);
faceted_search_filter_1: |-
SearchRequest searchRequest = SearchRequest.builder().q("thriller").filterArray().build(new String[][] {
new String[] {"genres = Horror", "genres = Mystery"},
new String[] {"director = \"Jordan Peele\""}}).build();
client.index("movies").search(searchRequest);
faceted_search_update_settings_1:
client.index("books").updateFilterableAttributesSettings(new String[]
client.index("movie_ratings").updateFilterableAttributesSettings(new String[]
{
"genres",
"director",
Expand Down Expand Up @@ -639,7 +634,7 @@ geosearch_guide_sort_usage_2: |-
client.index("restaurants").search(searchRequest);
geosearch_guide_filter_usage_3: |-
SearchRequest searchRequest = SearchRequest.builder().q()("").filter(new String[] {
"_geoBoundingBox([45.494181, 9.179175], [45.449484, 9.214024])"
"_geoBoundingBox([45.494181, 9.214024], [45.449484, 9.179175])"
}).build();
client.index("restaurants").search(searchRequest);
primary_field_guide_update_document_primary_key: |-
Expand Down