elastic

package
v1.60.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

type Query map[string]any

func All

func All(queries ...Query) Query

All is a shortcut for a bool query with a must clause

func Any

func Any(queries ...Query) Query

Any is a shortcut for a bool query with a should clause

func Between

func Between(field string, from, to any) Query

Between is a shortcut for a range query where from <= x < to

func Bool

func Bool(all []Query, none []Query) Query

Bool is a shortcut for a bool query with multiple must and must_not clauses

func Exists

func Exists(field string) Query

Exists is a shortcut for an exists query

func GreaterThan

func GreaterThan(field string, value any) Query

GreaterThan is a shortcut for a range query where x > value

func GreaterThanOrEqual

func GreaterThanOrEqual(field string, value any) Query

GreaterThanOrEqual is a shortcut for a range query where x >= value

func Ids

func Ids(values ...string) Query

Not is a shortcut for an ids query

func LessThan

func LessThan(field string, value any) Query

LessThan is a shortcut for a range query where x < value

func LessThanOrEqual

func LessThanOrEqual(field string, value any) Query

LessThanOrEqual is a shortcut for a range query where x <= value

func Match

func Match(field string, value any) Query

Match is a shortcut for a match query

func MatchAll added in v1.59.1

func MatchAll() Query

MatchAll is a shortcut for a match all query

func MatchPhrase

func MatchPhrase(field, value string) Query

MatchPhrase is a shortcut for a match_phrase query

func Nested

func Nested(path string, query Query) Query

Nested is a shortcut for a nested query

func Not

func Not(query Query) Query

Not is a shortcut for a bool query with a must_not clause

func Term

func Term(field string, value any) Query

Term is a shortcut for a term query

type Sort

type Sort map[string]any

func SortBy

func SortBy(field string, ascending bool) Sort

SortBy is a shortcut for a simple field sort

func SortNested

func SortNested(field string, filter Query, path string, ascending bool) Sort

SortNested is a shortcut for a nested field sort

Jump to

Keyboard shortcuts

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