From 8f72ae9230b911610f96f738de21d22f735ab7ef Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Wed, 23 May 2018 12:58:24 -0400 Subject: [PATCH 1/2] Update Fuzzy Query docs to clarify default behavior re max_expansions Stating that the Fuzzy Query generates "all possible" matching terms is misleading, given that the query's default behavior is to generate a maximum of 50 matching terms. Maybe it's worthwhile to use one of those Warning boxes somewhere towards the top of the page to clarify this? I suspect many users will read "generates all possible matching terms" and immediately begin using the query, expecting it to generate all possible terms by default (having done exactly that myself). --- docs/reference/query-dsl/fuzzy-query.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/query-dsl/fuzzy-query.asciidoc b/docs/reference/query-dsl/fuzzy-query.asciidoc index fd3d65324264f..1659a004995ff 100644 --- a/docs/reference/query-dsl/fuzzy-query.asciidoc +++ b/docs/reference/query-dsl/fuzzy-query.asciidoc @@ -5,7 +5,7 @@ The fuzzy query uses similarity based on Levenshtein edit distance. ==== String fields -The `fuzzy` query generates all possible matching terms that are within the +The `fuzzy` query generates matching terms that are within the maximum edit distance specified in `fuzziness` and then checks the term dictionary to find out which of those generated terms actually exist in the index. From 3b8c0ebfba4d9f89c8e588e95cca503cf646c520 Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Sun, 29 Jul 2018 23:36:17 -0400 Subject: [PATCH 2/2] Update fuzzy-query.asciidoc --- docs/reference/query-dsl/fuzzy-query.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/query-dsl/fuzzy-query.asciidoc b/docs/reference/query-dsl/fuzzy-query.asciidoc index 1659a004995ff..170e0a037cb4e 100644 --- a/docs/reference/query-dsl/fuzzy-query.asciidoc +++ b/docs/reference/query-dsl/fuzzy-query.asciidoc @@ -5,10 +5,10 @@ The fuzzy query uses similarity based on Levenshtein edit distance. ==== String fields -The `fuzzy` query generates matching terms that are within the +The `fuzzy` query generates matching terms that are within the maximum edit distance specified in `fuzziness` and then checks the term dictionary to find out which of those generated terms actually exist in the -index. +index. The final query uses up to `max_expansions` matching terms. Here is a simple example: