jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amir Mistric" <amist...@nemours.org>
Subject Escaped apostrophe in query fails
Date Sun, 24 Jun 2007 17:55:02 GMT
After some testing I noticed that following queries:


/jcr:root/company//*[@jcr:primaryType='mgnl:content']//*[jcr:contains(.,'children''s health')]

/jcr:root/company//*[@jcr:primaryType='mgnl:content']//*[jcr:contains(.,'children''s')]

/jcr:root/company//*[@jcr:primaryType='mgnl:content']//*[jcr:contains(.,'children '' s health')]

/jcr:root/company//*[@jcr:primaryType='mgnl:content']//*[jcr:contains(.,'children '' s')]


All fail with:

13:50:05,744 ERROR [STDERR] javax.jcr.RepositoryException: Exception building query: org.apache.jackrabbit.core.query.lucene.fulltext.ParseException:
Lexical error at line 1, column 11.  Encountered:
<EOF> after : "\"s"
13:50:05,744 ERROR [STDERR]     at org.apache.jackrabbit.core.query.lucene.LuceneQueryBuilder.createQuery(LuceneQueryBuilder.java:174)
13:50:05,744 ERROR [STDERR]     at org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:145)
13:50:05,744 ERROR [STDERR]     at org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:139)


Either I am not escaping the single quote correctly or this is a bug...

Regards
Amir
Mime
View raw message