ben_purdy
(Ben Purdy)
April 27, 2018, 9:48pm
1
As in the title, setting a value to fuzziness (even 0) will make the multi_match query ignore the cutoff_frequency parameter.
In fact setting fuzziness to 0 and a cutoff_frequency, will return the same results of a multi_match query with neither of them set.
Is this the default behavior or a bug?
I'm trying it on an index with only one shard and elasticsearch 6.2.3
1 Like
ben_purdy
(Ben Purdy)
April 27, 2018, 10:15pm
2
To reproduce:
Setup
{
"settings":{
"index":{
"refresh_interval":"1s",
"number_of_shards":"1",
"number_of_replicas":"1"
}
},
"mappings":{
"generic":{
"properties":{
"summary":{
"type":"text"
}
}
}
}
}
Add some data in it:
http://localhost:9200/test/generic/1
{
"summary" : "The dog"
}
http://localhost:9200/test/generic/2
{
"summary" : "The cod"
}
http://localhost:9200/test/generic/3
{
"summary" : "The Cutoff Test"
}
Search for something with both cutoff_frequency and fuzziness:
{
"query":{
"multi_match":{
"cutoff_frequency": 0.001,
"fuzziness": "0",
"query":"The bod",
"fields":[
"summary"
]
}
}
}
For me it is returing everything because it isnt respecting the cutoff_frequency parameter.
system
(system)
Closed
May 25, 2018, 10:15pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.