You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2013/07/01 19:58:23 UTC

[jira] [Commented] (SLING-2940) JCR queries for jcr:language: avoid using fn:lower-case

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

Alexander Klimetschek commented on SLING-2940:
----------------------------------------------

Looks good to me.
                
> JCR queries for jcr:language: avoid using fn:lower-case
> -------------------------------------------------------
>
>                 Key: SLING-2940
>                 URL: https://issues.apache.org/jira/browse/SLING-2940
>             Project: Sling
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Thomas Mueller
>         Attachments: SLING-2940.patch
>
>
> In SLING-2121, the query was changed to support both lowercase and uppercase country codes in locales, for example "en_GB" and "en_gb". To do that, fn:lower-case(jcr:language) = 'en_gb' is currently used. While it works, the usage of fn:lower-case is problematic for the query engine in Jackrabbit and specially Oak, because it is quite hard to use an index in this case.
> To improve performance of this query with Oak, I suggest to use the longer form with "or": jcr:language = 'en_gb' or jcr:language = 'en_GB'. In this case, Jackrabbit / Oak can use an index. See also OAK-882 for index usage for "or" conditions.

--
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