Skip to content

Metric Definition Reference

A metric definition gives one scalar query a reusable display name and Reference ID. Edit these values in the metric form.

Identity and names#

Names help people find and read a metric. The editable Reference ID connects metric-view cells to it.

Reference ID#

Reference ID

Must start with a lowercase letter. The remaining characters may be lowercase letters, numbers, underscores, or hyphens. The complete pattern is ^[a-z][a-z0-9_-]*$.

The value must be unique among saved metrics. A metric-view cell refers to it with { metric = "reference-id" }.

Changing the value takes effect on Save. Current saved metric views and recoverable view documents are updated together. Saved historical versions keep their recorded reference binding and query.

Reference ID
same-finger
Reference ID
lateral_stretch-2

Full name#

Full name

The descriptive name shown in metric pickers and management surfaces.

Full name
Same finger

Short name#

Short name

A compact display label used where a full metric name would make a table or column too wide.

Short name
SF

Query#

The query language is shared by saved metrics, metric-view cells, Ranking, Pareto, and Inspect. The editor provides completion and diagnostics for the available fields and operations.

Scalar query#

Query

The query must be valid and produce one number. A collection must be reduced with an operation such as .count, .freq, or .map(...).sum before it can be saved as a metric.

Frequency is a fraction. Multiply by 100 in the query when the intended result is percentage points; display formatting never scales the value.

Same-finger percentage points
bi.sf.freq * 100
Weighted distance expression
bi.kp.sf.map(distance ^ 2).sum / corpus.graphemes