I want to perform both exact word match and partial word/substring match. For example if I search for \"men\'s shaver\" then I should be able to find \"men\'s shaver\" in th
By searching with any string or substring Use:
query: { or: [{ match_phrase_prefix: { name: str } }, { match_phrase_prefix: { surname: str } }] }
Happy coding with Elastic Search....