| 327 | } |
| 328 | |
| 329 | InnerIndexPtr |
| 330 | InnerIndexInterface::Clone(const IndexCommonParam& param) { |
| 331 | std::stringstream ss; |
| 332 | IOStreamWriter writer(ss); |
| 333 | this->Serialize(writer); |
| 334 | ss.seekg(0, std::ios::beg); |
| 335 | IOStreamReader reader(ss); |
| 336 | auto max_size = this->CalSerializeSize(); |
| 337 | BufferStreamReader buffer_reader(&reader, max_size, this->allocator_); |
| 338 | auto index = this->Fork(param); |
| 339 | index->Deserialize(buffer_reader); |
| 340 | return index; |
| 341 | } |
| 342 | |
| 343 | InnerIndexPtr |
| 344 | InnerIndexInterface::FastCreateIndex(const std::string& index_fast_str, |
nothing calls this directly
no test coverage detected