Skip to content

Commit 121ff4f

Browse files
authored
Merge pull request #97394 from brjohnstmsft/search-weight-fix
[Search] Fix inaccuracies about text weights in scoring profiles
2 parents 5cb2f6c + b2c84a4 commit 121ff4f

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

articles/search/index-add-scoring-profiles.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Brjohnstmsft
88
ms.author: brjohnst
99
ms.service: cognitive-search
1010
ms.topic: conceptual
11-
ms.date: 11/04/2019
11+
ms.date: 11/28/2019
1212
translation.priority.mt:
1313
- "de-de"
1414
- "es-es"
@@ -32,7 +32,7 @@ translation.priority.mt:
3232
To give you an idea of what a scoring profile looks like, the following example shows a simple profile named 'geo'. This one boosts items that have the search term in the **hotelName** field. It also uses the `distance` function to favor items that are within ten kilometers of the current location. If someone searches on the term 'inn', and 'inn' happens to be part of the hotel name, documents that include hotels with 'inn' within a 10 KM radius of the current location will appear higher in the search results.
3333

3434

35-
```
35+
```json
3636
"scoringProfiles": [
3737
{
3838
"name":"geo",
@@ -87,7 +87,7 @@ The search score is computed based on statistical properties of the data and the
8787

8888
This example shows the schema of an index with two scoring profiles (`boostGenre`, `newAndHighlyRated`). Any query against this index that includes either profile as a query parameter will use the profile to score the result set.
8989

90-
```
90+
```json
9191
{
9292
"name": "musicstoreindex",
9393
"fields": [
@@ -229,14 +229,14 @@ The search score is computed based on statistical properties of the data and the
229229
230230
|Attribute|Description|
231231
|---------------|-----------------|
232-
|`Name`|Required. This is the name of the scoring profile. It follows the same naming conventions of a field. It must start with a letter, cannot contain dots, colons or @ symbols, and cannot start with the phrase ‘azureSearch’ (case-sensitive).|
233-
|`Text`|Contains the Weights property.|
234-
|`Weights`|Optional. A name-value pair that specifies a field name and relative weight. Relative weight must be a positive integer or floating-point number. The maximum value is int32.MaxValue.<br /><br /> You can specify the field name without a corresponding weight. Weights are used to indicate the importance of one field relative to another.|
235-
|`Functions`|Optional. A scoring function can only be applied to fields that are filterable.|
236-
|`Type`|Required for scoring functions. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. You can include more than one function in each scoring profile. The function name must be lower case.|
237-
|`Boost`|Required for scoring functions. A positive number used as multiplier for raw score. It cannot be equal to 1.|
238-
|`Fieldname`|Required for scoring functions. A scoring function can only be applied to fields that are part of the field collection of the index, and that are filterable. In addition, each function type introduces additional restrictions (freshness is used with datetime fields, magnitude with integer or double fields, and distance with location fields). You can only specify a single field per function definition. For example, to use magnitude twice in the same profile, you would need to include two definitions magnitude, one for each field.|
239-
|`Interpolation`|Required for scoring functions. Defines the slope for which the score boosting increases from the start of the range to the end of the range. Valid values include Linear (default), Constant, Quadratic, and Logarithmic. See [Set interpolations](#bkmk_interpolation) for details.|
232+
|`name`|Required. This is the name of the scoring profile. It follows the same naming conventions of a field. It must start with a letter, cannot contain dots, colons or @ symbols, and cannot start with the phrase ‘azureSearch’ (case-sensitive).|
233+
|`text`|Contains the weights property.|
234+
|`weights`|Optional. Contains name-value pairs that each specify a field name and relative weight. Relative weight must be a positive integer or floating-point number.<br /><br /> Weights are used to indicate the importance of one searchable field relative to another.|
235+
|`functions`|Optional. A scoring function can only be applied to fields that are filterable.|
236+
|`type`|Required for scoring functions. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. You can include more than one function in each scoring profile. The function name must be lower case.|
237+
|`boost`|Required for scoring functions. A positive number used as multiplier for raw score. It cannot be equal to 1.|
238+
|`fieldname`|Required for scoring functions. A scoring function can only be applied to fields that are part of the field collection of the index, and that are filterable. In addition, each function type introduces additional restrictions (freshness is used with datetime fields, magnitude with integer or double fields, and distance with location fields). You can only specify a single field per function definition. For example, to use magnitude twice in the same profile, you would need to include two definitions magnitude, one for each field.|
239+
|`interpolation`|Required for scoring functions. Defines the slope for which the score boosting increases from the start of the range to the end of the range. Valid values include Linear (default), Constant, Quadratic, and Logarithmic. See [Set interpolations](#bkmk_interpolation) for details.|
240240
|`magnitude`|The magnitude scoring function is used to alter rankings based on the range of values for a numeric field. Some of the most common usage examples of this are:<br /><br /> - **Star ratings:** Alter the scoring based on the value within the “Star Rating” field. When two items are relevant, the item with the higher rating will be displayed first.<br />- **Margin:** When two documents are relevant, a retailer may wish to boost documents that have higher margins first.<br />- **Click counts:** For applications that track click through actions to products or pages, you could use magnitude to boost items that tend to get the most traffic.<br />- **Download counts:** For applications that track downloads, the magnitude function lets you boost items that have the most downloads.|
241241
|`magnitude` &#124; `boostingRangeStart`|Sets the start value of the range over which magnitude is scored. The value must be an integer or floating-point number. For star ratings of 1 through 4, this would be 1. For margins over 50%, this would be 50.|
242242
|`magnitude` &#124; `boostingRangeEnd`|Sets the end value of the range over which magnitude is scored. The value must be an integer or floating-point number. For star ratings of 1 through 4, this would be 4.|
@@ -256,10 +256,10 @@ The search score is computed based on statistical properties of the data and the
256256

257257
|||
258258
|-|-|
259-
|`Linear`|For items that are within the max and min range, the boost applied to the item will be done in a constantly decreasing amount. Linear is the default interpolation for a scoring profile.|
260-
|`Constant`|For items that are within the start and ending range, a constant boost will be applied to the rank results.|
261-
|`Quadratic`|In comparison to a Linear interpolation that has a constantly decreasing boost, Quadratic will initially decrease at smaller pace and then as it approaches the end range, it decreases at a much higher interval. This interpolation option is not allowed in tag scoring functions.|
262-
|`Logarithmic`|In comparison to a Linear interpolation that has a constantly decreasing boost, Logarithmic will initially decrease at higher pace and then as it approaches the end range, it decreases at a much smaller interval. This interpolation option is not allowed in tag scoring functions.|
259+
|`linear`|For items that are within the max and min range, the boost applied to the item will be done in a constantly decreasing amount. Linear is the default interpolation for a scoring profile.|
260+
|`constant`|For items that are within the start and ending range, a constant boost will be applied to the rank results.|
261+
|`quadratic`|In comparison to a Linear interpolation that has a constantly decreasing boost, Quadratic will initially decrease at smaller pace and then as it approaches the end range, it decreases at a much higher interval. This interpolation option is not allowed in tag scoring functions.|
262+
|`logarithmic`|In comparison to a Linear interpolation that has a constantly decreasing boost, Logarithmic will initially decrease at higher pace and then as it approaches the end range, it decreases at a much smaller interval. This interpolation option is not allowed in tag scoring functions.|
263263

264264
![Constant, linear, quadratic, log10 lines on graph](media/scoring-profiles/azuresearch_scorefunctioninterpolationgrapht.png "AzureSearch_ScoreFunctionInterpolationGrapht")
265265

0 commit comments

Comments
 (0)