MCPcopy Create free account
hub / github.com/alibaba/zvec / insert_docs

Method insert_docs

tests/db/sqlengine/fts_multi_segment_test.cc:166–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164 };
165
166 static void insert_docs(const Segment::Ptr &segment,
167 const std::string &pk_prefix,
168 const std::vector<Entry> &entries) {
169 for (size_t i = 0; i < entries.size(); ++i) {
170 Doc doc;
171 doc.set_pk(pk_prefix + std::to_string(i));
172 doc.set_doc_id(i);
173 doc.set<std::string>("content", entries[i].content);
174 auto status = segment->insert(doc);
175 ASSERT_TRUE(status.ok())
176 << pk_prefix << i << " insert failed: " << status.c_str();
177 }
178 }
179
180 protected:
181 static inline std::string root_path_ = "./fts_multi_segment_test_collection";

Callers

nothing calls this directly

Calls 5

c_strMethod · 0.80
to_stringFunction · 0.50
sizeMethod · 0.45
insertMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected