Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
Lucene.Net 2.9.2
-
None
-
None
-
Windows 7, Microsoft .Net 3.5.
Description
When WildcardQuery.Rewrite method is called, it calls ConstantScoreAutoRewrite.Rewrite method.
In this method, int docCountCutoff seems to be 0 for the cases I tested, therefore, docVisitCount is usually greater than
docCountCutoff, as the result of this, the code block where // Too many terms – make a filter is executed.
So if we have document (with contents "text cat and cut") indexed, we want to search for c*t, if we set the initial query to have the search criteria c*t, then call query.rewrite(), I am expecting to have the result query with criteria of searching for cat + cut. Version 2.9.2 just returns the original wildcard query, which is not a correct behaviour if you look at version 2.4.1.