Operators for Ordered Tables

Note

Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.

 

The following list describes the operators for ordered tables.

DBOP_top, DBOP_top_percent, DBOP_top_plus_ties, DBOP_top_percent_plus_ties

Take the first rows from an ordered table. These operators are different from the sampling operators because they prohibit randomness. The "top" operations require a fixed count of rows. The "top_percent" operations require a fraction of the input rows (not an approximation). The "plus-ties" operators include all rows that are equal (with respect to the sort order of the input table) to the last one that is explicitly requested. The first required input for all operators is an ordered table. The top and top_plus_ties operators store the count of rows as a positive integer in the ulValue member of the command node. The "top_percent*" operators take a second required scalar_list_anchor input. The elements of this list contain two scalar_constant members that represent a pair of positive integers expressing a fraction between 0 and 1. The output is an ordered table.

DBOP_rank, DBOP_rank_ties_equally, DBOP_rank_ties_equally_and_skip

Add a new column "rank" to the table, counting from 1 to the table's cardinality. If the column name "rank" already exists, add "rank2" ("rank3" etc.) instead. The "ties" operations assign the same rank to items that are equal (with respect to the sort order of the input table). The "and skip" variant skips an appropriate number of values in the counting sequence. An example without skipping would be 1, 2, 2, 2, 3, 4, 4, 5; an example with skipping would be 1, 2, 2, 2, 5, 6, 6, 8. The input is an ordered table. If the operator is "rank," the output is an ordered unique table; for the "ties" operators, it is an ordered table.