Repository navigation
v0.9.3
Summary
- Query-time filtering: an optional
filteronPOST /ns/{namespace}/query(#84, contributed by @hev). A DataFusion SQL predicate applied through LanceDB as a prefilter, before vector ranking, full-text scoring, or hybrid fusion. A filtered vector query returns up tokneighbours that satisfy the predicate rather than post-filtering an already-selected top-k, so"filter": "id > 1000"or a predicate over_ingested_atnarrows the search itself. The predicate uses the same SQL dialect as/list. The embedded Python package mirrors it withsearch(filter=...). - Error handling splits by cause. A bad predicate returns
400(a parse error, an unknown column, a type mismatch, an unknown function, or an unsupported operator), while a storage or IO failure on a filtered query stays500, so an object-store timeout is not misreported as a bad predicate. Some parseable-but-unimplemented predicate syntax makes Lance's planner panic; that is caught on the filtered path and returned as a400rather than unwinding the request. - Caching note.
filterparticipates in the exact result cache key, andsemantic_cache.enabledrejects filtered requests in v1. Predicates are cached by their exact text, so a volatile function such asnow()orrandom()in a filter can keep returning a cached earlier result until the next write (tracked in #89); use a fixed bound instead.
This is Part 1 of #84. The scalar-attribute columns and the /facet endpoint from that issue are not in this release; #84 stays open to track them.
Documentation
- API reference for the
filterfield: https://firnflow.io/api.html - Filtering search (README): https://github.com/gordonmurray/firnflow#readme
Image
ghcr.io/gordonmurray/firnflow:0.9.3