aggregation

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TextValueSource = iota
	TextValuesSource
	NumericValueSource
	NumericValuesSource
	BooleanValueSource
	BooleanValuesSource
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoDateHistogramAggregation

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

func NewAutoDateHistogramAggregation

func NewAutoDateHistogramAggregation(
	field search.FieldSource,
	buckets int, minimumInterval,
	format string, timeZone *time.Location,
) *AutoDateHistogramAggregation

NewAutoDateHistogramAggregation returns a termsAggregation field use to set the field use to terms aggregation

func (*AutoDateHistogramAggregation) AddAggregation

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

func (*AutoDateHistogramAggregation) Calculator

func (*AutoDateHistogramAggregation) Fields

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

type AutoDateHistogramCalculator

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

func (*AutoDateHistogramCalculator) Buckets

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

func (*AutoDateHistogramCalculator) Consume

func (*AutoDateHistogramCalculator) Finish

func (a *AutoDateHistogramCalculator) Finish()

func (*AutoDateHistogramCalculator) Interval

func (a *AutoDateHistogramCalculator) Interval() string

func (*AutoDateHistogramCalculator) Len

func (*AutoDateHistogramCalculator) Less

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

func (*AutoDateHistogramCalculator) Merge

func (*AutoDateHistogramCalculator) Other

func (a *AutoDateHistogramCalculator) Other() int

func (*AutoDateHistogramCalculator) Swap

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

type DateHistogramAggregation

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

func NewDateHistogramAggregation

func NewDateHistogramAggregation(
	field search.FieldSource,
	calendarInterval string,
	fixedInterval int64,
	format string,
	timeZone *time.Location,
	extendedBounds,
	hardBounds *HistogramBound,
	minDocCount,
	size int,
) *DateHistogramAggregation

NewDateHistogramAggregation returns a termsAggregation field use to set the field use to terms aggregation

func (*DateHistogramAggregation) AddAggregation

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

func (*DateHistogramAggregation) Calculator

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

func (*DateHistogramAggregation) Fields

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

type DateHistogramCalculator

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

func (*DateHistogramCalculator) Buckets

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

func (*DateHistogramCalculator) Consume

func (*DateHistogramCalculator) Finish

func (a *DateHistogramCalculator) Finish()

func (*DateHistogramCalculator) Len

func (a *DateHistogramCalculator) Len() int

func (*DateHistogramCalculator) Less

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

func (*DateHistogramCalculator) Merge

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

func (*DateHistogramCalculator) Other

func (a *DateHistogramCalculator) Other() int

func (*DateHistogramCalculator) Swap

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

type HistogramAggregation

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

func NewHistogramAggregation

func NewHistogramAggregation(
	field search.FieldSource,
	interval,
	offset float64,
	extendedBounds,
	hardBounds *HistogramBound,
	minDocCount,
	size int,
) *HistogramAggregation

NewHistogramAggregation returns a termsAggregation field use to set the field use to terms aggregation

func (*HistogramAggregation) AddAggregation

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

func (*HistogramAggregation) Calculator

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

func (*HistogramAggregation) Fields

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

type HistogramBound

type HistogramBound struct {
	Min float64 `json:"min"` // minimum
	Max float64 `json:"max"` // maximum
}

type HistogramCalculator

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

func (*HistogramCalculator) Buckets

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

func (*HistogramCalculator) Consume

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

func (*HistogramCalculator) Finish

func (a *HistogramCalculator) Finish()

func (*HistogramCalculator) Len

func (a *HistogramCalculator) Len() int

func (*HistogramCalculator) Less

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

func (*HistogramCalculator) Merge

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

func (*HistogramCalculator) Other

func (a *HistogramCalculator) Other() int

func (*HistogramCalculator) Swap

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

type SearchAggregation

type SearchAggregation interface {
	AddAggregation(name string, aggregation search.Aggregation)
}

type TermsAggregation

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

func NewTermsAggregation

func NewTermsAggregation(field search.FieldSource, valueType int, size int) *TermsAggregation

NewTermsAggregation returns a termsAggregation field use to set the field use to terms aggregation valueType use to set the value type, can be diy.TextValueSource / diy.TextValuesSource / diy.NumericValueSource / diy.NumericValuesSource

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)

Jump to

Keyboard shortcuts

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