I'm looking for a way to get document that have a field which value prefixing a specified string. For a better comprehension, see the following example:
Elasticsearch Document content
A query with "33652729381" will give the line with France as CountryName.
It's a question of analysis.
When you search, you want to apply a pattern which transform
Then you want to compare that with what has been indexed in the
CountryCode field and get back that document.
Which means to me:
- Using a
keyword analyzer at index time:
- Using a edge ngram based analyzer at search time:
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.