v8

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHTTPClient

func CreateHTTPClient(tlsConfig interface{}, httpClient *http.Client) *http.Client

func CreateLogger

func CreateLogger(prefix string) *log.Logger

func GetDefaultLogger

func GetDefaultLogger() *log.Logger

func NewConfig

func NewConfig(url string, username string, password string, verifySSL bool, httpClient *http.Client) elasticsearch.Config

func TrimSpace

func TrimSpace(s string) string

Types

type BoolQuery

type BoolQuery struct {
	// contains filtered or unexported fields
}

func NewBoolQuery

func NewBoolQuery() *BoolQuery

func (*BoolQuery) Build

func (q *BoolQuery) Build() map[string]interface{}

func (*BoolQuery) Filter

func (q *BoolQuery) Filter(query interface{}) *BoolQuery

func (*BoolQuery) Must

func (q *BoolQuery) Must(query interface{}) *BoolQuery

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg elasticsearch.Config) (*Client, error)

func (*Client) Count

func (c *Client) Count(ctx context.Context, index string, query elastic.Query) (int64, error)

func (*Client) Scroll

func (c *Client) Scroll(index string, size int, query elastic.Query) *ScrollService

func (*Client) Stop

func (c *Client) Stop()

type MatchAllQuery

type MatchAllQuery struct {
	// contains filtered or unexported fields
}

func NewMatchAllQuery

func NewMatchAllQuery() *MatchAllQuery

func (*MatchAllQuery) Build

func (q *MatchAllQuery) Build() map[string]interface{}

type QueryBuilder

type QueryBuilder struct {
	// contains filtered or unexported fields
}

func NewQueryBuilder

func NewQueryBuilder() *QueryBuilder

func (*QueryBuilder) Build

func (q *QueryBuilder) Build() map[string]interface{}

type QueryStringQuery

type QueryStringQuery struct {
	// contains filtered or unexported fields
}

func NewQueryStringQuery

func NewQueryStringQuery(query string) *QueryStringQuery

func (*QueryStringQuery) Build

func (q *QueryStringQuery) Build() map[string]interface{}

type RangeQuery

type RangeQuery struct {
	// contains filtered or unexported fields
}

func NewRangeQuery

func NewRangeQuery(field string) *RangeQuery

func (*RangeQuery) Build

func (q *RangeQuery) Build() map[string]interface{}

func (*RangeQuery) Gte

func (q *RangeQuery) Gte(value string) *RangeQuery

func (*RangeQuery) Lte

func (q *RangeQuery) Lte(value string) *RangeQuery

type RawStringQuery

type RawStringQuery struct {
	// contains filtered or unexported fields
}

func NewRawStringQuery

func NewRawStringQuery(rawQuery string) *RawStringQuery

func (*RawStringQuery) Build

func (q *RawStringQuery) Build() map[string]interface{}

type ScrollService

type ScrollService struct {
	// contains filtered or unexported fields
}

func (*ScrollService) Clear

func (s *ScrollService) Clear(ctx context.Context) error

func (*ScrollService) Do

func (*ScrollService) FetchSourceContext

func (s *ScrollService) FetchSourceContext(includeFields []string) *ScrollService

type SearchHit

type SearchHit struct {
	// contains filtered or unexported fields
}

func (*SearchHit) GetSource

func (h *SearchHit) GetSource() []byte

type SearchResult

type SearchResult struct {
	// contains filtered or unexported fields
}

func (*SearchResult) Hits

func (r *SearchResult) Hits() []SearchHit

func (*SearchResult) Total

func (r *SearchResult) Total() int64

Jump to

Keyboard shortcuts

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