jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Parvulescu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-3398) LOWER operand with nested LOCALNAME operand does not work with SQL2
Date Wed, 01 Aug 2012 08:47:34 GMT

    [ https://issues.apache.org/jira/browse/JCR-3398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13426379#comment-13426379
] 

Alex Parvulescu commented on JCR-3398:
--------------------------------------

Hi Andy,

Do you mind submitting a patch with a test for this issue?
There already is a test class that you can easily use to build a small unit test [0].

[0] http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/SQL2NodeLocalNameTest.java?view=markup
                
> 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