When using simple_query_string with the prefix operator * and a fuzziness value ~N on the same word the prefix search appears seems to be disabled.
{
"query": {
"simple_query_string": {
"query": "Abcd*~2",
"fields": ["name"]
}
}
}
It's very obvious that prefix gets disabled whenever you set the fuzziness to 0 and the query becomes Abcd*~0 then there is no prefix search and no fuzziness.
This isn't mentioned in the docs so I'm not sure if I'm doing it wrong.
I've tried:
- swapping the operator order:
Abcd~2*-- in_explainthis introduces fuzziness variations but omits the prefix operator - using parens for precedence:
(Abcd*)~2-- in_explainthis uses the prefix but omits the fuzziness operator1 - duplicating the word:
(Abcd* Abcd~2)-- this works, it obviously shows the reunion of both queries instead of the composition of both effects2.
1 I'm assuming that in this case ~2 shouldn't be interpreted as the SLOP operator because there is no phrase (no quotes).
2 I can understand that compositing those effects may generate too many possible variants -- fuzzy adds 50 variants then prefix searches for each of those, that