Build IVF-PQ params from this config.
(&self)
| 65 | impl IndexConfig { |
| 66 | /// Build IVF-PQ params from this config. |
| 67 | pub fn to_ivf_params(&self) -> crate::ivf::IvfPqParams { |
| 68 | crate::ivf::IvfPqParams { |
| 69 | n_cells: self.ivf_cells, |
| 70 | pq_m: self.pq_m, |
| 71 | pq_k: 256, |
| 72 | nprobe: self.ivf_nprobe, |
| 73 | metric: self.hnsw.metric, |
| 74 | } |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | #[cfg(test)] |