How to match by different prefixes

Will try to explain what I mean by saying "different prefixes". I have a text field "Name", and I want to check (while searching) whether this field starts with some particular prefix with length varying from 3 to 5.

Let's say Name = "Anna K". And the name in query is "Ann Blake". I want the name to match the previous query. So the idea here is that only first five characters are considered.

Name in the record can be any length, but I need to take into account only up to 5 characters (from 3 to 5 actually).

I'm not sure how to implement this. I've added an edge-ngram analyzer to my field. Now, what next?

I can't access analyzed n-grams directly afaik. So for example, I can't match against Name.3ngram, Name.4ngram, Name.5ngram, can I?

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