aggregations

package
v1.80.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CardinalityCalculator

type CardinalityCalculator struct {
	// contains filtered or unexported fields
}

func (*CardinalityCalculator) Consume

func (*CardinalityCalculator) Finish

func (c *CardinalityCalculator) Finish()

func (*CardinalityCalculator) Merge

func (c *CardinalityCalculator) Merge(other search.Calculator)

func (*CardinalityCalculator) Value

func (c *CardinalityCalculator) Value() float64

type CardinalityMetric

type CardinalityMetric struct {
	// contains filtered or unexported fields
}

func (*CardinalityMetric) Calculator

func (c *CardinalityMetric) Calculator() search.Calculator

func (*CardinalityMetric) Fields

func (c *CardinalityMetric) Fields() []string

type DateRange

type DateRange struct {
	// contains filtered or unexported fields
}

func NewDateRange

func NewDateRange(start, end time.Time) *DateRange

func NewNamedDateRange

func NewNamedDateRange(name string, start, end time.Time) *DateRange

type DateRangeAggregation

type DateRangeAggregation struct {
	// contains filtered or unexported fields
}

func (*DateRangeAggregation) AddAggregation

func (a *DateRangeAggregation) AddAggregation(name string, agg search.Aggregation) *DateRangeAggregation

func (*DateRangeAggregation) AddRange

func (*DateRangeAggregation) Calculator

func (a *DateRangeAggregation) Calculator() search.Calculator

func (*DateRangeAggregation) Fields

func (a *DateRangeAggregation) Fields() []string

type DateRangeCalculator

type DateRangeCalculator struct {
	// contains filtered or unexported fields
}

func (*DateRangeCalculator) Buckets

func (b *DateRangeCalculator) Buckets() []*search.Bucket

func (*DateRangeCalculator) Consume

func (b *DateRangeCalculator) Consume(d *search.DocumentMatch)

func (*DateRangeCalculator) Finish

func (b *DateRangeCalculator) Finish()

func (*DateRangeCalculator) Merge

func (b *DateRangeCalculator) Merge(other search.Calculator)

type DurationCalculator

type DurationCalculator struct {
	// contains filtered or unexported fields
}

func (*DurationCalculator) BoundOnly added in v1.60.0

func (d *DurationCalculator) BoundOnly() bool

func (*DurationCalculator) Consume

func (*DurationCalculator) ConsumeScore added in v1.60.0

func (d *DurationCalculator) ConsumeScore(float64, int)

func (*DurationCalculator) Duration

func (d *DurationCalculator) Duration() time.Duration

func (*DurationCalculator) Finish

func (d *DurationCalculator) Finish()

func (*DurationCalculator) Merge

func (*DurationCalculator) ScoreOnly added in v1.60.0

func (d *DurationCalculator) ScoreOnly() bool

type DurationMetric

type DurationMetric struct{}

func Duration

func Duration() *DurationMetric

func (*DurationMetric) Calculator

func (d *DurationMetric) Calculator() search.Calculator

func (*DurationMetric) Fields

func (d *DurationMetric) Fields() []string

type FilteringDateSource

type FilteringDateSource struct {
	// contains filtered or unexported fields
}

func FilterDate

func FilterDate(source search.DateValuesSource, filter func(time.Time) bool) *FilteringDateSource

func (*FilteringDateSource) Dates

func (f *FilteringDateSource) Dates(match *search.DocumentMatch) []time.Time

func (*FilteringDateSource) Fields

func (f *FilteringDateSource) Fields() []string

type FilteringGeoPointSource

type FilteringGeoPointSource struct {
	// contains filtered or unexported fields
}

func FilterGeoPoint

func FilterGeoPoint(source search.GeoPointValuesSource, filter func(*geo.Point) bool) *FilteringGeoPointSource

func (*FilteringGeoPointSource) Fields

func (f *FilteringGeoPointSource) Fields() []string

func (*FilteringGeoPointSource) GeoPoints

func (f *FilteringGeoPointSource) GeoPoints(match *search.DocumentMatch) []*geo.Point

type FilteringNumericSource

type FilteringNumericSource struct {
	// contains filtered or unexported fields
}

func FilterNumeric

func FilterNumeric(source search.NumericValuesSource, filter func(float64) bool) *FilteringNumericSource

func (*FilteringNumericSource) Fields

func (f *FilteringNumericSource) Fields() []string

func (*FilteringNumericSource) Numbers

func (f *FilteringNumericSource) Numbers(match *search.DocumentMatch) []float64

type FilteringTextSource

type FilteringTextSource struct {
	// contains filtered or unexported fields
}

func FilterText

func FilterText(source search.TextValuesSource, filter func([]byte) bool) *FilteringTextSource

func (*FilteringTextSource) Fields

func (f *FilteringTextSource) Fields() []string

func (*FilteringTextSource) Values

func (f *FilteringTextSource) Values(match *search.DocumentMatch) [][]byte

type NumericRange

type NumericRange struct {
	// contains filtered or unexported fields
}

func NamedRange

func NamedRange(name string, low, high float64) *NumericRange

func Range

func Range(low, high float64) *NumericRange

type QuantilesCalculator

type QuantilesCalculator struct {
	// contains filtered or unexported fields
}

func (*QuantilesCalculator) Consume

func (c *QuantilesCalculator) Consume(d *search.DocumentMatch)

func (*QuantilesCalculator) Finish

func (c *QuantilesCalculator) Finish()

func (*QuantilesCalculator) Merge

