Azure AI Search global filter does not apply to vector queries, use filterOverride
Shows how to fix azure AI Search global filter does not apply to vector queries, use filterOverride. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
For hybrid queries, pass filterOverride in the vector query when the filter must constrain vector results too; the top-level filter only covers the text side. Also set k to at least 50 when using the semantic ranker, since it returns fewer results from too-small input sets.
Steps
- For hybrid queries, pass filterOverride in the vector query when the filter must constrain vector results too; the top-level filter only covers the text side. If results look unfiltered on the vector half, this is the first thing to check. Also set k to at least 50 when using the semantic ranker, since it returns fewer results from too-small input sets.
When to use
You are seeing this: If results look unfiltered on the vector half, this is the first thing to check. Use this skill when you run into "Azure AI Search global filter does not apply to vector queries, use filterOverride".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Edge cases
- Also set k to at least 50 when using the semantic ranker, since it returns fewer results from too-small input sets.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.