indexer

package
v0.81.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 24 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsItBinaryEncodedMetaData

func IsItBinaryEncodedMetaData(b []byte) bool

func PutDocMetasCompressor

func PutDocMetasCompressor(c *DocsMetasCompressor)

Types

type DocsMetasCompressor

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

func GetDocsMetasCompressor

func GetDocsMetasCompressor(docsCompressLevel, metaCompressLevel int) *DocsMetasCompressor

func (*DocsMetasCompressor) CompressDocsAndMetas

func (c *DocsMetasCompressor) CompressDocsAndMetas(docs, meta []byte)

CompressDocsAndMetas prepare docs and meta blocks for bulk insert.

func (*DocsMetasCompressor) DocsMetas

func (c *DocsMetasCompressor) DocsMetas() ([]byte, []byte)

type MetaData

type MetaData struct {
	ID seq.ID
	// Size of an uncompressed document in bytes.
	Size   uint32
	Tokens []tokenizer.MetaToken
}

func (*MetaData) MarshalBinaryTo

func (m *MetaData) MarshalBinaryTo(b []byte) []byte

func (MetaData) String

func (m MetaData) String() string

String used in tests for human-readable output.

func (*MetaData) UnmarshalBinary

func (m *MetaData) UnmarshalBinary(b []byte) error

type Processor

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

Processor accumulates meta and docs from a single bulk returns bulk request ready to be sent to store

func NewProcessor

func NewProcessor(mapping seq.Mapping, tokenizers map[seq.TokenizerType]tokenizer.Tokenizer, drift, futureDrift time.Duration, index uint64) *Processor

func (*Processor) ProcessBulk

func (p *Processor) ProcessBulk(
	requestTime time.Time,
	dstDocs, dstMeta []byte,
	readNext func() ([]byte, error),
) (int, []byte, []byte, error)

func (*Processor) ProcessDoc

func (p *Processor) ProcessDoc(doc []byte, requestTime time.Time) ([]byte, []MetaData, error)

type TestDocProvider

type TestDocProvider struct {
	DocCount int
	Docs     []byte
	Metas    []byte
	// contains filtered or unexported fields
}

func NewTestDocProvider

func NewTestDocProvider() *TestDocProvider

func (*TestDocProvider) Append

func (dp *TestDocProvider) Append(doc []byte, id seq.ID, tokensStr ...string)

func (*TestDocProvider) Provide

func (dp *TestDocProvider) Provide() (storage.DocBlock, storage.WalBlock)

func (*TestDocProvider) TryReset

func (dp *TestDocProvider) TryReset()

Jump to

Keyboard shortcuts

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