pub struct VectorStoragePolicy {
pub column_name: String,
pub dim: u32,
pub metric: VectorMetric,
pub precision: VectorPrecision,
pub pq: Option<PQConfig>,
pub keep_raw_for_reranking: bool,
pub pre_normalize: bool,
pub hnsw_m: Option<u32>,
pub hnsw_ef_construction: Option<u32>,
pub rabitq: Option<RaBitQConfig>,
}Expand description
Vector storage configuration applied at table creation time. Stored in Iceberg metadata.json properties.
Fields§
§column_name: String§dim: u32§metric: VectorMetric§precision: VectorPrecision§pq: Option<PQConfig>§keep_raw_for_reranking: bool§pre_normalize: boolNormalize each input vector to unit L2 length before indexing. Enables the NormalizedCosine fast path in HNSW: distance = 1 - dot(a, b), no sqrt, ~2× faster distance computation. Semantics unchanged — same top-k results as Cosine. Most embedding models (OpenAI, Cohere, etc.) produce nearly-unit vectors; enabling this adds negligible write overhead.
hnsw_m: Option<u32>HNSW M parameter — connections per node. None = default (16).
Higher M → better recall, more memory, slower build.
Recommended values: 8 (low-memory), 16 (default), 32 (high-recall), 64 (max).
hnsw_ef_construction: Option<u32>HNSW ef_construction — candidate pool size during build. None = default (150).
Higher ef_construction → better graph quality, slower build.
Recommended values: 100 (fast), 150 (default), 200 (quality), 400 (max quality).
rabitq: Option<RaBitQConfig>RaBitQ configuration. When set, the file writer embeds a RaBitQ flat index
instead of HNSW. Best for workloads that require extreme storage compression
(1 bit/dim = 16× smaller than F16) with better recall than naive binary
quantization. Use rerank_factor ≥ 3 at search time for full precision.
Implementations§
Source§impl VectorStoragePolicy
impl VectorStoragePolicy
pub fn default_f16(column: &str, dim: u32, metric: VectorMetric) -> Self
Trait Implementations§
Source§impl Clone for VectorStoragePolicy
impl Clone for VectorStoragePolicy
Source§fn clone(&self) -> VectorStoragePolicy
fn clone(&self) -> VectorStoragePolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more