Skip to content

Commit 3dcff57

Browse files
svitlosvitlokolchfa-aws
authored
Update fuzzy.md (opensearch-project#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 <tsplahtii@rolf.ru> * correct the line 17 of fuzzy.md to clarify the distance name and the role of the field 'transpositions' Signed-off-by: svitlo <tsplahtii@rolf.ru> * correct the line 17 to not break the thought regarding the usage of the field 'max_expansions' Signed-off-by: svitlo <tsplahtii@rolf.ru> * 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 <tsplahtii@rolf.ru> --------- Signed-off-by: Tim <2527559+svitlo@users.noreply.github.com> Signed-off-by: svitlo <tsplahtii@rolf.ru> Co-authored-by: svitlo <tsplahtii@rolf.ru> Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
1 parent da34229 commit 3dcff57

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

_query-dsl/term/fuzzy.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ nav_order: 20
77

88
# Fuzzy query
99

10-
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:
10+
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:
1111

1212
- Replacements: **c**at to **b**at
1313
- Insertions: cat to cat**s**
1414
- Deletions: **c**at to at
1515
- Transpositions: **ca**t to **ac**t
1616

17-
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.
17+
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).
1818

1919
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:
2020

@@ -90,4 +90,4 @@ Specifying a large value in `max_expansions` can lead to poor performance, espec
9090
{: .warning}
9191

9292
If [`search.allow_expensive_queries`]({{site.url}}{{site.baseurl}}/query-dsl/index/#expensive-queries) is set to `false`, fuzzy queries are not run.
93-
{: .important}
93+
{: .important}

0 commit comments

Comments
 (0)