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/index-ranking-similarity.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,19 @@ author: HeidiSteen
6
6
ms.author: heidist
7
7
ms.service: cognitive-search
8
8
ms.topic: how-to
9
-
ms.date: 09/07/2023
9
+
ms.date: 09/25/2023
10
10
---
11
11
12
12
# Configure BM25 relevance scoring
13
13
14
14
In this article, learn how to configure the [BM25 relevance scoring algorithm](https://en.wikipedia.org/wiki/Okapi_BM25) used by Azure Cognitive Search for full text search queries. It also explains how to enable BM25 on older search services.
15
15
16
-
BM25 applies to strings (text) on fields having a "searchable" attribution. At query time, the search engine uses BM25 to calculate a **@searchScore** for each match in a given query. Matching documents are ranked by their search score, with the top results returned in the query response.
16
+
BM25 applies to:
17
+
18
+
+ Queries that use the `search` parameter for full text search, on text fields having a `searchable` attribution.
19
+
+ Scoring is scoped to `searchFields`, or to all `searchable` fields if `searchFields` is null.
20
+
21
+
The search engine uses BM25 to calculate a **@searchScore** for each match in a given query. Matching documents are ranked by their search score, with the top results returned in the query response. It's possible to get some [score variation](index-similarity-and-scoring.md#score-variation) in results, even from the same query executing over the same search index, but usually these variations are small and don't change the overall ranking of results.
17
22
18
23
BM25 has defaults for weighting term frequency and document length. You can customize these properties if the defaults aren't suited to your content. Configuration changes are scoped to individual indexes, which means you can adjust relevance scoring based on the characteristics of each index.
Copy file name to clipboardExpand all lines: articles/search/search-query-create.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,9 +23,9 @@ If you're building a query for [full text search](search-lucene-query-architectu
23
23
24
24
## Example of a full text query request
25
25
26
-
In Azure Cognitive Search, a query is a read-only request against the docs collection of a single search index. A full text query is specified in a `search` parameter and consists of terms, quote-enclosed phrases, and operators.
26
+
In Azure Cognitive Search, a query is a read-only request against the docs collection of a single search index.
27
27
28
-
Other parameters add more definition. For example, `searchFields` scopes query execution to specific fields, `select` specifies which fields are returned in results, and `count` returns the number of matches found in the index.
28
+
A full text query is specified in a `search` parameter and consists of terms, quote-enclosed phrases, and operators. Other parameters add more definition. For example, `searchFields` scopes query execution to specific fields, `select` specifies which fields are returned in results, and `count` returns the number of matches found in the index.
29
29
30
30
The following [Search Documents REST API](/rest/api/searchservice/search-documents) call illustrates a query request using the aforementioned parameters.
31
31
@@ -55,11 +55,11 @@ In the portal, when you open an index, you can work with Search Explorer alongsi
55
55
56
56
1. Open **Indexes** and select an index.
57
57
58
-
1. An index opens to the **Search explorer** tab so that you can query right away. A query string can use simple or full syntax, with support for all query parameters (filter, select, searchFields, and so on).
58
+
1. An index opens to the [**Search explorer**](search-explorer.md) tab so that you can query right away. A query string can use simple or full syntax, with support for all query parameters (filter, select, searchFields, and so on). Here's a full text search query expression that works for the Hotels sample index:
59
59
60
-
[Search explorer (portal)](search-explorer.md) is a query interface in the Azure portal that runs queries against indexes on the underlying search service. Internally, the portal makes [Search Documents](/rest/api/searchservice/search-documents) requests, but can't invoke Autocomplete, Suggestions, or Document Lookup.
1. Change the REST API version if you require search behaviors from a specific version.
62
+
Notice that you can change the REST API version if you require search behaviors from a specific version, or switch to **JSON view** if you want to paste in the JSON definition of a query. For more information about what a JSON definition looks like, see [Search Documents (REST)](/rest/api/searchservice/search-documents).
63
63
64
64
### [**REST API**](#tab/rest-text-query)
65
65
@@ -80,6 +80,8 @@ The following Azure SDKs provide a **SearchClient** that has methods for formula
If your query is full text search, a query parser is used to process any text that's passed as search terms and phrases. Azure Cognitive Search offers two query parsers.
0 commit comments