- Print
- DarkLight
- PDF
sort
usage: uncommon - datatype: array
The results of a Tag.script analysis will, by default, be ordered from greatest Tag.score to lowest Tag.score. Results that have the same Tag.score will be ordered indiscriminately. However, a sort attribute can be set to change the ordering of results. The sort attribute takes an array of objects. Each object in the array defines a statistic to sort by using an attribute and an ordering scheme (e.g. ">" = descending) using the direction attribute. The first object in the array will be considered the primary sort criterion. Results that are considered equivalent by the primary sort will be ordered by the secondary sort, and so on. There are sort values which will order all results ("score"), and there are sort values that will order only categorical variable results ("abs-k|m-delta") or numeric variable results ("abs-mean_difference").
"sort": [
{
"attribute": "score", //This is the default - order by Tag.score from high to low
"direction": ">"
},
... //Optionally, define more criteria for secondary sorting
]