Skip to content

Commit f5b015a

Browse files
committed
Improve PostingsForMatcher doc string
Signed-off-by: Arve Knudsen <[email protected]>
1 parent cdc4718 commit f5b015a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tsdb/block.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ type IndexReader interface {
7474
// LabelValues returns possible label values which may not be sorted.
7575
LabelValues(ctx context.Context, name string, matchers ...*labels.Matcher) ([]string, error)
7676

77-
// PostingsForMatcher returns a sorted iterator over postings matching the provided label matcher.
78-
// This method will not return postings for missing labels.
77+
// PostingsForMatcher returns a sorted iterator over postings having a label matching the provided label matcher.
78+
// If no postings are found having a label with the correct name and matching value, an empty iterator is returned.
7979
PostingsForMatcher(ctx context.Context, m *labels.Matcher) index.Postings
8080

8181
// PostingsForMatchers assembles a single postings iterator based on the given matchers.

tsdb/postings_for_matchers_cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ type IndexPostingsReader interface {
3434
// LabelValues returns possible label values which may not be sorted.
3535
LabelValues(ctx context.Context, name string, matchers ...*labels.Matcher) ([]string, error)
3636

37-
// PostingsForMatcher returns a sorted iterator over postings matching the provided label matcher.
38-
// This method will not return postings for missing labels.
37+
// PostingsForMatcher returns a sorted iterator over postings having a label matching the provided label matcher.
38+
// If no postings are found having a label with the correct name and matching value, an empty iterator is returned.
3939
PostingsForMatcher(ctx context.Context, m *labels.Matcher) index.Postings
4040
}
4141

0 commit comments

Comments
 (0)