Expand description
Set operations over postings: intersection, union and difference.
A label matcher plan is a tree of these operations over the postings lists of
single label pairs, e.g. {namespace="prod", service="api"} becomes
Intersection(postings(namespace=prod), postings(service=api)).
Every operation is lazy and keeps both inputs as cursors, so a plan costs one
Postings per leaf and never materialises an intermediate set. Each seek
is forwarded to the inputs, which lets the intersection skip large gaps
instead of stepping through them.
Structs§
- Difference
- Difference
left \ right: references inleftthat are absent fromright. - Intersection
- Intersection of two postings lists: references present in both.
- Union
- Union of several postings lists: every reference, once, ascending.
Functions§
- difference
leftminusright.- intersect
- Intersection of two sources, boxed inputs.
- intersect_
all - Intersection of all sources; an empty input yields an empty list.
- union_
all - Union of all sources; an empty input yields an empty list.
Type Aliases§
- BoxPostings
- A boxed postings source, the currency of this module.