It's a bug in 2.1, fixed by Doron Cohen
http://issues.apache.org/jira/browse/LUCENE-813
Antony
dontspamterry wrote:
Hi all,
I was experimenting with queries using wildcard on an untokenized field and
noticed that a query with both a starting and trailing wildcard, e.g. *abc*,
gets parsed to
Here you go:
import junit.framework.TestCase;
import org.apache.lucene.analysis.WhitespaceAnalyzer;
import org.apache.lucene.queryParser.QueryParser;
import org.apache.lucene.search.PrefixQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.WildcardQuery;
public class W
: I'm using 2.1.0 and I'm calling setAllowLeadingWildcard(true) first on my
: QueryParser instance. I'm using a PerFieldAnalyzerWrapper where the field of
: interest uses the WhiteSpaceAnalyzer.
could you send some code demonstrating the probelm you areseeing? ideally
in the form of a small self
I'm using 2.1.0 and I'm calling setAllowLeadingWildcard(true) first on my
QueryParser instance. I'm using a PerFieldAnalyzerWrapper where the field of
interest uses the WhiteSpaceAnalyzer.
-Terry
hossman_lucene wrote:
>
>
> : gets parsed to the PrefixQuery *abc. I did enable the leading wildc
: gets parsed to the PrefixQuery *abc. I did enable the leading wildcard in
: the QueryParser to allow the query above to be parsed so I'm wondering is
are you sure you called setAllowLeadingWildcard(true) first?
Are you using using 1.9 or earlier ... if so are you calling the
static parse(Strin