From a5f6ab7b02dc14689361eb9aab8abf83d0f3a4e0 Mon Sep 17 00:00:00 2001 From: alallema Date: Wed, 6 Oct 2021 14:55:26 +0200 Subject: [PATCH 1/2] Update code sample --- .code-samples.meilisearch.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.code-samples.meilisearch.yaml b/.code-samples.meilisearch.yaml index 059494ec..2e924f2d 100644 --- a/.code-samples.meilisearch.yaml +++ b/.code-samples.meilisearch.yaml @@ -392,3 +392,28 @@ search_parameter_guide_sort_1: |- client.index('books').search('science fiction', { 'sort': ['price:asc'] }) +geosearch_guide_filter_settings_1: |- + client.index('restaurants').update_filterable_attributes([ + '_geo' + ]) +geosearch_guide_filter_usage_1: |- + client.index('restaurants').search('', { + 'filter': '_geoRadius(45.4628328, 9.1076931, 2000)' + }) +geosearch_guide_filter_usage_2: |- + client.index('restaurants').search('', { + 'filter': '_geoRadius(45.4628328, 9.1076931, 2000) AND type = pizza' + }) +geosearch_guide_sort_settings_1: |- + client.index('restaurants').update_sortable_attributes([ + '_geo' + ]) +geosearch_guide_sort_usage_1: |- + client.index('restaurants').search('', { + 'sort': ['_geoPoint(48.8583701,2.2922926):asc'] + }) +geosearch_guide_sort_usage_2: |- + client.index('restaurants').search('', { + 'sort': ['_geoPoint(48.8583701,2.2922926):asc', 'rating:desc'] + }) + From 104b7cf1f8588b79c51659af2fb62633d7522dd4 Mon Sep 17 00:00:00 2001 From: alallema Date: Fri, 8 Oct 2021 00:15:11 +0200 Subject: [PATCH 2/2] Remove extra line --- .code-samples.meilisearch.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.code-samples.meilisearch.yaml b/.code-samples.meilisearch.yaml index 2e924f2d..aebb3773 100644 --- a/.code-samples.meilisearch.yaml +++ b/.code-samples.meilisearch.yaml @@ -416,4 +416,3 @@ geosearch_guide_sort_usage_2: |- client.index('restaurants').search('', { 'sort': ['_geoPoint(48.8583701,2.2922926):asc', 'rating:desc'] }) -