Documentation
¶
Overview ¶
Package embeddingsource defines the input contract carried by managed vectors.
Index ¶
Constants ¶
const MetaKey = "__nornic_embedding_source"
MetaKey is reserved for the persisted consumed-source descriptor.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyIterator ¶
type KeyIterator struct {
// contains filtered or unexported fields
}
KeyIterator traverses validated names without allocation.
func (*KeyIterator) Next ¶
func (it *KeyIterator) Next() (string, bool)
Next returns the next name, or false after the last name.
type Keys ¶
type Keys struct {
// contains filtered or unexported fields
}
Keys is an immutable, validated view of encoded property names. Iterators borrow the persisted string; no shared mutable cache or selector slices exist.
func (Keys) Iterator ¶
func (k Keys) Iterator() KeyIterator
Iterator starts an independent traversal of the names.
type Source ¶
type Source struct {
Text bool
IncludeLabels bool
Include []string
Exclude []string
Properties []string
AllProperties bool
}
Source describes inputs consumed by one result, including its chunks. Text uses the recorded worker policy; Properties names whole node-property values, including absent keys whose later addition changes input. AllProperties is the conservative default for legacy structured APIs. Providers declare Text/Properties/AllProperties; the text builder supplies the captured policy.
func Read ¶
Read materializes an independently mutable Source for callers that need it. The storage hot path uses ReadView and never constructs selector slices.
func (Source) Metadata ¶
Metadata returns an immutable, codec-neutral snapshot. Its private v1 format is version:flags: followed by three counted, byte-length-prefixed key lists (include, exclude, properties). Flags are text=1, all=2, labels=4. Key bytes need no delimiter escaping. A string avoids repeated deep copies of a nested descriptor on every node/transaction copy; both JSON and msgpack preserve it.