Hello,

I have one more question related to the full text search. I use instructions
from  http://wiki.apache.org/jackrabbit/EncodingAndEscaping
http://wiki.apache.org/jackrabbit/EncodingAndEscaping  to escape values in
queries. Well. But the method Text.escapeIllegalXpathSearchChars does
something strange replacements. If I want to search a whole phrase I
surround the text with double quotes. This is described in JCR 170 (section
6.6.5.2 jcr:contains Function) A term may be either a single word or a
phrase delimited by double quotes ("). Well. I write now a String "\"Have
much fun\"" and pass it through Text.escapeIllegalXpathSearchChars. An
exception is thrown:

javax.jcr.RepositoryException: Exception building query:
org.apache.lucene.queryParser.ParseException: Cannot parse '"Have much
fun\"': Lexical error at line 1, column 17.  Encountered: <EOF> after :
"\"Have much fun\\\""

How can I force to search phrases as a whole text?

Best regards.
Oleg.
-- 
View this message in context: 
http://n4.nabble.com/Full-text-search-failed-tp931175p931238.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Reply via email to