MCPcopy Create free account
hub / github.com/antgroup/vsag / Index

Method Index

python_bindings/binding.cpp:136–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134class Index {
135public:
136 Index(std::string name, const std::string& parameters) {
137 if (auto index = vsag::Factory::CreateIndex(name, parameters)) {
138 index_ = index.value();
139 } else {
140 vsag::Error error_code = index.error();
141 if (error_code.type == vsag::ErrorType::UNSUPPORTED_INDEX) {
142 throw std::runtime_error("error type: UNSUPPORTED_INDEX");
143 } else if (error_code.type == vsag::ErrorType::INVALID_ARGUMENT) {
144 throw std::runtime_error("error type: invalid_parameter");
145 } else {
146 throw std::runtime_error("error type: unexpectedError");
147 }
148 }
149 }
150
151public:
152 void

Callers 1

FactoryIndexMethod · 0.45

Calls 1

valueMethod · 0.80

Tested by 1

FactoryIndexMethod · 0.36