Skip to content

Commit 6758938

Browse files
Fix misleading pre/post-filtering description (#191)
Generated-By: mintlify-agent Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
1 parent 657b2a7 commit 6758938

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

docs/search/filtering.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ While joint vector and metadata search at scale presents a significant challenge
1010
LanceDB achieves sub-100ms latency at thousands of QPS, enabling efficient vector search
1111
with filtering capabilities even on datasets containing billions of records.
1212

13-
**Pre-filtering is applied to top-k results by default** before executing the vector search. This narrow down the search space within large datasets, thereby reducing query latency.
14-
You can also use **post-filtering** to refine results after the vector search completes.
13+
**Pre-filtering** means LanceDB applies the metadata `where(...)` condition before running vector search, so the search only considers rows that already match the filter. **Post-filtering** means LanceDB runs vector search first and only then filters the returned candidates. Pre-filtering is enabled by default. In practice, pre-filtering is better when the filter is part of the result contract; post-filtering can be lower-latency for expensive or non-indexable filters, but it can return fewer than `limit` rows, or even zero, if the nearest neighbors do not pass the filter.
1514

1615
## Example: Metadata Filtering
1716

0 commit comments

Comments
 (0)