Monday, April 27, 2009

What does "Configuring JCR collation support" mean?

Problem
What does the term, "Configuring JCR collation support", mean as mentioned during the setup of DB2 for Lotus Web Content Management (WCM)?

Resolving the problem
In IBM WebSphere Portal, you can use (store or retrieve) contents using Unicode or a locale-specific character set. If you are storing the content using Unicode, collation has minimum importance. Unicode is generic so each character is a predefined size that is the same across characters. If you are storing content using a locale-specific character set, collation becomes a priority.
If you use a filter on the content, the database must use the same character set as that used to encode the content. For example, if you have a column that stores names using a Chinese character set, the comparison will not be the same as if ASCII characters were used. Each character in the Chinese set has a predefined index associated with it so the database must follow these indexes when sorting the names in the result.

This is why you must configure your database and enable collation up front so that in response to your query, the database can pick up the desired character set and use it when ordering the data.