You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2013/07/08 17:05:48 UTC

[jira] [Resolved] (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:all-tabpanel ]

Carsten Ziegeler resolved SLING-2940.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: i18n 2.2.6

Thanks for the patch, Thomas - I guess everyone was busy, it looks good and it's now applied
                
> 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
>            Assignee: Carsten Ziegeler
>             Fix For: i18n 2.2.6
>
>         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