Skip to content

Commit

Permalink
Add fuzziness example (#37194) (#38648)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mayya-sharipova committed Feb 8, 2019
1 parent 4504206 commit 479c0c7
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions docs/reference/query-dsl/match-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@ optional `should` clauses to match can be set using the
<<query-dsl-minimum-should-match,`minimum_should_match`>>
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.
Expand All @@ -56,18 +75,15 @@ 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
{
"query": {
"match" : {
"message" : {
"query" : "this is a test",
"operator" : "and"
"query" : "this is a testt",
"fuzziness": "AUTO"
}
}
}
Expand Down

0 comments on commit 479c0c7

Please sign in to comment.