lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Incze Lajos <in...@mail.matav.hu>
Subject Re: QueryParser and escaped characters
Date Wed, 28 Jan 2004 04:36:56 GMT
[...]
> so if i *don't* escape the "-", the standard
> analyzer *doesn't* split at the dash..isn't that
> opposite the expected behavior?
> 
> --David

Yes, it is. If you study the standard tokenizer
grammar, the dash is allowed inthe NUM, ALPHANUM
token type and your is an ALPHANUM. So, it's OK.

When you escape the dash from the QueryParser, you
insert a character which breaks the token for
the analyzer. If you want to use this analyzer
to have the token types and patterns it provides
(and you badly need the dash in alphanums) don't
use the query parser, build the queries by the APIs.

incze

---------------------------------------------------------------------
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