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

Function insert

python/tests/test_uniform_quantization.py:203–214  ·  view source on GitHub ↗
(start, end)

Source from the content-addressed store, hash-verified

201 collection = zvec.create_and_open(path=path, schema=schema)
202
203 def insert(start, end):
204 results = collection.insert(
205 [
206 Doc(
207 id=str(i),
208 fields={"ordinal": i},
209 vectors={"dense": vectors[i].tolist()},
210 )
211 for i in range(start, end)
212 ]
213 )
214 assert all(result.ok() for result in results)
215
216 def assert_searchable(count):
217 # Check both the trained segment and every subsequent raw-only block.

Callers 2

TESTFunction · 0.50

Calls 3

DocClass · 0.90
insertMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected