In SQL2 query (also known as JCR-SQL2), you can use the COLLATE
function to ignore accented characters when ordering by jcr:title. The COLLATE
function allows you to specify a collation to control the sorting behavior.
Here's an example of an SQL2 query that ignores accented characters when ordering by jcr:title:
SELECT * FROM [nt:base] AS node
WHERE ISDESCENDANTNODE('/path/to/your/pages')
ORDER BY COLLATE(node.[jcr:title], 'ICU_Locale=fr,strength=primary')
In this example, ICU_Locale=fr
specifies that the collation should follow French language rules for sorting, and strength=primary
specifies that only primary differences (such as accented characters) should be considered significant for ordering.
By using the COLLATE
function with the appropriate collation settings, you can ensure that accented characters are ignored when ordering your pages by jcr:title. This will result in a more accurate sorting order that takes into account language-specific rules.