lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Indu Abeyaratna" <>
Subject RE: Analyzer or QueryParser problem?
Date Wed, 27 Jul 2005 01:25:51 GMT

your are right its QueryParser throw the exception.

I think I got the point. QueryParser doesn't allows asterisk at the begining
but SerchIndexer (could) work.

For a example when I quering "\**TI" it returned me machings
"J400-C-V-S10-T1" and "J400-C-V-S8-T1".

-----Original Message-----
From: Erik Hatcher []
Sent: Wednesday, 27 July 2005 10:35 AM
Subject: Re: Analyzer or QueryParser problem?

On Jul 26, 2005, at 7:29 PM, Indu Abeyaratna wrote:

> I have a question related to this.
> when I search for wildcard "*11" IndexSearcher throws an exception
> but when
> I tries "\**11" it works.

I'm guessing QueryParser actually throws an exception, not
IndexSearcher, correct?  Wildcards at the beginning of a term are not
allowed by QueryParser.

Using \**11 works because the first character is literally an
asterisk, and thus is a legal expression.

> I couldn't find any documentation related to this. What could be
> the reason
> for this?
> I am using QueryParser and StandardAnalyser
> And the query it generate looks like : "+orgId:9146 +isRegistered:1
> +docNo:**11"

I see the issue though - by making it \** at the beginning, you've
effectively bypassed the QueryParser protection of not allowing
prefixed wildcard terms but achieved the same thing.  Interesting hack!


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

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

View raw message