Skip to main content

Metricaggregation

Properties

NameTypeDescriptionNotes
NameStringThe name of the metric aggregate to be included in the result. If the metric aggregation is omitted, the resulting aggregation will be a count of the documents in the search results.[required]
TypeMetrictype[optional]
FieldStringThe field the calculation is performed on. Prefix the field name with '@' to reference a nested object.[required]

Examples

  • Prepare the resource
$Metricaggregation = Initialize-Metricaggregation  -Name Access Name Count `
-Type null `
-Field @access.name
  • Convert the resource to JSON
$Metricaggregation | ConvertTo-JSON

[Back to top]