(s: &str)
| 19 | |
| 20 | impl 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. |