Specifies how to sort instances of the concept. When used directly on a structure or structure-enum, it is called natural-order
and acts as the default.
This sets the default sort order for ratings to show the highest scores first (using the normalized value between 0 and 1). In the event of a tie, it will show the rating with the most votes first. An example output would be:
structure (Rating) {
description ("Typical quality rating, generally expressed as stars (4 stars) or
as a fraction (8/10)")
role-of (BaseRating)
property (discretizedScore) {
type (DiscreteStars)
lazy-source (CalculateDiscreteStars)
visibility (Private)
}
natural-order {
direction (DESC)
sort-key (DESC) {
binding (normalizedScore)
}
sort-key (DESC) {
binding (numberOfAggregatedRatings)
}
}
}
Copyright 2025 Samsung All rights reserved