Comparison of tokens must not be repeated from query side to index document side


for example if i have a name query with name "pier luigi bersani" and index document having name "pi luigi bersani". here we have used bigram filter. the name query has "er" token which is repeated two times.the document have it only it should match only once.but for us it is matching should not happen.if t is two times on both sides it should match only 2 times.

we tried with unique token filter but the response is it is matching only once. "analyzer": { "my_analyzer": { "type": "custom", "filter": [ "lowercase", "bigrams_filter", "unique_stem"