Documentation ¶
Index ¶
- type Aliases
- type AliasesFunc
- type Analyze
- type ComponentTemplate
- type DynamicTemplate
- type Highlight
- type Idle
- type Mapping
- type Mappings
- type MappingsFunc
- func WithDateDetection(dateDetection *bool) MappingsFunc
- func WithDynamicDateFormats(format string) MappingsFunc
- func WithDynamicTemplates(dynamicTemplates []map[string]DynamicTemplate) MappingsFunc
- func WithNumberDetection(numericDetection bool) MappingsFunc
- func WithProperties(properties map[string]interface{}) MappingsFunc
- type Properties
- type Query
- type RetentionLease
- type Routing
- type Runtime
- type Search
- type Settings
- type SettingsFunc
- type SoftDeletes
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aliases ¶
type Aliases map[string]interface{}
func NewAliases ¶
func NewAliases(aliasesFunc ...AliasesFunc) Aliases
type AliasesFunc ¶
type AliasesFunc func(aliases Aliases)
type Analyze ¶
type Analyze struct { // default to 10000 MaxTokenCount int `json:"max_token_count,omitempty"` }
type ComponentTemplate ¶
type ComponentTemplate struct { Template Template `json:"template"` Version string `json:"version,omitempty"` }
func (ComponentTemplate) Marshal ¶
func (c ComponentTemplate) Marshal() ([]byte, error)
type DynamicTemplate ¶
type DynamicTemplate struct { // The match conditions MatchMappingType string `json:"match_mapping_type,omitempty"` Match string `json:"match,omitempty"` MatchPattern string `json:"match_pattern,omitempty"` UnMatch string `json:"unmatch,omitempty"` PatchMatch string `json:"patch_match,omitempty"` PatchUnMatch string `json:"patch_unmatch,omitempty"` // Runtime Field Runtime *Runtime `json:"runtime,omitempty"` // The mapping that the matched field should use. Mapping *Mapping `json:"mapping,omitempty"` }
type Highlight ¶
type Highlight struct { // default to 1000000 MaxAnalyzeOffset int `json:"max_analyze_offset,omitempty"` }
type Mappings ¶
type Mappings struct { DateDetection *bool `json:"date_detection,omitempty"` DynamicDateFormats string `json:"dynamic_date_formats,omitempty"` NumericDetection *bool `json:"numeric_detection,omitempty"` // Dynamic Mapping DynamicTemplates []map[string]DynamicTemplate `json:"dynamic_templates,omitempty"` // Explicit Mapping Properties Properties `json:"properties,omitempty"` }
func NewMappings ¶
func NewMappings(mappingsFunc ...MappingsFunc) *Mappings
type MappingsFunc ¶
type MappingsFunc func(mappings *Mappings)
func WithDateDetection ¶
func WithDateDetection(dateDetection *bool) MappingsFunc
func WithDynamicDateFormats ¶
func WithDynamicDateFormats(format string) MappingsFunc
func WithDynamicTemplates ¶
func WithDynamicTemplates(dynamicTemplates []map[string]DynamicTemplate) MappingsFunc
func WithNumberDetection ¶
func WithNumberDetection(numericDetection bool) MappingsFunc
func WithProperties ¶
func WithProperties(properties map[string]interface{}) MappingsFunc
type Properties ¶
type Properties map[string]interface{}
func (Properties) Extend ¶
func (p Properties) Extend(properties Properties) Properties
type RetentionLease ¶
type RetentionLease struct { // default to 12h Period string `json:"period"` }
type Settings ¶
type Settings struct { // static index settings // default to 1 NumberOfShards int `json:"number_of_shards,omitempty"` NumberOfRoutingShards int `json:"number_of_routing_shards,omitempty"` Codec string `json:"codec,omitempty"` RoutingPartitionSize int `json:"routing_partition_size,omitempty"` SoftDeletes *SoftDeletes `json:"soft_deletes,omitempty"` LoadFixedBitsetFiltersEagerly *bool `json:"load_fixed_bitset_filters_eagerly,omitempty"` // dynamic index settings // default to 1 NumberOfReplicas int `json:"number_of_replicas,omitempty"` AutoExpandReplicas *bool `json:"auto_expand_replicas,omitempty"` Search *Search `json:"search,omitempty"` // default to 1s RefreshInterval int `json:"refresh_interval,omitempty"` MaxResultWindow int `json:"max_result_window,omitempty"` MaxInnerResultWindow int `json:"max_inner_result_window,omitempty"` MaxReScoreWindow int `json:"max_rescore_window,omitempty"` // default to 100 MaxDocValueFieldsSearch int `json:"max_docvalue_fields_search,omitempty"` // default to 32 MaxScriptFields int `json:"max_script_fields,omitempty"` // default to 1 MaxNgrmDiff int `json:"max_ngrm_diff,omitempty"` // default to 3 MaxShingleDiff int `json:"max_shingle_diff,omitempty"` MaxRefreshListeners int `json:"max_refresh_listeners,omitempty"` Analyze *Analyze `json:"analyze,omitempty"` Highlight *Highlight `json:"highlight,omitempty"` // default to 65536 MaxTermsCount int `json:"max_terms_count,omitempty"` MaxRegexLength int `json:"max_regex_length,omitempty"` Query *Query `json:"query,omitempty"` Routing *Routing `json:"routing,omitempty"` // default to 60s GcDeletes string `json:"gc_deletes,omitempty"` DefaultPipeline string `json:"default_pipeline,omitempty"` FinalPipeline string `json:"final_pipeline,omitempty"` Hidden *bool `json:"hidden,omitempty"` Indices *ilm.ClusterLevelSettings `json:"indices,omitempty"` Index *ilm.IndexLevelSettings `json:"index,omitempty"` }
func NewIndexSetting ¶
func NewIndexSetting(settingsFunc ...SettingsFunc) *Settings
type SettingsFunc ¶
type SettingsFunc func(settings *Settings)
func WithClusterIndexSettings ¶
func WithClusterIndexSettings(historyIndexEnabled bool, pollInterval int, unit unit.TimeUnit) SettingsFunc
func WithIndexSettings ¶
func WithIndexSettings(index *ilm.IndexLevelSettings) SettingsFunc
func WithNumberOfReplicas ¶
func WithNumberOfReplicas(replicas int) SettingsFunc
func WithNumberOfShards ¶
func WithNumberOfShards(shards int) SettingsFunc
type SoftDeletes ¶
type SoftDeletes struct {
RetentionLease *RetentionLease `json:"retention_lease,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.