jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Federico Grilli (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-3398) LOWER operand with nested LOCALNAME operand does not work with SQL2
Date Mon, 12 Aug 2013 12:46:48 GMT

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

Federico Grilli commented on JCR-3398:
--------------------------------------

Hi, 

I was actually hoping in a reaction from JR folks. 

Thanks anyway :)

Federico
                
> 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, 2.4.3
>         Environment: Java 6
>            Reporter: Andy Savin
>         Attachments: LuceneQueryFactory.java.patch
>
>
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message