简体   繁体   中英

How to make wildcard search with fuzzy search in Lucene.net?

I have created lucene.net index projects. in this project if I put ~ symbol it act as a fuzzy search.

My code is,

var hits = indexSearcher.Search(QueryMaker(searchString+"~" , searchfields));

Now, I want to make wildcard search with the existing fuzzy search. Is it possible to make both search?

Lucene is actually pretty well documented, so is the query language:

http://lucene.apache.org/core/2_9_4/queryparsersyntax.html

Never tried but maybe it is possible to have wildcards within the search string (before the ~)?

Apart from that, here is another post with a similar issue Combining Lucene's WildcardQuery with FuzzyQuery

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM