lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhang, Lisheng" <Lisheng.Zh...@broadvision.com>
Subject Lucene 1.4.3 QueryParser cannot parse "great!" ?
Date Thu, 09 Jun 2005 23:04:39 GMT
Hi,

We are using lucene 1.4.3, we indexed a string

Company picnic is great!

by IndexWriter created with StandardAnalyzer, into
a field called "all". I also confirmed StandardAnalyzer 
processed my input string as tokens:

company
picnic
great

as I expected.

But when I try to create Query by QueryParser 

Query q = QueryParser.parse("great!", "all", new StandardAnalyzer());

I got the ParseException:

##########################
Encountered "<EOF>" at line 1, column 7.
Was expecting one of:
    "(" ...
    <QUOTED> ...
    <TERM> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
#########################

Surely if I use "great" or some other special symbols
at the end like "great-" or "great+", QueryParser is OK.

I would expect QueryParser can process "great!" to take
away "!" so this query is the same as "great"? Is this behavior 
expected or is a bug?

Thanks very much for helps, 

Lisheng Zhang, Software engineer
    

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


Mime
View raw message