-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.3
-
Fix Version/s: 3.3
-
Component/s: core/search
-
Labels:None
-
Environment:
Windows 7, JDK 1.6
-
Lucene Fields:New, Patch Available
If we try to do a search with SpanQuery and a PrefixQuery this message is returned:
"You can only use SpanMultiTermQueryWrapper with a suitable SpanRewriteMethod."
The problem is in the WildcardQuery rewrite function.
If the wildcard query is a prefix, a new prefix query is created, the rewrite method is set with the SpanRewriteMethod and the prefix query is returned.
But, that's the rewritten prefix query which should be returned:
- return rewritten;
+ return rewritten.rewrite(reader);
I will attach a patch with a unit test included.