lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rosen Marinov" <ros...@sirma.bg>
Subject escaping characters
Date Wed, 21 Apr 2004 12:08:03 GMT
Hi all,
I am usung folowing query to find exact match document with title: Abramovich says Chelsea
win showed "Russian character" .
In both cases with/without escaping " character, and all others form http://jakarta.apache.org/lucene/docs/queryparsersyntax.html
i recieve these exceptions:


CASE 1 - without escaping:
Query == ((TITLE:(["Abramovich says Chelsea win showed "Russian character"" TO "Abramovich
says Chelsea win showed "Russian character""]))
org.apache.lucene.queryParser.ParseException: Encountered "character\"\"" 
Was expecting:
    "]" ...

CASE 2 - with escaping:
Query == (TITLE:(["Abramovich says Chelsea win showed \"Russian character\"" TO "Abramovich
says Chelsea win showed \"Russian character\""]))
org.apache.lucene.queryParser.ParseException: Encountered "character\\\"\""
Was expecting:
    "]" ...

Question 1:
Where is the problem? (i am usung SimpleAnalyzer, is this true?)

Question 2:
Is there more sly way to get the doc with exact maching this title? (for info: my titles are
unique)

Pls answer me in both questions.

Best regards!

Rosen
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message