Complete the code to perform a fuzzy match on the field "name" with the value "Jon".
{
"query": {
"fuzzy": {
"name": {
"value": "[1]"
}
}
}
}The fuzzy query requires the exact value to search fuzzily. Here, "Jon" is the intended search term.
Complete the code to set the fuzziness level to 2 in the fuzzy query.
{
"query": {
"fuzzy": {
"name": {
"value": "Jon",
"fuzziness": [1]
}
}
}
}The fuzziness level controls how many edits are allowed. Setting it to 2 means up to two edits are accepted.
Fix the error in the fuzzy query by completing the missing key for the search term.
{
"query": {
"fuzzy": {
"name": {
[1]: "Jon",
"fuzziness": 1
}
}
}
}The fuzzy query requires the key "value" to specify the search term.
Fill both blanks to create a fuzzy query that searches the "title" field for "elastic" with fuzziness 1.
{
"query": {
"fuzzy": {
[1]: {
"value": [2],
"fuzziness": 1
}
}
}
}The field to search is "title" and the fuzzy value is "elastic".
Fill all three blanks to create a fuzzy query on the "description" field with value "search", fuzziness "AUTO", and prefix length 2.
{
"query": {
"fuzzy": {
[1]: {
"value": [2],
"fuzziness": [3],
"prefix_length": 2
}
}
}
}The field is "description", the value is "search", and fuzziness is set to "AUTO" for automatic adjustment.