Skip to content

Commit d018a00

Browse files
mennoo1996javanna
authored andcommitted
Add a usage example of the JLH score (#28905)
Adds a usage example of the JLH score used in significant terms aggregation. All other methods to calculate significance score have such an example Closes #28513
1 parent e7d1e12 commit d018a00

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/reference/aggregations/bucket/significantterms-aggregation.asciidoc

+9
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,15 @@ However, the `size` and `shard size` settings covered in the next section provid
327327
==== Parameters
328328

329329
===== JLH score
330+
The JLH score can be used as a significance score by adding the parameter
331+
332+
[source,js]
333+
--------------------------------------------------
334+
335+
"jlh": {
336+
}
337+
--------------------------------------------------
338+
// NOTCONSOLE
330339

331340
The scores are derived from the doc frequencies in _foreground_ and _background_ sets. The _absolute_ change in popularity (foregroundPercent - backgroundPercent) would favor common terms whereas the _relative_ change in popularity (foregroundPercent/ backgroundPercent) would favor rare terms. Rare vs common is essentially a precision vs recall balance and so the absolute and relative changes are multiplied to provide a sweet spot between precision and recall.
332341

0 commit comments

Comments
 (0)