lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "a person" <a.per...@eudoramail.com>
Subject exception with parse & quote
Date Wed, 03 Jul 2002 15:28:25 GMT
All luceners...

this.....

String queryStr="9\" Speaker";
logger.debug("query string...queryStr=" + queryStr);
Analyzer analyzer = new StandardAnalyzer();
Query query = QueryParser.parse(queryStr, "", analyzer);


produces....

query string...queryStr=9" Speaker
org.apache.lucene.queryParser.TokenMgrError: Lexical error at line 1, column 11.  Encountered:
<EOF> after : "\" Speaker"
	at org.apache.lucene.queryParser.QueryParserTokenManager.getNextToken(Unknown Source)
	at org.apache.lucene.queryParser.QueryParser.jj_scan_token(Unknown Source)
	at org.apache.lucene.queryParser.QueryParser.jj_3_1(Unknown Source)
	at org.apache.lucene.queryParser.QueryParser.jj_2_1(Unknown Source)
	at org.apache.lucene.queryParser.QueryParser.Clause(Unknown Source)
	at org.apache.lucene.queryParser.QueryParser.Query(Unknown Source)
	at org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
	at org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)


but this works.....

String queryStr="9 Speaker";



shouldn't.....



shouldn't this behave the same if I call  analyzer.tokenStream directly (which correctly strips
the " out ?


thanks for any help....






Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.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