consts

package
v0.0.0-...-04d6450 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package consts defines the global constants of Tatris

Index

Constants

View Source
const (
	TimestampField = "@timestamp"
	IDField        = "_id"
	SourceField    = "_source"
	IndexField     = "_index"
	TypeField      = "_type"
)
View Source
const (
	IndexLibBluge = "bluge"

	DirectoryFS   = "fs"
	DefaultFSPath = "/tmp/tatris/data"
	PathData      = "_data"
	PathMeta      = "_meta"
	PathWAL       = "_wal"
	PathCache     = "_cache"

	DirectoryOSS = "oss"
	PathOss      = "oss"
)
View Source
const (
	Dot          = "."
	Comma        = ","
	Asterisk     = "*"
	QuestionMark = "?"
	Empty        = ""
)
View Source
const (
	// StatusGreen means that all shards are allocated.
	StatusGreen = "green"
	// StatusYellow means that the primary shard is allocated but replicas are not.
	StatusYellow = "yellow"
	// StatusRed indicates that the specific shard is not allocated in the cluster.
	StatusRed = "red"
)

The index level status is controlled by the worst shard status. The cluster status is controlled by the worst index status. On the shard level:

View Source
const (
	// TypedKeysParam used in the elasticsearch sdk
	TypedKeysParam          = "typed_keys"
	TypedKeysParamValueTrue = "true"

	// TypedKeysDelimiter is a delimiter used when prefixing aggregation names with their type
	TypedKeysDelimiter = "#"

	TypedKeysStermsPrefix            = "sterms"
	TypedKeysFilterPrefix            = "filter"
	TypedKeysRangePrefix             = "range"
	TypedKeysDateRangePrefix         = "date_range"
	TypedKeysDateHistogramPrefix     = "date_histogram"
	TypedKeysHistogramPrefix         = "histogram"
	TypedKeysAutoDateHistogramPrefix = "auto_date_histogram"
	TypedKeysCountPrefix             = "value_count"
	TypedKeysAvgPrefix               = "avg"
	TypedKeysSumPrefix               = "sum"
	TypedKeysMaxPrefix               = "max"
	TypedKeysMinPrefix               = "min"
	TypedKeysWeightedAvgPrefix       = "weighted_avg"
	TypedKeysCardinalityPrefix       = "cardinality"
	TypedKeysPercentilesPrefix       = "tdigest_percentiles"
)
View Source
const (
	MappingFieldTypeInteger         = "integer"
	MappingFieldTypeLong            = "long"
	MappingFieldTypeFloat           = "float"
	MappingFieldTypeDouble          = "double"
	MappingFieldTypeShort           = "short"
	MappingFieldTypeByte            = "byte"
	MappingFieldTypeKeyword         = "keyword"
	MappingFieldTypeConstantKeyword = "constant_keyword"
	MappingFieldTypeBool            = "bool"
	MappingFieldTypeBoolean         = "boolean"
	MappingFieldTypeText            = "text"
	MappingFieldTypeMatchOnlyText   = "match_only_text"
	MappingFieldTypeDate            = "date"
)

field types supported by Tatris

View Source
const (
	LibFieldTypeNumeric = "numeric"
	LibFieldTypeKeyword = "keyword"
	LibFieldTypeBool    = "bool"
	LibFieldTypeText    = "text"
	LibFieldTypeDate    = "date"
)

field types supported by the underlying index library

View Source
const (
	JSONFieldTypeString  = "string"
	JSONFieldTypeLong    = "long"
	JSONFieldTypeDouble  = "double"
	JSONFieldTypeBoolean = "boolean"
	JSONFieldTypeDate    = "date"
)

JSON field types

View Source
const (
	StrictMappingMode  = "strict"
	IgnoreMappingMode  = "false"
	DynamicMappingMode = "true"
)

dynamic modes supported by Tatris

View Source
const ESVersion = "7.16.1"

ESVersion represents the tatris-compatible elasticsearch version, and some elsticsearch client tools need to obtain the elasticsearch version

View Source
const (
	TimeFmtWithoutSeparator = "20060102150405.999999999"
)

Variables

This section is empty.

Functions

func IsJSONFieldType

func IsJSONFieldType(t string) bool

func Version

func Version() string

Types

type Semver

type Semver struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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