From db015f413886dab79279236a664883d6b2dfa3fe Mon Sep 17 00:00:00 2001 From: Maryam Date: Thu, 15 Jun 2023 19:56:58 +0400 Subject: [PATCH 1/8] fine-tuning-search section --- learn/fine_tuning_results/faceted_search.mdx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/learn/fine_tuning_results/faceted_search.mdx b/learn/fine_tuning_results/faceted_search.mdx index 68fe49e31d..f47eb21142 100644 --- a/learn/fine_tuning_results/faceted_search.mdx +++ b/learn/fine_tuning_results/faceted_search.mdx @@ -116,22 +116,16 @@ The following response shows the facet distribution when searching for `classics } ``` -`facetDistribution` contains an object for every attribute passed to the `facets` parameter. Each object contains the different values for that attribute and the count of matching documents with that value. Meilisearch does not return empty facets: if there are no results for the Arabic language, it will not be present in `facetDistribution`. +`facetDistribution` contains an object for every attribute passed to the `facets` parameter. Each object contains different values for that attribute and the count of matching documents with that value. Meilisearch does not return empty facets: if there are no results for the Arabic language, it will not be present in `facetDistribution`. - By default, `facets` returns a maximum of 100 facet values for each faceted field. You can change this value using the `maxValuesPerFacet` property of the [`faceting` index settings](/reference/api/settings#faceting). - ### Facet stats -When using the `facets` parameter, Meilisearch results include a `facetStats` object. `facetStats` contains the lowest (`min`) and highest (`max`) numerical values across all documents in each facet. +When using the `facets` parameter, Meilisearch results include a `facetStats` object. `facetStats` contains the lowest (`min`) and highest (`max`) numerical values across all documents in each facet. Meilisearch ignores numeric strings like `"21"` when computing `facetStats`. `facetStats` is useful when creating UI components such as range sliders. These allow users to refine their search by selecting from a range of facet values. - -Meilisearch ignores numeric strings like `"21"` when computing `facetStats`. - - The following response shows the lowest and highest book ratings when searching for `"classic"`: ```json From 9c08d07b52e2a6a0d6dfdf3bead2ed14f8b62d68 Mon Sep 17 00:00:00 2001 From: Maryam Date: Thu, 15 Jun 2023 19:59:51 +0400 Subject: [PATCH 2/8] index settings section --- learn/index_settings/distinct.mdx | 2 +- learn/index_settings/synonyms.mdx | 7 +------ learn/index_settings/typo_tolerance.mdx | 6 +----- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/learn/index_settings/distinct.mdx b/learn/index_settings/distinct.mdx index 036c2db422..ea60d00506 100644 --- a/learn/index_settings/distinct.mdx +++ b/learn/index_settings/distinct.mdx @@ -2,7 +2,7 @@ The distinct attribute is a special, user-designated field. It is most commonly used to prevent Meilisearch from returning a set of several similar documents, instead forcing it to return only one. - + There can be only one `distinctAttribute` per index. Trying to set multiple fields as a `distinctAttribute` will return an error. diff --git a/learn/index_settings/synonyms.mdx b/learn/index_settings/synonyms.mdx index ddfa12626e..be1621c6d2 100644 --- a/learn/index_settings/synonyms.mdx +++ b/learn/index_settings/synonyms.mdx @@ -98,17 +98,12 @@ To create a mutual association between four words, this is the JSON syntax that ## Multi-word synonyms -Meilisearch treats multi-word synonyms as [phrases](/reference/api/search#phrase-search-2). +Meilisearch treats multi-word synonyms as [phrases](/reference/api/search#phrase-search-2). Multi-word synonyms are limited to a maximum of **three words**. For example, although you could make `League of Legends` and `LOL` into synonyms, you could not do the same for `The Lord of the Rings` and `LOTR`. Take note that **multi-word phrases are treated differently** than associations between individual words. When a multi-word phrase is considered the synonym of another word or phrase, the **exact search query will always take precedence over its synonym(s)**. - -Multi-word synonyms are limited to a maximum of **three words**. -For example, although you could make `League of Legends` and `LOL` into synonyms, you could not do the same for `The Lord of the Rings` and `LOTR`. - - #### Example Suppose you set `San Francisco` and `SF` as synonyms with a [mutual association](#mutual-association) diff --git a/learn/index_settings/typo_tolerance.mdx b/learn/index_settings/typo_tolerance.mdx index 85a32b3c1c..b6f666888d 100644 --- a/learn/index_settings/typo_tolerance.mdx +++ b/learn/index_settings/typo_tolerance.mdx @@ -45,16 +45,12 @@ For more about typo calculations, [see below](#understanding-typo-calculations). ### `disableOnWords` -You can disable typo tolerance for a list of query terms by adding them to `disableOnWords`. +You can disable typo tolerance for a list of query terms by adding them to `disableOnWords`. `disableOnWords` is case insensitive. Meilisearch won't apply typo tolerance on the query term `Shrek` or `shrek` at search time to match documents. - -`disableOnWords` is case insensitive. - - ### `disableOnAttributes` You can disable typo tolerance for a specific [document attribute](/learn/core_concepts/documents) by adding it to `disableOnAttributes`. The code sample below disables typo tolerance for `title`: From a251fbd442f654e0fbba7c296369b1152cd85140 Mon Sep 17 00:00:00 2001 From: Maryam Date: Thu, 15 Jun 2023 20:06:27 +0400 Subject: [PATCH 3/8] inner workings --- learn/inner_workings/prefix.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/learn/inner_workings/prefix.mdx b/learn/inner_workings/prefix.mdx index 10cc46043c..e7c37f5e0b 100644 --- a/learn/inner_workings/prefix.mdx +++ b/learn/inner_workings/prefix.mdx @@ -6,11 +6,9 @@ Prefix search is when document sorting starts by comparing the search query agai In other words, prefix search means that it's not necessary to type a word in its entirety to find documents containing that word—you can just type the first one or two letters. -Note that prefix search is only performed on the last word in a search query—prior words must be typed out fully in order to get accurate results. +Note that prefix search is only performed on the last word in a search query—prior words must be typed out fully to get accurate results. - Searching by prefix (rather than using complete words) has a significant impact on search time. The shorter the query term, the more possible matches in the dataset. - ### Example From 80680afb957089c54be63bb79eb27e11be85f21e Mon Sep 17 00:00:00 2001 From: Maryam Date: Thu, 15 Jun 2023 20:07:48 +0400 Subject: [PATCH 4/8] security --- learn/security/tenant_tokens.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learn/security/tenant_tokens.mdx b/learn/security/tenant_tokens.mdx index ad7ec73610..4073e08481 100644 --- a/learn/security/tenant_tokens.mdx +++ b/learn/security/tenant_tokens.mdx @@ -234,7 +234,7 @@ For security reasons, we strongly recommend you avoid exposing the API key whene When using an official Meilisearch SDK, you may indicate which API key you wish to use when generating a token. Consult the documentation of the SDK you are using for more specific instructions. - + If an API key expires, any tenant tokens created with it will become invalid. The same applies if the API key is deleted or regenerated due to a changed master key. From 948515927daab7500b1fae2a77b06f00944ca507 Mon Sep 17 00:00:00 2001 From: Maryam Date: Thu, 15 Jun 2023 20:12:48 +0400 Subject: [PATCH 5/8] postman --- learn/cookbooks/postman_collection.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/learn/cookbooks/postman_collection.mdx b/learn/cookbooks/postman_collection.mdx index 13a8e702b6..8e9fce5dd4 100644 --- a/learn/cookbooks/postman_collection.mdx +++ b/learn/cookbooks/postman_collection.mdx @@ -4,9 +4,7 @@ Are you tired of using the `curl` command in your terminal to test Meilisearch? Postman is a platform that lets you create HTTP requests you can easily reuse and share with everyone. We provide a Postman collection containing all the routes of the Meilisearch API! 🚀 - If you don't have Postman already, you can [download it here](https://www.postman.com/downloads/). It's free and available on many OS distributions. - ## Import the collection From 50c15d387453b47d590a5669281ecacec36908bc Mon Sep 17 00:00:00 2001 From: Maryam <90181761+maryamsulemani97@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:21:24 +0400 Subject: [PATCH 6/8] Apply suggestions from code review Co-authored-by: gui machiavelli --- learn/fine_tuning_results/faceted_search.mdx | 2 +- learn/inner_workings/prefix.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/learn/fine_tuning_results/faceted_search.mdx b/learn/fine_tuning_results/faceted_search.mdx index f47eb21142..60508a44ef 100644 --- a/learn/fine_tuning_results/faceted_search.mdx +++ b/learn/fine_tuning_results/faceted_search.mdx @@ -116,7 +116,7 @@ The following response shows the facet distribution when searching for `classics } ``` -`facetDistribution` contains an object for every attribute passed to the `facets` parameter. Each object contains different values for that attribute and the count of matching documents with that value. Meilisearch does not return empty facets: if there are no results for the Arabic language, it will not be present in `facetDistribution`. +`facetDistribution` contains an object for every attribute passed to the `facets` parameter. Each object contains the returned values for that attribute and the count of matching documents with that value. Meilisearch does not return empty facets: if there are no results for the Arabic language, it will not be present in `facetDistribution`. By default, `facets` returns a maximum of 100 facet values for each faceted field. You can change this value using the `maxValuesPerFacet` property of the [`faceting` index settings](/reference/api/settings#faceting). diff --git a/learn/inner_workings/prefix.mdx b/learn/inner_workings/prefix.mdx index e7c37f5e0b..db59901828 100644 --- a/learn/inner_workings/prefix.mdx +++ b/learn/inner_workings/prefix.mdx @@ -6,7 +6,7 @@ Prefix search is when document sorting starts by comparing the search query agai In other words, prefix search means that it's not necessary to type a word in its entirety to find documents containing that word—you can just type the first one or two letters. -Note that prefix search is only performed on the last word in a search query—prior words must be typed out fully to get accurate results. +Prefix search is only performed on the last word in a search query—prior words must be typed out fully to get accurate results. Searching by prefix (rather than using complete words) has a significant impact on search time. The shorter the query term, the more possible matches in the dataset. From a064d7caa514c81fdbd5e81b0d44cbfc31a19c3e Mon Sep 17 00:00:00 2001 From: Maryam Date: Wed, 12 Jul 2023 15:17:21 +0400 Subject: [PATCH 7/8] update based on review --- learn/fine_tuning_results/faceted_search.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/learn/fine_tuning_results/faceted_search.mdx b/learn/fine_tuning_results/faceted_search.mdx index 60508a44ef..d176eb4366 100644 --- a/learn/fine_tuning_results/faceted_search.mdx +++ b/learn/fine_tuning_results/faceted_search.mdx @@ -118,7 +118,9 @@ The following response shows the facet distribution when searching for `classics `facetDistribution` contains an object for every attribute passed to the `facets` parameter. Each object contains the returned values for that attribute and the count of matching documents with that value. Meilisearch does not return empty facets: if there are no results for the Arabic language, it will not be present in `facetDistribution`. + By default, `facets` returns a maximum of 100 facet values for each faceted field. You can change this value using the `maxValuesPerFacet` property of the [`faceting` index settings](/reference/api/settings#faceting). + ### Facet stats From dd22e7413019c663dd6111175f1c3299730bcf74 Mon Sep 17 00:00:00 2001 From: Maryam <90181761+maryamsulemani97@users.noreply.github.com> Date: Wed, 12 Jul 2023 15:18:00 +0400 Subject: [PATCH 8/8] Apply suggestions from code review Co-authored-by: Tommy <68053732+dichotommy@users.noreply.github.com> --- learn/fine_tuning_results/faceted_search.mdx | 2 +- learn/index_settings/synonyms.mdx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/learn/fine_tuning_results/faceted_search.mdx b/learn/fine_tuning_results/faceted_search.mdx index d176eb4366..77e5f6339e 100644 --- a/learn/fine_tuning_results/faceted_search.mdx +++ b/learn/fine_tuning_results/faceted_search.mdx @@ -124,7 +124,7 @@ By default, `facets` returns a maximum of 100 facet values for each faceted fiel ### Facet stats -When using the `facets` parameter, Meilisearch results include a `facetStats` object. `facetStats` contains the lowest (`min`) and highest (`max`) numerical values across all documents in each facet. Meilisearch ignores numeric strings like `"21"` when computing `facetStats`. +When using the `facets` parameter, search results include a `facetStats` object. `facetStats` contains the lowest (`min`) and highest (`max`) numerical values across all documents in each facet. Only numeric values are considered; string values are ignored, even if the string contains a number. `facetStats` is useful when creating UI components such as range sliders. These allow users to refine their search by selecting from a range of facet values. diff --git a/learn/index_settings/synonyms.mdx b/learn/index_settings/synonyms.mdx index be1621c6d2..2d654b8e02 100644 --- a/learn/index_settings/synonyms.mdx +++ b/learn/index_settings/synonyms.mdx @@ -98,11 +98,12 @@ To create a mutual association between four words, this is the JSON syntax that ## Multi-word synonyms -Meilisearch treats multi-word synonyms as [phrases](/reference/api/search#phrase-search-2). Multi-word synonyms are limited to a maximum of **three words**. For example, although you could make `League of Legends` and `LOL` into synonyms, you could not do the same for `The Lord of the Rings` and `LOTR`. +Multi-word synonyms follow a different set of rules than single-word synonyms: -Take note that **multi-word phrases are treated differently** than associations between individual words. +- When a multi-word phrase is set as a synonym, **the exact search query will always take precedence over its multi-word synonym(s)** +- Meilisearch treats multi-word synonyms as [phrases](/reference/api/search#phrase-search-2) +- Multi-word synonyms are limited to a maximum of three words -When a multi-word phrase is considered the synonym of another word or phrase, the **exact search query will always take precedence over its synonym(s)**. #### Example