func (c *QuantilesCalculator) Merge(other search.Calculator)

func (*QuantilesCalculator) Quantile

func (c *QuantilesCalculator) Quantile(percent float64) (float64, error)

type QuantilesMetric

type QuantilesMetric struct {
	// contains filtered or unexported fields
}

func (*QuantilesMetric) Calculator

func (c *QuantilesMetric) Calculator() search.Calculator

func (*QuantilesMetric) Fields

func (c *QuantilesMetric) Fields() []string

func (*QuantilesMetric) SetCompression

func (c *QuantilesMetric) SetCompression(compression float64) error

type RangeAggregation

type RangeAggregation struct {
	// contains filtered or unexported fields
}

func (*RangeAggregation) AddAggregation

func (a *RangeAggregation) AddAggregation(name string, agg search.Aggregation) *RangeAggregation

func (*RangeAggregation) AddRange

func (a *RangeAggregation) AddRange(rang *NumericRange) *RangeAggregation

func (*RangeAggregation) Calculator

func (a *RangeAggregation) Calculator() search.Calculator

func (*RangeAggregation) Fields

func (a *RangeAggregation) Fields() []string

type RangeCalculator

type RangeCalculator struct {
	// contains filtered or unexported fields
}

func (*RangeCalculator) Buckets

func (b *RangeCalculator) Buckets() []*search.Bucket

func (*RangeCalculator) Consume

func (b *RangeCalculator) Consume(d *search.DocumentMatch)

func (*RangeCalculator) Finish

func (b *RangeCalculator) Finish()

func (*RangeCalculator) Merge

func (b *RangeCalculator) Merge(other search.Calculator)

type SingleValueCalculator

type SingleValueCalculator struct {
	// contains filtered or unexported fields
}

func (*SingleValueCalculator) BoundOnly added in v1.60.0

func (s *SingleValueCalculator) BoundOnly() bool

BoundOnly reports whether the calculator counts hits or takes the max score, which a bound at or below an already seen score cannot change.

func (*SingleValueCalculator) Consume

func (*SingleValueCalculator) ConsumeScore added in v1.60.0

func (s *SingleValueCalculator) ConsumeScore(score float64, n int)

ConsumeScore is Consume for n hits known only by their shared score; see ScoreOnly. Results equal n separate Consume calls.

func (*SingleValueCalculator) Finish

func (s *SingleValueCalculator) Finish()

func (*SingleValueCalculator) Merge

func (s *SingleValueCalculator) Merge(other search.Calculator)

func (*SingleValueCalculator) ScoreOnly added in v1.60.0

func (s *SingleValueCalculator) ScoreOnly() bool

ScoreOnly reports whether the calculator counts hits or aggregates the score.

func (*SingleValueCalculator) Value

func (s *SingleValueCalculator) Value() float64

type SingleValueMetric

type SingleValueMetric struct {
	// contains filtered or unexported fields
}

func CountMatches

func CountMatches() *SingleValueMetric

func MaxStartingAt

func MaxStartingAt(src search.NumericValuesSource, initial float64) *SingleValueMetric

func (*SingleValueMetric) Calculator

func (s *SingleValueMetric) Calculator() search.Calculator

func (*SingleValueMetric) Fields

func (s *SingleValueMetric) Fields() []string

type TermsAggregation

type TermsAggregation struct {
	// contains filtered or unexported fields
}

func NewTermsAggregation

func NewTermsAggregation(src search.TextValuesSource, size int) *TermsAggregation

func (*TermsAggregation) AddAggregation

func (t *TermsAggregation) AddAggregation(name string, aggregation search.Aggregation)

func (*TermsAggregation) Calculator

func (t *TermsAggregation) Calculator() search.Calculator

func (*TermsAggregation) Fields

func (t *TermsAggregation) Fields() []string

type TermsCalculator

type TermsCalculator struct {
	// contains filtered or unexported fields
}

func (*TermsCalculator) Buckets

func (a *TermsCalculator) Buckets() []*search.Bucket

func (*TermsCalculator) Consume

func (a *TermsCalculator) Consume(d *search.DocumentMatch)

func (*TermsCalculator) Finish

func (a *TermsCalculator) Finish()

func (*TermsCalculator) Len

func (a *TermsCalculator) Len() int

func (*TermsCalculator) Less

func (a *TermsCalculator) Less(i, j int) bool

func (*TermsCalculator) Merge

func (a *TermsCalculator) Merge(other search.Calculator)

func (*TermsCalculator) Other

func (a *TermsCalculator) Other() int

func (*TermsCalculator) Swap

func (a *TermsCalculator) Swap(i, j int)

type WeightedAvgCalculator

type WeightedAvgCalculator struct {
	// contains filtered or unexported fields
}

func (*WeightedAvgCalculator) Consume

func (*WeightedAvgCalculator) Finish

func (a *WeightedAvgCalculator) Finish()

func (*WeightedAvgCalculator) Merge

func (a *WeightedAvgCalculator) Merge(other search.Calculator)

func (*WeightedAvgCalculator) Value

func (a *WeightedAvgCalculator) Value() float64

type WeightedAvgMetric

type WeightedAvgMetric struct {
	// contains filtered or unexported fields
}

func WeightedAvg

func WeightedAvg(src, weight search.NumericValuesSource) *WeightedAvgMetric

func (*WeightedAvgMetric) Calculator

func (a *WeightedAvgMetric) Calculator() search.Calculator

func (*WeightedAvgMetric) Fields

func (a *WeightedAvgMetric) Fields() []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL