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/includes/quickstarts/search-get-started-rbac-rest.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ author: haileytap
4
4
ms.author: haileytapia
5
5
ms.service: azure-ai-search
6
6
ms.topic: include
7
-
ms.date: 07/09/2025
7
+
ms.date: 08/13/2025
8
8
---
9
9
10
10
In this quickstart, you use role-based access control (RBAC) and Microsoft Entra ID to establish a keyless connection to your Azure AI Search service. You then use REST in Visual Studio Code to interact with your service.
@@ -33,10 +33,18 @@ To get your token:
33
33
34
34
1. On your local system, open a command-line tool.
35
35
36
-
1.Sign in to Azure. If you have multiple subscriptions, select the one whose ID you obtained in [Get service information](#get-service-information).
36
+
1.Check for the active tenant and subscription in your local environment.
37
37
38
38
```azurecli
39
-
az login
39
+
az account show
40
+
```
41
+
42
+
1. If the active subscription and tenant aren't valid for your search service, change the variables. You can check for the subscription ID on the search service overview page in the Azure portal. You can check for the tenant ID by clicking through to the subscription. Make a note of the values that are valid for your search service and run the following commands to update your local environment.
43
+
44
+
```azurecli
45
+
az account set --subscription <your-subscription-id>
Copy file name to clipboardExpand all lines: articles/search/index-similarity-and-scoring.md
+68-20Lines changed: 68 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,12 @@ ms.service: azure-ai-search
8
8
ms.custom:
9
9
- ignite-2023
10
10
ms.topic: conceptual
11
-
ms.date: 01/17/2025
11
+
ms.date: 08/13/2025
12
12
---
13
13
14
14
# Relevance in keyword search (BM25 scoring)
15
15
16
-
This article explains the BM25 relevance scoring algorithm used to compute search scores for [full text search](search-lucene-query-architecture.md). BM25 relevance is exclusive to full text search. Filter queries, autocomplete and suggested queries, wildcard search, and fuzzy search queries aren't scored or ranked for relevance.
16
+
This article explains the BM25 relevance scoring algorithm used to compute search scores for [full text search](search-lucene-query-architecture.md). BM25 relevance applies to full text search only. Filter queries, autocomplete and suggested queries, wildcard search, and fuzzy search queries aren't scored or ranked for relevance.
17
17
18
18
## Scoring algorithms used in full text search
19
19
@@ -133,40 +133,88 @@ In Azure AI Search, for keyword search and the text portion of a hybrid query, y
133
133
134
134
## featuresMode parameter (preview)
135
135
136
-
[Search Documents](/rest/api/searchservice/documents/search-post) requests support a featuresMode parameter that provides more detail about a BM25 relevance score at the field level. Whereas the `@searchScore` is calculated for the document all-up (how relevant is this document in the context of this query), featuresMode reveals information about individual fields, as expressed in a `@search.features` structure. The structure contains all fields used in the query (either specific fields through **searchFields** in a query, or all fields attributed as **searchable** in an index).
136
+
> [!NOTE]
137
+
> The `featuresMode` parameter isn't documented in the REST APIs, but you can use it on a preview REST API call to Search Documents for text (Keyword) search that's BM25-ranked.
138
+
139
+
[Search Documents (preview)](/rest/api/searchservice/documents/search-post?view=rest-searchservice-2025-05-01-preview&preserve-view=true) requests support a `featuresMode` parameter that provides more detail about a BM25 relevance score at the field level. Whereas the `@searchScore` is calculated for the document all-up (how relevant is this document in the context of this query), featuresMode reveals information about individual fields, as expressed in a `@search.features` structure. The structure contains all fields used in the query (either specific fields through **searchFields** in a query, or all fields attributed as **searchable** in an index).
140
+
141
+
Valid values for featuresMode:
142
+
143
+
+ "none" (default). No feature-level scoring details are returned.
144
+
+ "enabled". Returns detailed scoring breakdowns per field
137
145
138
146
For each field, `@search.features` give you the following values:
139
147
140
148
+ Number of unique tokens found in the field
141
149
+ Similarity score, or a measure of how similar the content of the field is, relative to the query term
142
150
+ Term frequency, or the number of times the query term was found in the field
143
151
144
-
For a query that targets the "description" and "title" fields, a response that includes `@search.features` might look like this:
152
+
This parameter is especially useful when you're trying to understand why certain documents rank higher or lower in search results. It helps explain how different fields contribute to the overall score.
153
+
154
+
For a query that targets a "description" field, a request might look like this:
155
+
156
+
```http
157
+
POST {{baseUrl}}/indexes/hotels-sample-index/docs/search?api-version=2025-05-01-preview HTTP/1.1
A response that includes `@search.features` might look like the following example.
145
171
146
172
```json
147
-
"value": [
148
-
{
149
-
"@search.score": 5.1958685,
150
-
"@search.features": {
151
-
"description": {
152
-
"uniqueTokenMatches": 1.0,
153
-
"similarityScore": 0.29541412,
154
-
"termFrequency" : 2
173
+
"value": [
174
+
{
175
+
"@search.score": 3.0860271,
176
+
"@search.features": {
177
+
"Description": {
178
+
"uniqueTokenMatches": 2.0,
179
+
"similarityScore": 3.0860272,
180
+
"termFrequency": 2.0
181
+
}
182
+
},
183
+
"HotelName": "Downtown Mix Hotel",
184
+
"Description": "Mix and mingle in the heart of the city. Shop and dine, mix and mingle in the heart of downtown, where fab lake views unite with a cheeky design.",
185
+
"Tags": [
186
+
"air conditioning",
187
+
"laundry service",
188
+
"free wifi"
189
+
]
190
+
},
191
+
{
192
+
"@search.score": 2.7294855,
193
+
"@search.features": {
194
+
"Description": {
195
+
"uniqueTokenMatches": 1.0,
196
+
"similarityScore": 1.6023184,
197
+
"termFrequency": 1.0
155
198
},
156
-
"title": {
157
-
"uniqueTokenMatches": 3.0,
158
-
"similarityScore": 1.75451557,
159
-
"termFrequency" : 6
199
+
"Tags": {
200
+
"uniqueTokenMatches": 1.0,
201
+
"similarityScore": 1.1271671,
202
+
"termFrequency": 1.0
160
203
}
204
+
},
205
+
"HotelName": "Ocean Water Resort & Spa",
206
+
"Description": "New Luxury Hotel for the vacation of a lifetime. Bay views from every room, location near the pier, rooftop pool, waterfront dining & more.",
207
+
"Tags": [
208
+
"view",
209
+
"pool",
210
+
"restaurant"
211
+
]
161
212
}
162
-
}
163
-
]
213
+
]
164
214
```
165
215
166
216
You can consume these data points in [custom scoring solutions](https://github.com/Azure-Samples/search-ranking-tutorial) or use the information to debug search relevance problems.
167
217
168
-
The featuresMode parameter isn't documented in the REST APIs, but you can use it on a preview REST API call to Search Documents for text (Keyword) search that's BM25-ranked.
169
-
170
218
## Number of ranked results in a full text query response
171
219
172
220
By default, if you aren't using pagination, the search engine returns the top 50 highest ranking matches for full text search. You can use the `top` parameter to return a smaller or larger number of items (up to 1,000 in a single response). You can use `skip` and `next` to page results. Paging determines the number of results on each logical page and supports content navigation. For more information, see [Shape search results](search-pagination-page-layout.md).
0 commit comments