From 096756eb263ca99791887a2091204719b61ef888 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Jul 2024 21:20:42 +0000 Subject: [PATCH] Update fuzzy.md (#7842) * Update fuzzy.md Corrected the name of the string metric used by default Signed-off-by: Tim <2527559+svitlo@users.noreply.github.com> Signed-off-by: svitlo * correct the line 17 of fuzzy.md to clarify the distance name and the role of the field 'transpositions' Signed-off-by: svitlo * correct the line 17 to not break the thought regarding the usage of the field 'max_expansions' Signed-off-by: svitlo * Update _query-dsl/term/fuzzy.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Tim <2527559+svitlo@users.noreply.github.com> Signed-off-by: svitlo --------- Signed-off-by: Tim <2527559+svitlo@users.noreply.github.com> Signed-off-by: svitlo Co-authored-by: svitlo Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> (cherry picked from commit 3dcff57d359527f161fd8f8608c8d2f160322fef) Signed-off-by: github-actions[bot] --- _query-dsl/term/fuzzy.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_query-dsl/term/fuzzy.md b/_query-dsl/term/fuzzy.md index bf2bd43bba..7a426fd794 100644 --- a/_query-dsl/term/fuzzy.md +++ b/_query-dsl/term/fuzzy.md @@ -7,14 +7,14 @@ nav_order: 20 # Fuzzy query -A fuzzy query searches for documents containing terms that are similar to the search term within the maximum allowed [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance). The Levenshtein distance measures the number of one-character changes needed to change one term to another term. These changes include: +A fuzzy query searches for documents containing terms that are similar to the search term within the maximum allowed [Damerau–Levenshtein distance](https://en.wikipedia.org/wiki/Damerau–Levenshtein_distance). The Damerau–Levenshtein distance measures the number of one-character changes needed to change one term to another term. These changes include: - Replacements: **c**at to **b**at - Insertions: cat to cat**s** - Deletions: **c**at to at - Transpositions: **ca**t to **ac**t -A fuzzy query creates a list of all possible expansions of the search term that fall within the Levenshtein distance. You can specify the maximum number of such expansions in the `max_expansions` field. Then it searches for documents that match any of the expansions. +A fuzzy query creates a list of all possible expansions of the search term that fall within the Damerau-Levenshtein distance. You can specify the maximum number of such expansions in the `max_expansions` field. The query then searches for documents that match any of the expansions. If you set the `transpositions` parameter to `false`, then your search will use the classic [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance). The following example query searches for the speaker `HALET` (misspelled `HAMLET`). The maximum edit distance is not specified, so the default `AUTO` edit distance is used: @@ -90,4 +90,4 @@ Specifying a large value in `max_expansions` can lead to poor performance, espec {: .warning} If [`search.allow_expensive_queries`]({{site.url}}{{site.baseurl}}/query-dsl/index/#expensive-queries) is set to `false`, fuzzy queries are not run. -{: .important} \ No newline at end of file +{: .important}