Apache Solr open-source search software
Improve the expression that's suggested in a comment on how to use "*" and "?" as first characters on wildcard queries. Thanks to Peter Norrhall.
Daniel Naber7fa0cf95875f
diff --git a/src/java/org/apache/lucene/queryParser/QueryParser.jj b/src/java/org/apache/lucene/queryParser/QueryParser.jjindex b9ad9fef6ed..88a8726ccd4 100644--- a/src/java/org/apache/lucene/queryParser/QueryParser.jj+++ b/src/java/org/apache/lucene/queryParser/QueryParser.jj@@ -745,13 +745,14 @@ PARSER_END(QueryParser)}// OG: to support prefix queries:-// http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12137+// http://issues.apache.org/bugzilla/show_bug.cgi?id=12137// Change from:+//// | <WILDTERM: <_TERM_START_CHAR>// (<_TERM_CHAR> | ( [ "*", "?" ] ))* >// To://-// | <WILDTERM: (<_TERM_CHAR> | ( [ "*", "?" ] ))* >+// (<_TERM_START_CHAR> | [ "*", "?" ]) (<_TERM_CHAR> | ( [ "*", "?" ] ))* ><DEFAULT> TOKEN : {<AND: ("AND" | "&&") >