goes

package
v1.2.49 Latest Latest
Warning

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

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

README

go-es

目前:v7
https://github.com/olivere/elastic

官方:v7 v8
https://github.com/elastic/go-elasticsearch

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client() *client

func ESClient

func ESClient() *elastic.Client

func Init

func Init(conf Config, options ...elastic.ClientOptionFunc) (err error)

func New

func New(conf Config, options ...elastic.ClientOptionFunc) (cli *client, err error)

Types

type BoolQueryAction

type BoolQueryAction string
var (
	BoolQueryMust    BoolQueryAction = "must"
	BoolQueryFilter  BoolQueryAction = "filter"
	BoolQueryShould  BoolQueryAction = "should"
	BoolQueryMustNot BoolQueryAction = "must_not"
)

type Config

type Config struct {
	Addr      string `json:"addr,optional" yaml:"Addr,optional"`
	User      string `json:"user,optional" yaml:"User,optional"`
	Password  string `json:"password,optional" yaml:"Password,optional"`
	EnableLog bool   `json:"enableLog,optional" yaml:"EnableLog,optional"`
}

type Pagination

type Pagination struct {
	Sort   string // 排序字段
	Order  bool   // true=升序 false=降序
	Offset int
	Limit  int
}

Jump to

Keyboard shortcuts

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