indexer

package
v0.63.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

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, docRoot *insaneJSON.Root, id seq.ID, tokensStr ...string)

func (*TestDocProvider) Provide

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

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