Elasticsearch

package
v0.0.0-...-2ec961a Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EsMod

type EsMod struct {
	DocData          map[string]interface{}
	Client           *elastic.Client
	Ctx              context.Context
	PageSize, PageNo int
	IndexName        string
}

func NewEsMod

func NewEsMod() *EsMod

func (*EsMod) Close

func (that *EsMod) Close()

func (*EsMod) ComplexFuzzinessQuery

func (that *EsMod) ComplexFuzzinessQuery(match_data, wildcard_data []map[string]string, MinimumShouldMatch int) ([]map[string]string, int64)

func (*EsMod) ComplexQuery

func (that *EsMod) ComplexQuery(match_data, wildcard_data []map[string]string, MinimumShouldMatch int) ([]map[string]string, int64)

func (*EsMod) Connect

func (that *EsMod) Connect(url string) bool

func (*EsMod) CreateIndex

func (that *EsMod) CreateIndex() bool

func (*EsMod) DelIndex

func (that *EsMod) DelIndex() bool

func (*EsMod) DeleteDoc

func (that *EsMod) DeleteDoc(id string) (*elastic.DeleteResponse, error)

func (*EsMod) IndexExists

func (that *EsMod) IndexExists() bool

func (*EsMod) Init

func (that *EsMod) Init() *EsMod

func (*EsMod) InsertDoc

func (that *EsMod) InsertDoc() (*elastic.IndexResponse, error)

func (*EsMod) LikeQuery

func (that *EsMod) LikeQuery(fdname, fdvalue string) []map[string]string

func (*EsMod) MultiFuzzinessQuery

func (that *EsMod) MultiFuzzinessQuery(fuzz_data []map[string]string, minimumShouldMatch int) ([]map[string]string, int64)

func (*EsMod) MultiMatchQuery

func (that *EsMod) MultiMatchQuery(searchKeyword string, fdname ...string) []map[string]string

func (*EsMod) MultiWildcardQuery

func (that *EsMod) MultiWildcardQuery(wildcard_data []map[string]string, MinimumShouldMatch int) ([]map[string]string, int64)

func (*EsMod) QueryAll

func (that *EsMod) QueryAll() []map[string]string

func (*EsMod) SetData

func (that *EsMod) SetData(data map[string]interface{}) *EsMod

func (*EsMod) SetIndexName

func (that *EsMod) SetIndexName(indexname string) *EsMod

func (*EsMod) SetPageNo

func (that *EsMod) SetPageNo(pageno int) *EsMod

func (*EsMod) SetPageSize

func (that *EsMod) SetPageSize(pagesize int) *EsMod

func (*EsMod) UpdateDoc

func (that *EsMod) UpdateDoc(id string) (*elastic.UpdateResponse, error)

Jump to

Keyboard shortcuts

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