Can I use matchPhrasePrefixQuery and fuzziness at the same time?

I am using Elasticsearch 6.5 and when I use matchPhrasePrefixQuery it works fine.
For Example I have documents like
1.spiderman is climbing
2.spiderman
3.spider
When I type "s" I got all this using matchPhrasePrefixQuery But when I am using fuzziness 1st of all I can't use matchPhrasePrefixQuery so instead of that I am using matchQuery so I need to type a full word to get the results like with only "s" I am not getting any result and with "pider" I am getting only spider instead of only spider I need all the 3 results and I am expecting all the results when I type only "s" also.

Means I want the behaviour of matchPhrasePrefixQuery with fuzziness.

So,is there any way to achieve this requirement???

Can anybody please help me in this requirement as I am not getting any way to proceed.

I would try to use the completion suggester, since its job is pretty much exactly what you're looking for (i.e. match phrase prefix), and it supports fuzziness as well. Beware with fuzziness, though, as it might bite you.

Try it out and let us know.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.