I need to have a string field, which should be case-INsensitive & it should consider complete text as a "term". So if I have a field with value like "userName":"Vishal Shukla".
- should be returned in search like this: "userName":"vishal shukla"
- should be returned in some sort of prefix search with "userName":"vish"
- should NOT return result if search term is "userName":"shu"
Tried with "not_analyzed" field, which makes it case-sensitive. "keyword_lowercase" custom analyzer would fail in case 3 above.
Please suggest how should I work around this problem.
Thanks & Regards,