Skip to content

Commit 84e522e

Browse files
authored
Merge pull request #3864 from vespa-engine/bratseth/document-averageFieldLength
Document averageFieldLength
2 parents faf4e5a + 2f6d1e3 commit 84e522e

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

en/reference/nativerank.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,12 @@ <h2 id="configuration-properties">Configuration properties</h2>
922922
<thead>
923923
<tr><th>Feature</th><th>Parameter</th><th>Default</th><th>Description</th></tr>
924924
</thead><tbody>
925+
<tr>
926+
<td><code>nativeFieldMatch</code></td>
927+
<td><code>averageFieldLength</code></td>
928+
<td>The actual length of the field in the given document.</td>
929+
<td>When set this replaces the true field length in the nativeFieldMatch formula for all documents.</td>
930+
</tr><tr>
925931
<tr>
926932
<td><code>nativeFieldMatch</code></td>
927933
<td><code>firstOccurrenceTable</code></td>

en/reference/rank-feature-configuration.html

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313

1414

15-
<h2 id="variables">Variables</h2>
15+
<h2 id="properties">Properties</h2>
1616
<p>
17-
Rank Features configuration variables are set by adding the following to the rank profile:
17+
Rank Features configuration properties are set by adding the following to the rank profile:
1818
</p>
1919
<pre>
2020
rank-properties {
@@ -24,17 +24,13 @@ <h2 id="variables">Variables</h2>
2424
<p>
2525
Where <em>&lt;featurename&gt;</em> is the name of a feature class (feature name up to the first dot),
2626
<em>&lt;configuration-property&gt;</em> is a property from the list below,
27-
appropriate for the feature, and <em>&lt;value&gt;</em> is either a number of a quoted string.
28-
Example: set some properties on the fieldMatch and BM25 feature class of two different fields,
29-
set properties for elementwise BM25 on the content field
30-
and define custom outputs for the elementSimilarity feature for multivalued field ranking.
27+
appropriate for the feature, and <em>&lt;value&gt;</em> is either a number of a quoted string. Example:
3128
</p>
3229
<pre>
33-
ranking-profile my-profile inherits default {
30+
rank-profile my-profile inherits default {
3431
rank-properties {
3532
fieldMatch(title).maxAlternativeSegmentations: 10
3633
fieldMatch(title).maxOccurrences: 5
37-
fieldMatch(description).maxOccurrences: 20
3834
bm25(title).k1: 1.5
3935
bm25(title).b: 0.85
4036
bm25(title).averageFieldLength: 200
@@ -45,21 +41,18 @@ <h2 id="variables">Variables</h2>
4541
elementSimilarity(tags).output.avgWeightSquared: "avg((0.35*p+0.15*o+0.30*q+0.20*f)*w^2)"
4642
elementSimilarity(tags).output.sumWeight: "sum(w)"
4743
}
48-
match-features {
49-
elementSimilarity(tags).sumWeightSquared
50-
elementSimilarity(tags).sumWeight
51-
bm25(title)
52-
elementwise(bm25(content),x,float)
53-
}
5444
}
5545
</pre>
5646
<p>
57-
Note that rank profiles can be inherited to use the same variables in multiple profiles.
47+
Rank profiles are inherited like other content of rank profiles.
5848
</p>
5949

6050

6151

62-
<h2 id="properties">Configuration Properties</h2>
52+
<h2 id="List of properties">List of properties</h2>
53+
54+
<p>An incomplete list of rank properties by the feature they apply to.</p>
55+
6356
<table class="table">
6457
<thead>
6558
<tr><th>Feature</th><th>Parameter</th><th>Default</th><th>Description</th></tr>
@@ -88,7 +81,8 @@ <h2 id="properties">Configuration Properties</h2>
8881
When using <a href="../streaming-search.html#differences-in-streaming-search">streaming search</a>,
8982
no index structures are generated, and the average field length is not automatically calculated.
9083
Instead, manually set an average field length for a more precise BM25 score.
91-
</td></tr>
84+
</td>
85+
</tr>
9286

9387
<tr>
9488
<td rowspan="3">

0 commit comments

Comments
 (0)