Thomas Mueller created SLING-2940:
-------------------------------------
Summary: 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