lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Walls <wal...@michaels.com>
Subject Re: QueryParser
Date Wed, 19 Feb 2003 17:18:28 GMT

Günter,

Just a guess here, but something to think about: Under the covers,
StopAnalyzer uses LetterTokenizer to eliminate any characters that are
not A-Z/a-z. What I imagine happened here is that a query made up of
only "doctypeid:0001" got "0001" tokenized out, which left an empty
query string...which is invalid.

I had a similar situation on a project I was working on and what I ended
up having to do is write my own AlphanumericTokenizer that works like
LetterTokenizer, but it also includes 0-9. Then, I had to write my own
variety of StopAnalyzer that uses AlphanumericTokenizer...I think I
called it AlphanumStopAnalyzer. If you'd like, I could dig up the code
for you.

Günter Kukies wrote:

> Hello,
>
> why got the QueryParser problems interpreting this query:
>
> doctypeid:0001
>
> doctypeid is a Keyword-Field
>
> Maby the numbers are not allowed here, but how can i escape them.
>
> I use the StopAnalyzer.
>
> Thanks,
>
> Günter


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message