MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / parse

Method parse

nodedb-vector/src/index_config.rs:21–28  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

19
20impl IndexType {
21 pub fn parse(s: &str) -> Option<Self> {
22 match s.to_lowercase().as_str() {
23 "hnsw" | "" => Some(Self::Hnsw),
24 "hnsw_pq" => Some(Self::HnswPq),
25 "ivf_pq" => Some(Self::IvfPq),
26 _ => None,
27 }
28 }
29}
30
31/// Unified vector index configuration.

Callers

nothing calls this directly

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected