From e997fb5547ac8953c4d6cc97909eebac6ff73e39 Mon Sep 17 00:00:00 2001 From: Laura Murphy-Clarkin Date: Fri, 8 Feb 2019 19:19:31 +0000 Subject: [PATCH] Add fuzziness example (#37194) The example in the Fuzziness section was actually relevant to the section above it, so I moved it there. I replaced it with an example of how to use the `fuzziness` parameter --- docs/reference/query-dsl/match-query.asciidoc | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/reference/query-dsl/match-query.asciidoc b/docs/reference/query-dsl/match-query.asciidoc index 867962e9f36b5..42d4ef2ae3338 100644 --- a/docs/reference/query-dsl/match-query.asciidoc +++ b/docs/reference/query-dsl/match-query.asciidoc @@ -32,6 +32,25 @@ optional `should` clauses to match can be set using the <> parameter. +Here is an example when providing additional parameters (note the slight +change in structure, `message` is the field name): + +[source,js] +-------------------------------------------------- +GET /_search +{ + "query": { + "match" : { + "message" : { + "query" : "this is a test", + "operator" : "and" + } + } + } +} +-------------------------------------------------- +// CONSOLE + The `analyzer` can be set to control which analyzer will perform the analysis process on the text. It defaults to the field explicit mapping definition, or the default search analyzer. @@ -56,9 +75,6 @@ rewritten. Fuzzy transpositions (`ab` -> `ba`) are allowed by default but can be disabled by setting `fuzzy_transpositions` to `false`. -Here is an example when providing additional parameters (note the slight -change in structure, `message` is the field name): - [source,js] -------------------------------------------------- GET /_search @@ -66,8 +82,8 @@ GET /_search "query": { "match" : { "message" : { - "query" : "this is a test", - "operator" : "and" + "query" : "this is a testt", + "fuzziness": "AUTO" } } }