2.2.1.25 CAggregSpec
The CAggregSpec structure contains information about an individual aggregate.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type |
padding |
||||||||||||||||||||||||||||||
ccAlias |
|||||||||||||||||||||||||||||||
Alias (variable) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
idColumn |
|||||||||||||||||||||||||||||||
ulMaxNumToReturn (optional) |
|||||||||||||||||||||||||||||||
idRepresentative (optional) |
type (1 byte): An 8-bit unsigned integer specifying the type of aggregation used. The type MUST be one of the following values.
-
Value
Meaning
DBAGGTTYPE_BYNONE
0x00
No aggregation is used.
DBAGGTTYPE_SUM
0x01
Sum of the idColumn property value from each result in the group. Valid only for numeric properties.
DBAGGTTYPE_MAX
0x02
Maximum value of the idColumn property value from each result in the group. Valid only for numeric or filetime properties.
DBAGGTTYPE_MIN
0x03
Minimum value of the idColumn property value from each result in the group. Valid only for numeric or filetime properties.
DBAGGTTYPE_AVG
0x04
Average value of the idColumn property value from each result in the group. Valid only for numeric properties.
DBAGGTTYPE_COUNT
0x05
Count of the number of leaf results in the group.
DBAGGTTYPE_CHILDCOUNT
0x06
Count of immediate children of the group.
DBAGGTTYPE_BYFREQ
0x07
Most frequent N idColumn values from the results in the group. Additionally includes a count for how many times each value occurred and a document identifier for a result that has each returned value.
DBAGGTTYPE_FIRST
0x08
First N idColumn values from leaf results found in a group.
DBAGGTTYPE_DATERANGE
0x09
Lower and upper bounds of the idColumn values found in the group results group. Only valid for filetime properties.
DBAGGTTYPE_REPRESENTATIVEOF
0x0a
N idRepresentative values, each selected from one of the result subsets that have a unique idColumn value. Each value is also returned with a document identifier that has the idRepresentative value.
DBAGGTTYPE_EDITDISTANCE
0x0b
Edit distance between the results in a completion group and the primary query string in the Completions grouping clause, as specified in CCompletionCategSpec.
padding (3 bytes): This field MUST be 3 bytes in length, and the value it contains is arbitrary. The content of this field MUST be ignored by the receiver.
ccAlias (4 bytes): A 32-bit unsigned integer specifying the number of characters in the Alias field.
Alias (variable): A non-null-terminated Unicode string that represents the alias name for the aggregate. The ccAlias field contains the length of the string.
idColumn (4 bytes): Property ID for the column to be aggregated over.
ulMaxNumToReturn (4 bytes): An optional 32-bit unsigned integer that is the number of elements to return for First, ByFreq, and RepresentativeOf aggregates.
idRepresentative (4 bytes): An optional 32-bit unsigned integer that is the representative property ID requested for the RepresentativeOf aggregate.