[DOCS] Clarify phrase suggester docs smoothing parameter (#42947)

Closes #28512
This commit is contained in:
Luca Cavanna 2019-06-11 10:13:03 +02:00
parent afeda1a7b9
commit 4da0fadedc
1 changed files with 26 additions and 1 deletions

View File

@ -267,7 +267,10 @@ POST _search
The `phrase` suggester supports multiple smoothing models to balance
weight between infrequent grams (grams (shingles) are not existing in
the index) and frequent grams (appear at least once in the index).
the index) and frequent grams (appear at least once in the index). The
smoothing model can be selected by setting the `smoothing` parameter
to one of the following options. Each smoothing model supports specific
properties that can be configured.
[horizontal]
`stupid_backoff`::
@ -288,6 +291,28 @@ the index) and frequent grams (appear at least once in the index).
All parameters (`trigram_lambda`, `bigram_lambda`, `unigram_lambda`)
must be supplied.
[source,js]
--------------------------------------------------
POST _search
{
"suggest": {
"text" : "obel prize",
"simple_phrase" : {
"phrase" : {
"field" : "title.trigram",
"size" : 1,
"smoothing" : {
"laplace" : {
"alpha" : 0.7
}
}
}
}
}
}
--------------------------------------------------
// CONSOLE
==== Candidate Generators
The `phrase` suggester uses candidate generators to produce a list of