Documentation ¶
Index ¶
- Variables
- func BulkIndex(ctx context.Context, transport esapi.Transport, index, documentID string, ...) (*esapi.Response, error)
- func CreateAlias(ctx context.Context, esClient *elasticsearch.Client, indexes []string, ...) (*esapi.Response, error)
- func CreateIndex(ctx context.Context, esClient *elasticsearch.Client, name string, data []byte) (*esapi.Response, error)
- func Delete(ctx context.Context, transport esapi.Transport, index, documentID string) (*esapi.Response, error)
- func Exists(ctx context.Context, esClient *elasticsearch.Client, indexes []string) (*esapi.Response, error)
- func Index(ctx context.Context, transport esapi.Transport, index, documentID string, ...) (*esapi.Response, error)
- func Info(ctx context.Context, esClient *elasticsearch.Client) (*esapi.Response, error)
- func Int32Pointer(v int32) *int32
- func Int64Pointer(v int64) *int64
- func IntPointer(v int) *int
- func MappingIndex(ctx context.Context, esClient *elasticsearch.Client, indexName string, ...) error
- func NewElasticSearchClient(cfg *common_utils.BaseConfig) (*elasticsearch.Client, error)
- func Search(ctx context.Context, esClient *elasticsearch.Client, index string, data any) (*esapi.Response, error)
- func StringPointer(v string) *string
- func Update(ctx context.Context, transport esapi.Transport, index, documentID string, ...) (*esapi.Response, error)
- type Bool
- type Doc
- type ElasticIndex
- type EsHits
- type GetResponse
- type MultiMatch
- type MultiMatchQuery
- type MultiMatchSearchQuery
- type SearchListResponse
- type SearchMatchPrefixRequest
- type SearchOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMultiMatchSearchPrefix = errors.New("MultiMatchSearchPrefix response error")
)
Functions ¶
func CreateAlias ¶ added in v1.1.59
func CreateIndex ¶ added in v1.1.59
func Int32Pointer ¶
func Int64Pointer ¶
func IntPointer ¶
func MappingIndex ¶ added in v1.1.59
func NewElasticSearchClient ¶
func NewElasticSearchClient(cfg *common_utils.BaseConfig) (*elasticsearch.Client, error)
func StringPointer ¶
Types ¶
type Doc ¶
type Doc struct {
Doc any `json:"doc"`
}
Doc is update request wrapper for any json serializable data
type ElasticIndex ¶ added in v1.1.59
type ElasticIndex struct { Path string `mapstructure:"path" validate:"required"` Name string `mapstructure:"name" validate:"required"` Alias string `mapstructure:"alias" validate:"required"` }
func (*ElasticIndex) String ¶ added in v1.1.59
func (e *ElasticIndex) String() string
type GetResponse ¶
type MultiMatch ¶
type MultiMatchQuery ¶
type MultiMatchQuery struct {
MultiMatch MultiMatch `json:"multi_match"`
}
type MultiMatchSearchQuery ¶
type MultiMatchSearchQuery struct { Query MultiMatchQuery `json:"query"` Sort []any `json:"sort"` }
type SearchListResponse ¶
func SearchMatchPhrasePrefix ¶
func SearchMatchPhrasePrefix[T any](ctx context.Context, transport esapi.Transport, request SearchMatchPrefixRequest) (*SearchListResponse[T], error)
func SearchMultiMatchPrefix ¶
func SearchMultiMatchPrefix[T any](ctx context.Context, transport esapi.Transport, request SearchMatchPrefixRequest) (*SearchListResponse[T], error)
Click to show internal directories.
Click to hide internal directories.