How to perform a wildcard search in Lucene
I know that Lucene has extensive support for wildcard searches and I know you can search for things like: Stackover* (which will return Stackoverflow ) That said, my users aren't interested in learning a query syntax. Can Lucene perform this type of wildcard search using an out-of-box Analyzer? Or should I append "*" to every search query? Doing this with string manipulations is tricky to get right, especially since the QueryParser supports boosting, phrases, etc. You could use a QueryVisitor that rewrites TermQuery into PrefixQuery. public class PrefixRewriter : QueryVisitor { protected