Improve the expression that's suggested in a comment on how to

use "*" and "?" as first characters on wildcard queries. Thanks to 
Peter Norrhall.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@328754 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2005-10-26 22:31:55 +00:00
parent 1d0b4a23d5
commit 7fa0cf9587
1 changed files with 3 additions and 2 deletions

View File

@ -745,13 +745,14 @@ PARSER_END(QueryParser)
} }
// OG: to support prefix queries: // 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: // Change from:
//
// | <WILDTERM: <_TERM_START_CHAR> // | <WILDTERM: <_TERM_START_CHAR>
// (<_TERM_CHAR> | ( [ "*", "?" ] ))* > // (<_TERM_CHAR> | ( [ "*", "?" ] ))* >
// To: // To:
// //
// | <WILDTERM: (<_TERM_CHAR> | ( [ "*", "?" ] ))* > // (<_TERM_START_CHAR> | [ "*", "?" ]) (<_TERM_CHAR> | ( [ "*", "?" ] ))* >
<DEFAULT> TOKEN : { <DEFAULT> TOKEN : {
<AND: ("AND" | "&&") > <AND: ("AND" | "&&") >