Combining Lucene's WildcardQuery with FuzzyQuery
Using Lucene.Net 2.4.0 is there some kind of built-in support for joining the results of two different queries that target the same index, similar to the support for targeting two or more indexes with a single query?
I'm looking for ways to support both trailing wildcard and fuzzy searches without forcing users to choose one or the other. I could achieve this by executing a wildcard query and a fuzzy search sequentially, and then manually merge the two results and sort by the score of the individual documents, in hopes that their relative scores will make sense.
Is there another way?
To clarify: queries such as "apoca" and "appockalypze" should 开发者_如何学Goboth produce a hit on "Apocalypse Now", given such a document exists in the index, and increasing the fuzzyness from 0.5 to 1 is not really an option.
you could join two or more queries with BooleanQuery
精彩评论