lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: GoogleQueryParser
Date Tue, 17 Sep 2002 03:49:02 GMT

--- gcasper@s-und-n.de wrote:
> 
> > - Treat a-b as "a-b" rather that a -b.
> >
> 
> I came across the same. Quite an essential issue for some european
> sites
> (as you surely know :-)
> 
> I'm not very familiar with JavaCC, but I changed QueryParser.jj in
> the
> following way:
> 
> I changed
> | <MINUS:     "-" >
> to
> | <MINUS:     " -" >

This would probably break queries like: '-excludethisterm +includethis'
(quotes are not part of the query, only to show the issue with " -")


> and removed "-" from the list of
> | <#_ESCAPED_CHAR:
> and
> | <#_TERM_START_CHAR:
> 
> This actually changes the behaviour to that of google and I didn't
> experience any negative side effects (yet).

Note to other users: these changes apparently break the QueryParser
(unit tests for QueryParser don't pass after this change).

Otis


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

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


Mime
View raw message