Lucene.Net TermQuery wildcard search
.net, c#, lucene, lucene.net
Solution
You can use a WildCardQuery. A TermQuery looks for the literal asterisk, rather than a wild card. Please note that a WildCardQuery's performance is usually very slow, probably more so when using two wild cards as you do.
Problem
I have a lucene index I am trying to do a wildcard search. In index i have a character like `'234Test2343'` I am trying to do the search like %Test%.. My lucene syntax looks like ``` string catalogNumber="test"; Term searchTerm = new Term("FIELD", "*"+catalogNumber+"*"); Query query = new TermQuery(searchTerm); ``` I don't get the results back. Any thoughts? Thanks