Repository navigation
v0.2.0
Added
ShardedIndex128— sharded index with 128-bit UUID keys (bytes(16)/np.dtype('V16'))ShardedNphdIndex128— sharded NPHD index with 128-bit UUID keys for variable-length vectors_UuidKeyMixinproviding key-handling hooks, validation, and dispatch for all 128-bit subclassesScalableBloomFiltersupport forbyteskeys (add,contains,add_batch,contains_batch)- Strict validation on 128-bit key operations — wrong key type, length, or dtype raises
ValueError upsert()support for 128-bit UUID keys (singlebytes(16)and batchV16ndarray)- Python 3.10 and 3.11 support
Changed
- Extract 6 key-handling hook methods on
ShardedIndex(_is_single_key,_bloom_key,_bloom_keys,_normalize_batch_keys,_shard_batch_keys,_key_dtype) for subclass customization - Remove UUID workaround hooks — upstream usearch now supports
Index.vectors,Indexes.merge(), andIndexes.search()for uuid-keyed indexes - UUID sharded indexes now use C++-optimized
Indexesmulti-shard search instead of Python-side per-shard iteration - Make
_merge_batch_matchesand_apply_radius_filterdtype-safe usingnp.zeros_like+ mask-copy instead ofnp.where(..., 0)(V16 arrays do not support scalar 0 fill) - Rewrite
ShardedIndexedKeys.__array__to shard-aware concatenation preserving correct dtype - Use
serialized_lengthinstead ofstats.allocated_bytesfor shard rotation threshold check (exactly matches on-disk file size and is faster) - Amortize rotation size check to avoid O(n)
serialized_lengthcall on everyadd()
Fixed
- Fix
sizeproperty using wrong shard list — now sums_viewed_indexeswhich is always maintained - Enable
serialized_lengthproperty test (fixed upstream in usearch-iscc fork)
Full Changelog: 0.1.0...0.2.0