(self)
| 94 | assert field.index_param.metric_type == MetricType.IP |
| 95 | |
| 96 | def test_custom(self): |
| 97 | field = VectorSchema( |
| 98 | name="vector", |
| 99 | data_type=DataType.VECTOR_INT8, |
| 100 | dimension=512, |
| 101 | index_param=HnswIndexParam( |
| 102 | metric_type=MetricType.COSINE, m=15, ef_construction=300 |
| 103 | ), |
| 104 | ) |
| 105 | assert field.name == "vector" |
| 106 | assert field.data_type == DataType.VECTOR_INT8 |
| 107 | assert field.index_param.metric_type == MetricType.COSINE |
| 108 | assert field.index_param.m == 15 |
| 109 | assert field.index_param.ef_construction == 300 |
| 110 | |
| 111 | def test_readonly(self): |
| 112 | field = VectorSchema( |
nothing calls this directly
no test coverage detected