elastic

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertMapToStruct

func ConvertMapToStruct(value map[string]interface{}, target interface{}) error

Types

type Elastic

type Elastic interface {
	Index(index string, id string, value interface{}) error
	Search(index string, termQueryType string, query map[string]interface{}, option *SearchOption) ([]map[string]interface{}, error)
	Delete(index string, ids []string)
	DeleteIndex(indexes []string)
}

func NewElasticClient

func NewElasticClient(conf *config.Config) Elastic

type SearchOption

type SearchOption struct {
	Sort string
	Size int
	From int
}

Jump to

Keyboard shortcuts

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