| 39 | static auto exe_end = ExecutorNode::Result(ExecutorNode::end); |
| 40 | |
| 41 | static IndexMap MakeIndexMap() { |
| 42 | auto f1 = FieldInfo("f1", std::make_unique<redis::TagFieldMetadata>()); |
| 43 | auto f2 = FieldInfo("f2", std::make_unique<redis::NumericFieldMetadata>()); |
| 44 | auto f3 = FieldInfo("f3", std::make_unique<redis::NumericFieldMetadata>()); |
| 45 | |
| 46 | auto hnsw_field_meta = std::make_unique<redis::HnswVectorFieldMetadata>(); |
| 47 | hnsw_field_meta->vector_type = redis::VectorType::FLOAT64; |
| 48 | hnsw_field_meta->dim = 3; |
| 49 | hnsw_field_meta->distance_metric = redis::DistanceMetric::L2; |
| 50 | auto f4 = FieldInfo("f4", std::move(hnsw_field_meta)); |
| 51 | |
| 52 | auto ia = std::make_unique<IndexInfo>("ia", redis::IndexMetadata(), "search_ns"); |
| 53 | ia->metadata.on_data_type = redis::IndexOnDataType::JSON; |
| 54 | ia->prefixes.prefixes.emplace_back("test2:"); |
| 55 | ia->prefixes.prefixes.emplace_back("test4:"); |
| 56 | ia->Add(std::move(f1)); |
| 57 | ia->Add(std::move(f2)); |
| 58 | ia->Add(std::move(f3)); |
| 59 | ia->Add(std::move(f4)); |
| 60 | |
| 61 | IndexMap res; |
| 62 | res.Insert(std::move(ia)); |
| 63 | return res; |
| 64 | } |
| 65 | |
| 66 | static auto index_map = MakeIndexMap(); |
| 67 |
no test coverage detected