Skip to content

Commit e997fb5

Browse files
laurmurclarmayya-sharipova
authored andcommitted
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
1 parent c8ce7b7 commit e997fb5

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

docs/reference/query-dsl/match-query.asciidoc

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,25 @@ optional `should` clauses to match can be set using the
3232
<<query-dsl-minimum-should-match,`minimum_should_match`>>
3333
parameter.
3434

35+
Here is an example when providing additional parameters (note the slight
36+
change in structure, `message` is the field name):
37+
38+
[source,js]
39+
--------------------------------------------------
40+
GET /_search
41+
{
42+
"query": {
43+
"match" : {
44+
"message" : {
45+
"query" : "this is a test",
46+
"operator" : "and"
47+
}
48+
}
49+
}
50+
}
51+
--------------------------------------------------
52+
// CONSOLE
53+
3554
The `analyzer` can be set to control which analyzer will perform the
3655
analysis process on the text. It defaults to the field explicit mapping
3756
definition, or the default search analyzer.
@@ -56,18 +75,15 @@ rewritten.
5675
Fuzzy transpositions (`ab` -> `ba`) are allowed by default but can be disabled
5776
by setting `fuzzy_transpositions` to `false`.
5877

59-
Here is an example when providing additional parameters (note the slight
60-
change in structure, `message` is the field name):
61-
6278
[source,js]
6379
--------------------------------------------------
6480
GET /_search
6581
{
6682
"query": {
6783
"match" : {
6884
"message" : {
69-
"query" : "this is a test",
70-
"operator" : "and"
85+
"query" : "this is a testt",
86+
"fuzziness": "AUTO"
7187
}
7288
}
7389
}

0 commit comments

Comments
 (0)