MossClient and MossSession.
DocumentInfo
A document stored in or returned from an index. Conforms toCodable.
Store an
Encodable value as the payload with the structured: initializer, and
read it back typed with decodedPayload(_:):
QueryOptions
See Querying for hybrid-search examples and
Exact / Graph Retrieval for the typed
Filter DSL and
parent grouping.
SearchResult
Returned byquery(...).
QueryResult
A single match within aSearchResult.
payload is the document’s verbatim structured payload (nil when it has none);
read it typed with decodedPayload(_:) — see
Verbatim structured payload.
Filter
A composable, typed metadata predicate used bygetDocs(where:) and
QueryOptions.filter. Serialized internally to the engine’s
filter format — no JSON to hand-write. See
the Filter DSL for examples.
greaterThan, lessThanOrEqual, …) are numeric-aware even
though metadata is stored as strings ("9" < "50"). .raw with invalid JSON
throws rather than silently matching everything.
FilterValue
A typed metadata value used inside aFilter. Literal-expressible, so
you can write "shoes", 27, 0.7, or false directly wherever a
FilterValue is expected.
ParentGrouping
Collapses sibling documents that share a parent id into one result per unit, assembling sibling text inorderField order (numeric-aware). Passed to
GetDocsOptions.groupByParent and
QueryOptions.groupByParent.
GetDocsOptions
Full-control input togetDocs(options:). Combine an id list,
a metadata filter, sorting, and parent grouping in one deterministic fetch.
ModelRef
Reference to an embedding model with version information. Surfaced onIndexInfo.
IndexInfo
Metadata about a cloud index. Returned bygetIndex and
listIndexes.
SessionOptions
Passed toMossClient.session(_:options:).
VectorQuantization
On-disk vector precision forSessionOptions, applied when a
session is persisted with MossSession.save(toCachePath:).
PushIndexResult
Returned byMossSession.pushIndex(). Poll
jobId with getJobStatus until
status is ready.
MutationResult
Returned by the cloud document operationscreateIndex,
addDocs, and
deleteDocs after the operation
completes.
RefreshResult
Returned byrefreshIndex.
JobStatus
Returned bygetJobStatus.
MemoryPressureLevel
Passed toonMemoryPressure.
MossError
Thrown for any failure reported by the underlying runtime. Conforms toLocalizedError, so error.localizedDescription returns the message.