Skip to content

Commit 76f2295

Browse files
committed
formatting
1 parent 09af318 commit 76f2295

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

articles/search/vector-search-filters.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,21 @@ ms.date: 08/19/2024
1414

1515
# Add a filter in a vector query in Azure AI Search
1616

17-
You can define a vector query request that includes a [filter expression](search-filters.md) to add inclusion or exclusion criteria to your queries.
17+
You can define a vector query request that includes a [filter expression](search-filters.md) to add inclusion or exclusion criteria to your queries. In this article, learn how to:
1818

19-
In this article, learn how to:
20-
21-
- Define a `filter` expression
22-
- Set the `vectorFilterMode` to control whether the filter executes before or after the query.
19+
> [!div class="checklist"]
20+
> - [Define a `filter` expression](#define-a-filter)
21+
> - [Set the `vectorFilterMode` for pre-query or post-query filtering](#set-the-vectorfiltermode)
2322
2423
This article uses REST for illustration. For code samples in other languages, see the [azure-search-vector-samples](https://github.com/Azure/azure-search-vector-samples) GitHub repository for end-to-end solutions that include vector queries.
2524

2625
You can also use [Search Explorer](search-get-started-portal-import-vectors.md#check-results) in the Azure portal to query vector content. If you use the JSON view, you can add filters and specify the filter mode.
2726

2827
## How filtering works in a vector query
2928

30-
Filters apply to `filterable` nonvector fields, either a string field or numeric, and are useful for including or excluding search documents. Although a vector field isn't filterable itself, filters can be applied to other fields in the same index, including or excluding the documents that also contain vector fields.
29+
Filters apply to `filterable` nonvector fields, either a string field or numeric, to include or exclude search documents based on filter criteria. Although a vector field isn't filterable itself, filters can be applied to other fields in the same index, including or excluding the documents that also contain vector fields.
3130

32-
Filters can be applied before the query executes, or after query execution to filter search results. Set the `vectorFilterMode`
31+
Filters are applied before or after query execution based on the `vectorFilterMode` parameter.
3332

3433
## Define a filter
3534

@@ -121,7 +120,9 @@ The vectorFilterMode query parameter determines whether the filter is applied be
121120

122121
### Use prefilter mode
123122

124-
Prefiltering applies filters before query execution, reducing the search surface area over which the vector search algorithm looks for similar content. In a vector query, `preFilter` is the default.
123+
Prefiltering applies filters before query execution, reducing the search surface area over which the vector search algorithm looks for similar content.
124+
125+
In a vector query, `preFilter` is the default.
125126

126127
:::image type="content" source="media/vector-search-filters/pre-filter.svg" alt-text="Diagram of prefilters." border="true" lightbox="media/vector-search-filters/pre-filter.png":::
127128

0 commit comments

Comments
 (0)