From 8a33fa6094503b011b6b044ee043ea058d6e11b3 Mon Sep 17 00:00:00 2001 From: meili-bot <74670311+meili-bot@users.noreply.github.com> Date: Wed, 29 Sep 2021 19:34:23 +0200 Subject: [PATCH 1/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 71dd2c8c..5620279a 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ JSON output: ## 🤖 Compatibility with MeiliSearch -This package only guarantees the compatibility with the [version v0.22.0 of MeiliSearch](https://github.com/meilisearch/MeiliSearch/releases/tag/v0.22.0). +This package only guarantees the compatibility with the [version v0.23.0 of MeiliSearch](https://github.com/meilisearch/MeiliSearch/releases/tag/v0.23.0). ## 💡 Learn More From 1aac34f6a924ae0fb9e2eb684f565723d7a9e3d7 Mon Sep 17 00:00:00 2001 From: alallema Date: Mon, 11 Oct 2021 11:55:58 +0200 Subject: [PATCH 2/3] Add code-sample for v0.23.0 --- .code-samples.meilisearch.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.code-samples.meilisearch.yaml b/.code-samples.meilisearch.yaml index 11db4a9d..6bf0b128 100644 --- a/.code-samples.meilisearch.yaml +++ b/.code-samples.meilisearch.yaml @@ -459,3 +459,34 @@ search_parameter_guide_sort_1: |- "price:asc", }, }) +geosearch_guide_filter_settings_1: |- + filterableAttributes := []string{ + "_geo", + } + client.Index("restaurants").UpdateFilterableAttributes(&filterableAttributes) +geosearch_guide_filter_usage_1: |- + resp, err := client.Index("restaurants").Search("", &meilisearch.SearchRequest{ + Filter: "_geoRadius(45.4628328, 9.1076931, 2000)", + }) +geosearch_guide_filter_usage_2: |- + resp, err := client.Index("restaurants").Search("", &meilisearch.SearchRequest{ + Filter: "_geoRadius(45.4628328, 9.1076931, 2000) AND type = pizza", + }) +geosearch_guide_sort_settings_1: |- + sortableAttributes := []string{ + "_geo", + } + client.Index("restaurants").UpdateSortableAttributes(&sortableAttributes) +geosearch_guide_sort_usage_1: |- + resp, err := client.Index("restaurants").Search("", &meilisearch.SearchRequest{ + Sort: []string{ + "_geoPoint(48.8583701,2.2922926):asc", + }, + }) +geosearch_guide_sort_usage_2: |- + resp, err := client.Index("restaurants").Search("", &meilisearch.SearchRequest{ + Sort: []string{ + "_geoPoint(48.8583701,2.2922926):asc", + "rating:desc", + }, + }) From 9bdf89984ec22f4923712f918b5326958e23ff80 Mon Sep 17 00:00:00 2001 From: alallema Date: Mon, 11 Oct 2021 18:28:05 +0200 Subject: [PATCH 3/3] Fix code sample --- .code-samples.meilisearch.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.code-samples.meilisearch.yaml b/.code-samples.meilisearch.yaml index 6bf0b128..ae5b8b61 100644 --- a/.code-samples.meilisearch.yaml +++ b/.code-samples.meilisearch.yaml @@ -13,7 +13,7 @@ create_an_index_1: |- PrimaryKey: "movie_id", }) update_an_index_1: |- - client.Index("movies").UpdateIndex("movie_review_id") + client.Index("movie_review").UpdateIndex("movie_review_id") delete_an_index_1: |- client.DeleteIndex("movies") // OR @@ -231,7 +231,7 @@ filtering_guide_3: |- }) filtering_guide_4: |- resp, err := client.Index("movies").Search("Planet of the Apes", &meilisearch.SearchRequest{ - Filter: "rating >= 3 AND (NOT director = \"Tim Burton\"", + Filter: "rating >= 3 AND (NOT director = \"Tim Burton\")", }) search_parameter_guide_query_1: |- resp, err := client.Index("movies").Search("shifu", &meilisearch.SearchRequest{})