lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Analyzer or QueryParser problem?
Date Wed, 27 Jul 2005 00:34:56 GMT

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:

View raw message