Skip to content

v0.4.1 — id round-trips, prefetch, hook and config fixes

Latest

Choose a tag to compare

@dancixx dancixx released this 03 Oct 16:36

Fixed

  • Returned ids are accepted back. Results render every id as a string ('1'), including scroll's next_offset, but numeric strings were rejected as input. scroll({ offset: page.next_offset }) failed for numeric ids, and so did retrieve, deletePoints, setPayload*, clearPayload, upsert and has_id filters fed with ids from results. All of them now accept numeric strings.
  • One-element prefetch arrays keep their query. prefetch: [{ query, using }] failed with cannot have prefetches without a query: serde read the one-element array as a struct. Arrays of two or more were unaffected.
  • A non-object payload no longer crashes the app. upsert with an array, string or number payload hit an upstream panic that aborted the process; it now throws.
  • An invalid createVectorName config no longer wedges the shard. A config such as size: 0 reached the WAL, and every later write failed with Not recovered from previous error until the shard was reopened. The config is now validated first.
  • Partial hnsw_config / wal_options work. The TS types mark every field optional, but upstream required them all, so the README's hnsw_config: { m, ef_construct }, wal_options: { segment_capacity } and setHnswConfig({ m, ef_construct }) threw. Omitted fields now take the upstream defaults.
  • createShard creates a missing directory instead of failing on the WAL directory.
  • TS literals match the wire format: datatype: 'float32' | 'float16' | 'uint8' and multivector_config: { comparator: 'max_sim' }. The old 'Float16' / 'MaxSim' spellings never deserialized at runtime.
  • Hooks
    • Inline request objects, as in the README, no longer cause an infinite render loop in useSearch, useQuery, useQueryGroups, useSearchMatrix and useFacet. Requests are now compared by value; to re-run with an unchanged request, call the function the hook returns (search(), query(), …).
    • useShard({ create: true }) opens the existing shard on later launches instead of failing with path already contains segment data.
    • open() closes the previous handle first; a second handle failed on the WAL lock.
    • Hooks return and accept the same Shard / Bm25 classes as createShard / createBm25, so the full API is available and the two styles mix.
  • count() accepts a typed Filter.
  • Shard and BM25 creation errors no longer repeat their prefix (Failed to create shard: Failed to create shard: …).
  • Expo: the config plugin limits reactNativeArchitectures to arm64-v8a,x86_64, the ABIs the package ships libraries for. Android release builds with the default four ABIs failed to link.

Docs

  • README examples fixed: snapshot recovery (close the shard first, no shard.path), setVectorHnswConfig on a dense vector, keyword prefix matching, asQdrantError narrowing, scroll pagination, and the updateVectors line for a method that doesn't exist.

Full Changelog: v0.4.0...v0.4.1