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" <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to