Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

new feature in lucene3.6

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


seslamian at gmail

May 15, 2012, 2:45 AM

Post #1 of 3 (131 views)
Permalink
new feature in lucene3.6

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... .


uwe at thetaphi

May 15, 2012, 3:01 AM

Post #2 of 3 (130 views)
Permalink
Re: new feature in lucene3.6 [In reply to]

> 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
so).

The conventional wildcard syntax does not change.

Uwe

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


seslamian at gmail

May 15, 2012, 4:16 AM

Post #3 of 3 (128 views)
Permalink
Re: new feature in lucene3.6 [In reply to]

I got it. Thank you.

On Tue, May 15, 2012 at 2:31 PM, Uwe Schindler <uwe [at] thetaphi> wrote:

> > 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
> so).
>
> The conventional wildcard syntax does not change.
>
> Uwe
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene
>
>

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.