es

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkDelete

func BulkDelete[D DocIdGetter](index string, docs []D) error

func BulkIndex

func BulkIndex[D DocIdGetter](index string, docs []D) error

func Client

func Client() *elasticsearch.TypedClient

func GetDocById added in v0.2.5

func GetDocById[T any](index string, id string) (*T, error)

func InitEs

func InitEs(addresses []string, username string, password string, debug bool)

func QueryTerm

func QueryTerm[T any](index string, from int, size int, termMap map[string]any) (records []T, total int, err error)

func QueryTerms

func QueryTerms[T any](index string, filed string, values []any) ([]T, error)

func QueryTermsId

func QueryTermsId[T any](index string, values []any) ([]T, error)

Types

type DocIdGetter

type DocIdGetter interface {
	GetDocId() string
}

Jump to

Keyboard shortcuts

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