We are using ElasticSearch version 7.2 in our project with following characteristics:
- The main index mapping contains attributes, embedded objects as well as few nested (array) types.
- Analyzer : Standard analyzer
The requirement is to be able to perform partial search such that it supports
-
Case insensitive
e.g. “name”: “John Doe” should match a search query like “name”: “john doe” -
Patterns based like
e.g. “name”: “John Doe” should match a search query like “name”: “ohn D” -
Special characters(atleast the ones on standard English keyboard)
e.g. “name”: “John (star) Doe” should match a search query like “name”: “john (star”
We have tried using the
- match
- wildcard
- match_phrase_prefix
- and query_string
but none of the above satisfies all the above 3 requirements together.
Is there any specific query DSL that can fulfill our requirements ?