Setting wildcard queries as default for QueryParser

Posted by user46703 on Stack Overflow See other posts from Stack Overflow or by user46703
Published on 2010-05-15T03:22:45Z Indexed on 2010/05/15 3:34 UTC
Read the original article Hit count: 252

Filed under:
|

When my users enter a term like "word" I would like it be treated as a wildcard query "word*" so all terms beginning "word" are found. Is there a way to tell the QueryParser to automatically create wildcard queries or do I have to parse the query myself? This shouldn't be a problem for simple queries but it may become tricky for more complex queries.

© Stack Overflow or respective owner

Related posts about lucene.net

Related posts about lucene