Documentation
¶
Index ¶
- Constants
- Variables
- func FractionToString(f Fraction, fracType string) string
- func SearchMetric(params processor.SearchParams) *prometheus.HistogramVec
- type AggLimits
- type BatchExecutionConfig
- type Config
- type DocLocation
- type Fraction
- type Info
- func (s *Info) AddMID(mid uint64)
- func (s *Info) BuildDistribution(mids []uint64)
- func (s *Info) FullSize() uint64
- func (s *Info) InitEmptyDistribution() bool
- func (s *Info) IsIntersecting(from, to seq.MID) bool
- func (s *Info) MarshalJSON() ([]byte, error)
- func (s *Info) Name() string
- func (s *Info) String() string
- func (s *Info) UnmarshalJSON(data []byte) error
- type MaterializedColumnAggConfig
- type QueryOptimizationConfig
- type SealParams
- type SearchConfig
- type SkipMaskProvider
- type Source
- type TokenLIDs
Constants ¶
Variables ¶
var ( FetcherStagesSeconds = promauto.NewHistogramVec(prometheus.HistogramOpts{ Namespace: "seq_db_store", Subsystem: "fetcher", Name: "fraction_stages_seconds", Buckets: metric.SecondsBuckets, Help: "Fetch processing time by stage", }, []string{"stage", "fraction_type"}) )
Functions ¶
func FractionToString ¶ added in v0.84.0
func SearchMetric ¶ added in v0.84.0
func SearchMetric( params processor.SearchParams, ) *prometheus.HistogramVec
Types ¶
type AggLimits ¶
type AggLimits struct {
MaxFieldTokens int // MaxFieldTokens max AggQuery.Field uniq values to parse.
MaxFieldValues int // MaxFieldValues max AggQuery.Field uniq values to hold per aggregation request.
MaxGroupTokens int // MaxGroupTokens max AggQuery.GroupBy unique values.
MaxTIDsPerFraction int // MaxTIDsPerFraction max number of tokens per fraction.
}
type BatchExecutionConfig ¶ added in v0.77.0
type Config ¶
type Config struct {
Search SearchConfig
SkipSortDocs bool
KeepWalFile bool
}
type Info ¶
type Info struct {
Path string `json:"name"`
Ver string `json:"ver"`
BinaryDataVer config.BinaryDataVersion `json:"binary_data_ver"`
DocsTotal uint32 `json:"docs_total"` // How many LIDs fraction has.
DocsOnDisk uint64 `json:"docs_on_disk"` // How much compressed docs data is stored on disk.
DocsRaw uint64 `json:"docs_raw"` // How much raw docs data is appended.
MetaOnDisk uint64 `json:"meta_on_disk"` // How much compressed metadata is stored on disk.
IndexOnDisk uint64 `json:"index_on_disk"` // How much compressed index data is stored on disk.
InfoOnDisk uint64 `json:"-"`
ConstRegularBlockSize int `json:"const_regular_block_size"`
ConstIDsPerBlock int `json:"const_ids_per_block"`
ConstLIDBlockCap int `json:"const_lid_block_cap"`
From seq.MID `json:"from"`
To seq.MID `json:"to"`
CreationTime uint64 `json:"creation_time"`
SealingTime uint64 `json:"sealing_time"`
Distribution *seq.MIDsDistribution `json:"distribution"`
}
func (*Info) BuildDistribution ¶
func (*Info) InitEmptyDistribution ¶
func (*Info) MarshalJSON ¶ added in v0.84.0
MarshalJSON implements custom JSON marshaling to always store From and To in milliseconds
func (*Info) UnmarshalJSON ¶ added in v0.84.0
UnmarshalJSON implements custom JSON unmarshaling to convert From and To from milliseconds to nanoseconds
type MaterializedColumnAggConfig ¶ added in v0.80.0
type MaterializedColumnAggConfig struct {
Enabled bool
}
type QueryOptimizationConfig ¶ added in v0.77.0
type QueryOptimizationConfig struct {
BatchExecution BatchExecutionConfig
MaterializedColumnAgg MaterializedColumnAggConfig
}
type SealParams ¶
type SealParams struct {
// DisableIndexCompression disables compression
// of index components (lids, ids, etc.)
DisableIndexCompression bool
IDsZstdLevel int
LIDsZstdLevel int
TokenListZstdLevel int
DocsPositionsZstdLevel int
TokenTableZstdLevel int
DocBlocksZstdLevel int // DocBlocksZstdLevel is the zstd compress level of each document block.
LIDBlockSize int
LIDsBitmapThreshold int // LIDsBitmapThreshold is the minimum number of LIDs in the lid list to serialize as bitmap.
TokenBlockSize int
TokenFreqThresholdPercentage float64
DocBlockSize int // DocBlockSize is decompressed payload size of document block.
}
type SearchConfig ¶
type SearchConfig struct {
AggLimits AggLimits
QueryOptimization QueryOptimizationConfig
}
type SkipMaskProvider ¶ added in v0.84.0
type Source ¶ added in v0.84.0
type Source interface {
// Info returns metadata describing this source.
Info() *Info
// ID returns an iterator over stored document identifiers paired with
// their positions, in descending [seq.ID] order.
IDs() iter.Seq2[DocLocation, error]
// BlockOffsets returns byte offsets to each document block
// within this source's `.docs` file.
BlockOffsets() []uint64
// TokenTriplet iterates over fields in lexicographic order.
// For each field, it yields tokens (lexicographically sorted)
// paired with the local document ID list for that token.
TokenTriplets() iter.Seq2[string, iter.Seq2[TokenLIDs, error]]
}
Source defines the data required to write all index files for a fraction.