You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/search/vector-search-filters.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,7 @@ The `vectorFilterMode` parameter determines when and how the filter is applied r
100
100
101
101
### Pre-filter
102
102
103
-
Prefiltering applies filters before query execution, which reduces the candidate set for the vector search algorithm. The top-`k` results are then selected from this filtered set. In a vector query, `preFilter` is the default mode because it favors recall and quality over latency.
103
+
Pre-filtering applies filters before query execution, which reduces the candidate set for the vector search algorithm. The top-`k` results are then selected from this filtered set. In a vector query, `preFilter` is the default mode because it favors recall and quality over latency.
104
104
105
105
1. On each shard, during HNSW traversal, apply the filter predicate when considering candidates, expanding the graph traversal until `k` candidates are found.
106
106
1. Pre-filtered local top-k results are produced per shard, which are aggregated into the global top-k.
@@ -111,7 +111,7 @@ Prefiltering applies filters before query execution, which reduces the candidate
111
111
112
112
### Post-filter
113
113
114
-
Postfiltering applies filters after query execution, which narrows the search results. This mode processes results within each shard and then merges the filtered results from all shards to produce the top-`k` results. As a result, you might receive documents that match the filter but aren't among the global top-`k` results.
114
+
Post-filtering applies filters after query execution, which narrows the search results. This mode processes results within each shard and then merges the filtered results from all shards to produce the top-`k` results. As a result, you might receive documents that match the filter but aren't among the global top-`k` results.
115
115
116
116
To use this option in a vector query, use `"vectorFilterMode": "postFilter"`.
117
117
@@ -125,7 +125,7 @@ To use this option in a vector query, use `"vectorFilterMode": "postFilter"`.
125
125
126
126
### Strict Post-filter (preview)
127
127
128
-
Strict postfiltering applies filters after identifying the global top-`k` results. This mode guarantees that the filtered results are always a subset of the unfiltered top `k`.
128
+
Strict post-filtering applies filters after identifying the global top-`k` results. This mode guarantees that the filtered results are always a subset of the unfiltered top `k`.
129
129
130
130
With strict postfiltering, highly selective filters or small `k` values can return zero results (even if matches exist) because only documents that match the filter within the global top `k` are returned. Don't use this mode if missing relevant results could have serious consequences, such as in healthcare or patent searches.
0 commit comments