You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Günter Kukies <gu...@heuft.com> on 2003/02/18 18:08:19 UTC
QueryParser
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
Re: QueryParser
Posted by Günter Kukies <gu...@heuft.com>.
So, I use the StandardAnalyser now, that does not filter digits and I signed
the field doctypeid as Field.Keyword.
Thanks for your hints
Günter
----- Original Message -----
From: <ne...@hotu.com>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Wednesday, February 19, 2003 7:59 PM
Subject: Re: QueryParser
> If doctypeid is just a single opaque identifier, then there is no need
> to tokenize this field.
>
> Craig Walls wrote:
>
> >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
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: QueryParser
Posted by ne...@hotu.com.
If doctypeid is just a single opaque identifier, then there is no need
to tokenize this field.
Craig Walls wrote:
>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
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: QueryParser
Posted by Craig Walls <wa...@michaels.com>.
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