How to do partial matching (including space) in a phrase

Hey ,

I have a trouble for a following requirements:
from Contacts
where name like 'FIRST_WORDS%SECOND_WORDS%'

e.g. if I intput "Hen Mi", it should return the result including 'Henry Michael'.

However, if I use wildcard in ES, i.e. wildcard:{"Name","HenMi"}, ES will regard Hen*Mi as one term to find the match. It will only return the result like 'Henimial ke' for example.

Could anyone can help?Thanks.

Don't use wildcards!

Use a edge ngram strategy and the a match query with hen mi will work OOTB.


Thank you David. Could you make it clearer? how to use edge ngram?

From the docs:

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