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!

    Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to