You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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>
Copy file name to clipboardexpand all lines: _query-dsl/term/fuzzy.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,14 @@ nav_order: 20
7
7
8
8
# Fuzzy query
9
9
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:
11
11
12
12
- Replacements: **c**at to **b**at
13
13
- Insertions: cat to cat**s**
14
14
- Deletions: **c**at to at
15
15
- Transpositions: **ca**t to **ac**t
16
16
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).
18
18
19
19
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:
20
20
@@ -90,4 +90,4 @@ Specifying a large value in `max_expansions` can lead to poor performance, espec
90
90
{: .warning}
91
91
92
92
If [`search.allow_expensive_queries`]({{site.url}}{{site.baseurl}}/query-dsl/index/#expensive-queries) is set to `false`, fuzzy queries are not run.
0 commit comments