You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Carlos de Luna Saenz <cd...@yahoo.com.mx> on 2013/10/10 00:32:27 UTC
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.
Re: Wildcard question
Posted by Jack Krupansky <ja...@basetechnology.com>.
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org