Skip to content

v0.9.6

Latest

Choose a tag to compare

@gordonmurray gordonmurray released this 03 Sep 13:57
· 10 commits to main since this release

Added

Exact nearest-neighbour query (exact: true on POST /ns/{namespace}/query)

Passes bypass_vector_index() to LanceDB, scanning all rows rather than probing the IVF_PQ index. Returns exact nearest neighbours instead of the approximate result the index produces.

The main use case is recall measurement: send the same query twice, once with exact: true to get ground truth and once without to get the indexed result, then compare the two result sets. The overlap is recall@k for the indexed path. This gives a clean, API-native alternative to running a separate brute-force pass outside Firn.

Two validation rules prevent ambiguous requests:

  • exact: true with nprobes set returns 400.
  • exact: true with no vector field, a text field, or a multivector field returns 400.

Exact queries bypass both the exact result cache and the semantic sidecar and always run against the backend. The field participates in the cache key so an exact result cannot collide with an approximate result for the same query if caching is later enabled on this path.

Closes #113.

Attribute columns on namespaces (Part 2 of #84)

POST /ns/{namespace}/attributes declares typed scalar columns on a namespace. /upsert rows then carry values in an attributes object of bare JSON scalars, and /query hits and /list rows return them in the same shape. Supported types: string, int, float, bool. A declared column can be indexed with POST /ns/{namespace}/scalar-index, and GET /ns/{namespace} reports the declared set.

Declaring is additive and idempotent: re-sending a column with the same type commits nothing. Re-sending with a different type returns 400.

Python package

firn 0.2.2 ships alongside this release. search() gains exact=True under the same constraints as the REST field. pip install --upgrade firn.