Sets
Sets are special scripting variables suitable for holding domain IDs.
They can be predefined or user-defined. In the latter case, they can be created from scratch or derived from existing sets.
Predefined sets
There are two predefined sets:
ALL
WINNERS
ALL
ALL
represents the initial categorization results.
Its value is the set of IDs of the domains with a score, so its contents correspond to the first column of the hidden results table.
In the manipulation flow, ALL
is read only once at the beginning of the onCategorizer
code.
WINNERS
WINNERS
represents the final results of categorization after manipulation.
If WINNERS
contains a domain ID which has a corresponding row in the hidden results table, that row of the table will be returned as final result. Domain IDs without a corresponding entry in the hidden results table are ignored.
In the manipulation flow, WINNERS
is populated only once at the end of the onCategorizer
code.
User-defined sets
User-defined sets are variables the developer uses as "buckets" for results manipulation.
They must be declared, for example:
var workingSet;
var mediaDoms;
They are populated with functions, for example:
workingSet = CLONE(ALL);
mediaDoms = INTERSECTION(workingSet, mediaTaxonomy);