I'm trying to filter my elasticsearch result where the results should be returned where they are 80% compatible with the searched text.
When I use only one column the minimum_should_match
rule works perfectly:
{
"size":30,
"from":930,
"query":{
"filtered":{
"query":{
"query_string":{
"default_field":"campo1",
"query":"portugues",
"minimum_should_match":"80%"
}
}
}
}
}
When I search for more than one field it does not matter what value I put in minimum_should_match
that the same amount of results is always returned:
{
"size":30,
"from":123420,
"query":{
"filtered":{
"query":{
"query_string":{
"default_operator":"or",
"query":"portugues",
"fields":[
"campo1",
"campo2^5",
"campo3"
],
"minimum_should_match":"80%"
}
}
}
}
}
From what I'm probably checking I have to insert a minimum_should_match
for each column or something.