Hi, I am trying to rewrite one of my XPath query to SQL2 query.
Original XPath query: /taxonomyClasses/*[jcr:like(fn:name(),'%\_0')] SQL2 query: SELECT * FROM [nt:base] WHERE NAME() LIKE '%\_0' and ISCHILDNODE([/ taxonomyClasses]) Underscore is escaped because it is literal in string constant. I am looking for nodes which are child nodes of rootnode /taxonomyClasses and their node name ends with '_0' Jackrabbit 2.4.0 But I get: Caused by: javax.jcr.UnsupportedRepositoryOperationException at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory. getNodeNameQuery(LuceneQueryFactory.java:638) [jackrabbit-core-2.4.0.jar: 2.4.0] at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory. getComparisonQuery(LuceneQueryFactory.java:624) [jackrabbit-core-2.4.0.jar: 2.4.0] at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory. mapConstraintToQueryAndFilter(LuceneQueryFactory.java:400) [jackrabbit-core- 2.4.0.jar:2.4.0] at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory. mapConstraintToQueryAndFilter(LuceneQueryFactory.java:359) [jackrabbit-core- 2.4.0.jar:2.4.0] at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory. execute(LuceneQueryFactory.java:210) [jackrabbit-core-2.4.0.jar:2.4.0] at org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute (QueryEngine.java:460) [jackrabbit-core-2.4.0.jar:2.4.0] at org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute (QueryEngine.java:126) [jackrabbit-core-2.4.0.jar:2.4.0] at org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute (QueryEngine.java:115) [jackrabbit-core-2.4.0.jar:2.4.0] at org.apache.jackrabbit.core.query.QueryObjectModelImpl$2.perform (QueryObjectModelImpl.java:129) [jackrabbit-core-2.4.0.jar:2.4.0] at org.apache.jackrabbit.core.query.QueryObjectModelImpl$2.perform (QueryObjectModelImpl.java:124) [jackrabbit-core-2.4.0.jar:2.4.0] at org.apache.jackrabbit.core.session.SessionState.perform (SessionState.java:216) [jackrabbit-core-2.4.0.jar:2.4.0] at org.apache.jackrabbit.core.query.QueryObjectModelImpl.execute (QueryObjectModelImpl.java:123) [jackrabbit-core-2.4.0.jar:2.4.0] at com.idc.publishing.metacop.repository.TimedQueryManager. executeTimedQuery(TimedQueryManager.java:42) [classes:] at com.idc.publishing.metacop.repository.TaxonomyRepositoryImpl. getTaxonomyList(TaxonomyRepositoryImpl.java:512) [classes:] ... 62 more Is it bug in Jackrabbit? Unsupported NAME() function in SQL2? Anything else? Thanks Marek