You get to decide:

class QueryParser extends QueryParserBase:

/**
* Set to <code>true</code> to allow leading wildcard characters.
* <p>
* When set, <code>*</code> or <code>?</code> are allowed as
* the first character of a PrefixQuery and WildcardQuery.
* Note that this can produce very slow
* queries on big indexes.
* <p>
* Default: false.
*/
@Override
public void setAllowLeadingWildcard(boolean allowLeadingWildcard) {
 this.allowLeadingWildcard = allowLeadingWildcard;
}

And the default is "false" (leading wildcard not allowed.)

-- Jack Krupansky

-----Original Message----- From: Carlos de Luna Saenz
Sent: Wednesday, October 09, 2013 6:32 PM
To: java-user@lucene.apache.org
Subject: Wildcard question

I've used Lucene 2,3 and now 4... i used to believe that * wildcard on the begining was acepted since 3 (but never used) and reviewing documentation says "Note: You cannot use a * or ? symbol as the first character of a search." is that ok or is a missupdated note on the http://lucene.apache.org/core/4_4_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description documentation? Thanks in advance.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to