Better way to implement "contain with"

Currently we are using wildcard query start and end with * to implement the "contains with" function, however it seems the performance is really bad, and we find that ES have documented this on

So I'm wondering whether there is a better way to replace the wildcard query?

Try using n-grams instead of wildcards:

N-grams required increased storage and could suffer from precision issue if
not tuned.

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