I have an custom analyzer with char replace filter, keyword tokenizer and lowercase filter. The problem I want solve is follows
Original string in index : 1812abcdefg
user input query : 812abcdefg
the index has other strings such as 812c, 812ab etc.
I want to be able to allow one or two characters preceding the edge ngram. I have tried ngram but the strings can of varying length from 1 to 50 characters and it throws off search.
Does anybody have any idea to do this?