Versions in this module Expand all Collapse all v2 v2.1.2 Nov 27, 2026 Changes in this version + func CloseIndex(ctx context.Context, name string) error + func DeleteIndex(ctx context.Context, name string) error + func GetIndexSettings(ctx context.Context, name string) (map[string]interface{}, error) + func IndexExists(ctx context.Context, name string) (bool, error) + func OpenIndex(ctx context.Context, name string) error + func RefreshIndex(ctx context.Context, names ...string) error + type ConflictStrategy int + const MostCommon + const MostPermissive + const MostRecent + const Strict + type FieldInfo struct + AllowsMatch bool + AllowsTerm bool + BaseField string + ConflictTypes map[string][]string + Fields map[string]string + HasConflict bool + SourceIndices []string + Type string + type FieldMapper struct + func NewFieldMapper(opts ...MapperOption) *FieldMapper + func (f *FieldMapper) Clear() + func (f *FieldMapper) GetMergedMapping(ctx context.Context, indexPattern string) (*MergedMapping, error) + func (f *FieldMapper) Invalidate(pattern string) + type IndexInfo struct + Aliases map[string]interface{} + Mappings map[string]interface{} + Name string + Settings map[string]interface{} + func GetIndex(ctx context.Context, name string) (*IndexInfo, error) + type IndexSettingsUpdater struct + func NewIndexSettingsUpdater(ctx context.Context, index string) *IndexSettingsUpdater + func (u *IndexSettingsUpdater) CustomSetting(key string, value interface{}) *IndexSettingsUpdater + func (u *IndexSettingsUpdater) MaxResultWindow(size int) *IndexSettingsUpdater + func (u *IndexSettingsUpdater) RefreshInterval(interval string) *IndexSettingsUpdater + func (u *IndexSettingsUpdater) Replicas(n int) *IndexSettingsUpdater + func (u *IndexSettingsUpdater) Update() error + type IndexStats struct + DocsCount int64 + DocsDeleted int64 + PrimaryShards int + ReplicaShards int + StoreSizeBytes int64 + func GetIndexStats(ctx context.Context, name string) (*IndexStats, error) + type MapperOption func(*MappingCache) + func WithCacheTTL(ttl time.Duration) MapperOption + func WithConflictStrategy(strategy ConflictStrategy) MapperOption + func WithMaxCacheSize(size int) MapperOption + func WithStrictMode(strict bool) MapperOption + type MappingBuilder struct + func NewMappingBuilder(ctx context.Context, index string) *MappingBuilder + func (b *MappingBuilder) AddBooleanField(name string) *MappingBuilder + func (b *MappingBuilder) AddDateField(name string, format string) *MappingBuilder + func (b *MappingBuilder) AddDoubleField(name string) *MappingBuilder + func (b *MappingBuilder) AddField(name string, fieldType string) *MappingBuilder + func (b *MappingBuilder) AddFloatField(name string) *MappingBuilder + func (b *MappingBuilder) AddIntegerField(name string) *MappingBuilder + func (b *MappingBuilder) AddKNNVectorField(name string, dimension int, method *KNNMethod) *MappingBuilder + func (b *MappingBuilder) AddKeywordField(name string) *MappingBuilder + func (b *MappingBuilder) AddLongField(name string) *MappingBuilder + func (b *MappingBuilder) AddNestedField(name string, properties map[string]MappingProperty) *MappingBuilder + func (b *MappingBuilder) AddObjectField(name string, properties map[string]MappingProperty) *MappingBuilder + func (b *MappingBuilder) AddProperty(name string, property MappingProperty) *MappingBuilder + func (b *MappingBuilder) AddTextField(name string, analyzer string) *MappingBuilder + func (b *MappingBuilder) Build() (map[string]interface{}, error) + func (b *MappingBuilder) BuildWithErrors() (map[string]interface{}, []error) + func (b *MappingBuilder) Ensure() error + type MappingCache struct + func (c *MappingCache) Clear() + func (c *MappingCache) GetOrFetch(ctx context.Context, pattern string) (*MergedMapping, error) + func (c *MappingCache) Invalidate(pattern string) + type MergedMapping struct + ConflictCount int + FetchedAt time.Time + Fields map[string]FieldInfo + IndexPattern string + Indices []string + func (m *MergedMapping) GetConflicts() []FieldInfo + func (m *MergedMapping) GetFieldInfo(field string) (FieldInfo, bool) + func (m *MergedMapping) HasConflicts() bool + func (m *MergedMapping) ResolveFieldName(field string, queryType QueryType) (string, error) + type QueryType int + const QueryTypeAggregation + const QueryTypeExists + const QueryTypeFuzzy + const QueryTypeMatch + const QueryTypeMatchPhrase + const QueryTypeMatchPhrasePrefix + const QueryTypePrefix + const QueryTypeRange + const QueryTypeRegexp + const QueryTypeSort + const QueryTypeTerm + const QueryTypeTerms + const QueryTypeWildcard