This topic presents some approaches to solving sorting problems.
If the returned records do not seem to respect
the sort key parameter, there are some potential problems:
- Was the attribute specified
as a numeric when it is actually alphanumeric? Or vice versa? In this case, the
Oracle Endeca Server returns a valid response, but the sorting may be
incorrect.
- If a record has multiple
attribute value assignments from a single attribute, the Oracle Endeca Server
sorts the records based on the first value associated with the key. If the
application is displaying the last value, the records will not appear to be
sorted correctly. In general, attributes that used for sorting should only have
one value assigned per record.
- If certain records in a data
store lack a sort-key value, they will always appear last in a result set.
Therefore, if you reverse a sort order on a record set containing such records,
the order of the entire record set will not be reversed — the records without a
sort-key value always sort at the end of the set.