lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Carlson <carl...@bookandhammer.com>
Subject Re: Query parser error
Date Thu, 30 May 2002 13:57:03 GMT
Try using the newest release and read the Queryparser syntax.

http://jakarta.apache.org/lucene/docs/queryparsersyntax.html

Escape characters were just added.

--Peter



On 5/29/02 10:53 PM, "Harpreet S Walia" <harpreet@sansuisoftware.com> wrote:

> Hi
> 
> I am trying to search words which have characters { , [ etc in them . I am
> using the standard lucene jar (V 1.2-rc4 ).
> when i search for the words having these charcters i get a exception saying
> 
> org.apache.lucene.queryParser.TokenMgrError: Lexical error at line 1, column
> 8.  Encountered:  after : "{are"
> 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)
> at com.sansui.lucene.Searcher.searchDocuments(Searcher.java:79)
> 
> 
> I presume that lucene is treating these words as special characters . Is there
> a way to avoid this error and search for these kind of words . what kind of
> changes are required to be done for this .
> 
> Can someone shed some light on how queryparser treats the contents .
> 
> Thanks and regards,
> Harpreet
> 


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