Categorygithub.com/wubin1989/go-esutils/v2
modulepackage
2.0.0
Repository: https://github.com/wubin1989/go-esutils.git
Documentation: pkg.go.dev

# README

go-esutils

GoDoc Go codecov Go Report Card Release License: MIT


# Functions

NewEs creates an Es instance.
NewMapping return es mapping json string from mp.
WithClient sets client.
WithLogger sets logger.
WithPassword sets password.
WithType set es type.
WithUrls set urls.
WithUsername sets username.

# Constants

BOOL represents bool field type.
DATE represents date field type.
DOUBLE represents double field type.
EXISTS https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-prefix-query.html.
FLOAT represents float field type.
INTEGER represents integer field type.
KEYWORD represents keyword field type.
LONG represents long field type.
MATCHPHRASE represents match_phrase query.
MUST represents must query.
MUSTNOT represents must_not query.
PREFIX represents prefix query.
RANGE represents range query.
SHORT represents short field type.
SHOULD represents should query.
TERMS represents terms query.
TEXT represents text field type.
WILDCARD https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-wildcard-query.html.

# Structs

Base defines es index and type.
Es defines properties for connecting to an es instance.
Field defines a es field.
MappingPayload defines request payload for es index mapping.
PageResult represents result of pagination.
Paging defines pagination query conditions.
QueryCond defines query conditions.
Sort defines sort condition.

# Interfaces

IBase wraps functions for getting es index and type.

# Type aliases

EsOption represents functions for changing Es properties.