indexmeta

package
v1.0.1-rel-01 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: AFL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EsIndexMeta

type EsIndexMeta struct {
	IndexName     string                      `json:"index_name"`
	Properties    PropertiesDto               `json:"-"`
	FieldTypeInfo map[string]string           `json:"field_type_info"`
	EsClient      *ichubelastic.ElasticClient `json:"-"`
}

func NewEsIndexMeta

func NewEsIndexMeta() *EsIndexMeta

func (*EsIndexMeta) AddField

func (this *EsIndexMeta) AddField(name, Type string)

func (*EsIndexMeta) FindFieldType

func (this *EsIndexMeta) FindFieldType(field string) string

func (*EsIndexMeta) IfDouble

func (this *EsIndexMeta) IfDouble(field string) bool

func (*EsIndexMeta) IfLong

func (this *EsIndexMeta) IfLong(field string) bool

func (*EsIndexMeta) ParseFiledType

func (this *EsIndexMeta) ParseFiledType(indexName string) (map[string]any, error)

func (*EsIndexMeta) SetIndexName

func (this *EsIndexMeta) SetIndexName(index string)

func (*EsIndexMeta) ToMapProp

func (this *EsIndexMeta) ToMapProp() map[string]any

func (*EsIndexMeta) ToMapping

func (this *EsIndexMeta) ToMapping() map[string]any

func (*EsIndexMeta) ToMappingProp

func (this *EsIndexMeta) ToMappingProp() string

func (*EsIndexMeta) ToMappingStr

func (this *EsIndexMeta) ToMappingStr() string

func (*EsIndexMeta) ToMappings

func (this *EsIndexMeta) ToMappings() map[string]any

type Fields

type Fields struct {
	Keyword Keyword `json:"keyword,omitempty"`
}

func NewFields

func NewFields() *Fields

type Keyword

type Keyword struct {
	IgnoreAbove int    `json:"ignore_above"`
	Type        string `json:"type"`
}

type MappingField

type MappingField struct {
	Fields *Fields `json:"fields,omitempty"`
	Type   string  `json:"type"`
}

func NewMappingField

func NewMappingField() *MappingField

type PropertiesDto

type PropertiesDto map[string]*MappingField

Jump to

Keyboard shortcuts

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