Sets up the test fixture.
| 61 | public: |
| 62 | // Sets up the test fixture. |
| 63 | static void SetUpTestSuite() { |
| 64 | schema = std::make_shared<CollectionSchema>(); |
| 65 | auto &collection_schema = *schema; |
| 66 | collection_schema.set_name("collection"); |
| 67 | |
| 68 | // feature field |
| 69 | auto column1 = std::make_shared<FieldSchema>(); |
| 70 | auto vector_params = std::make_shared<FlatIndexParams>(MetricType::IP); |
| 71 | column1->set_name("face_feature"); |
| 72 | column1->set_index_params(vector_params); |
| 73 | column1->set_dimension(4); |
| 74 | column1->set_data_type(DataType::VECTOR_FP32); |
| 75 | collection_schema.add_field(column1); |
| 76 | |
| 77 | // invert field |
| 78 | auto column2 = std::make_shared<FieldSchema>(); |
| 79 | column2->set_name("age"); |
| 80 | column2->set_data_type(DataType::INT32); |
| 81 | column2->set_index_params(std::make_shared<InvertIndexParams>(false)); |
| 82 | collection_schema.add_field(column2); |
| 83 | } |
| 84 | |
| 85 | // Tears down the test fixture. |
| 86 | static void TearDownTestSuite() {} |
nothing calls this directly
no test coverage detected