jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Savin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (JCR-3398) LOWER operand with nested LOCALNAME operand does not work with SQL2
Date Tue, 24 Jul 2012 14:21:33 GMT
Andy Savin created JCR-3398:
-------------------------------

             Summary: LOWER operand with nested LOCALNAME operand does not work with SQL2
                 Key: JCR-3398
                 URL: https://issues.apache.org/jira/browse/JCR-3398
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: query
    Affects Versions: 2.4.2
         Environment: Java 6
            Reporter: Andy Savin



This is the same issue raised here:

https://issues.apache.org/jira/browse/JCR-3159

However, it doesn't appear to be fixed.  getNodeLocalNameQuery method of LuceneQueryFactory
throws an UnsupportedRepositoryOperationException (see stack trace below).

The reason appears to be that this method is coded to only allow TRANSFORM_NONE.   Commenting
out this check and the query works as expected.

Query:  

SELECT * FROM [nt:base] as t where (LOWER(localname(t)) like '%test%' OR contains(t.*, 'test'))
AND ISDESCENDANTNODE('/2/8/.documents')  

Stack trace:
Caused by: javax.jcr.UnsupportedRepositoryOperationException
	at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.getNodeLocalNameQuery(LuceneQueryFactory.java:675)
	at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.getComparisonQuery(LuceneQueryFactory.java:627)
	at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.create(LuceneQueryFactory.java:430)
	at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.addBooleanConstraint(LuceneQueryFactory.java:556)
	at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.getOrQuery(LuceneQueryFactory.java:532)
	at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.create(LuceneQueryFactory.java:422)
	at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.mapConstraintToQueryAndFilter(LuceneQueryFactory.java:409)
	at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.mapConstraintToQueryAndFilter(LuceneQueryFactory.java:359)
	at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.execute(LuceneQueryFactory.java:210)
	at org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute(QueryEngine.java:465)
	at org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute(QueryEngine.java:126)
	at org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute(QueryEngine.java:115)
	at org.apache.jackrabbit.core.query.QueryObjectModelImpl$2.perform(QueryObjectModelImpl.java:129)
	at org.apache.jackrabbit.core.query.QueryObjectModelImpl$2.perform(QueryObjectModelImpl.java:124)
	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
	at org.apache.jackrabbit.core.query.QueryObjectModelImpl.execute(QueryObjectModelImpl.java:123)

 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message