lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject Re: new feature in lucene3.6
Date Tue, 15 May 2012 10:01:45 GMT
> Hello
> I have a question about this new feature in lucene 3.6 :
> " The QueryParser now interprets * as an open end for range queries.
> Literal asterisks may be represented by quoting or escaping (i.e. \* or
> "*") Custom QueryParser subclasses overriding getRangeQuery() will be
> passed null for any open endpoint"
> Does it mean if I have this : QueryParser queryParser = new QueryParser
> (version,f,a);
>                                         queryParser.parse("blu*");
> QueryParser assumes it as a RangeQuery like this : [blu TO ]?!!!
> Does it call getRangeQuery() method? or I'm making a mistake in the
> concept  of this feature... .

No it just means:

A query like "[blu TO *]" is working and maps to
TermRangeQuery.newStringRange(...,"blu",null,...), which is a half open
range. Before you had to do this yourself in the
newRangeQuery/getRangeQuery method (and you still need to do this for
fields that are Numeric unless you use the new flxible query parser in
contrib, which knows the existence of numeric fields since 3.4 or like

The conventional wildcard syntax does not change.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message