sort

package
v0.0.0-...-79441cb Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type By

type By string
const (
	ByCollectionDateStart     By = "collection.start_date"
	ByCollectionDateEnd       By = "collection.end_date"
	ByCollectionDatePrecision By = "collection.date_precision.key"
	ByReleaseDate             By = "release_date"
	ByGeoCoordinates          By = "location.geo_hash"
)

type Mode

type Mode string
const (
	ModeMinimum Mode = "min"
	ModeMaximum Mode = "max"
	ModeSum     Mode = "sum"
	ModeAverage Mode = "avg"
)

type Order

type Order int
const (
	OrderAscending Order = iota
	OrderDescending
)

type Type

type Type struct {
	Order Order
	By    By
	Mode  Mode
}

func (*Type) Do

func (sort *Type) Do(search *elastic.SearchService) *elastic.SearchService

func (*Type) SetBy

func (sort *Type) SetBy(by By) *Type

func (*Type) SetMode

func (sort *Type) SetMode(mode Mode) *Type

func (*Type) SetOrder

func (sort *Type) SetOrder(order Order) *Type

Jump to

Keyboard shortcuts

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