Overview

Document model

A row has an id, application attributes, and optionally a vector. Supply these fields in write requests.

Reserved attributes

The _hevlayer_* prefix belongs to the gateway. Do not set these attributes in client writes. Select your backend to see which attributes Layer manages.

AttributeTypePurpose
_hevlayer_upserted_atinteger (epoch ms)Server-stamped on row-producing writes through Layer. Records when the gateway received the write.
_hevlayer_shardintegerHash bucket assigned at write time (xxh64(id) % shard_count), present only on sharded namespaces. Lets the gateway scatter/gather a query across the shards of one namespace.

Initialize a namespace with layer init <namespace> --shards N to stamp new writes and backfill existing rows. Scatter/gather starts after layer.shard_lag_rows reaches zero.

esc