File tree 1 file changed +26
-1
lines changed
docs/reference/search/suggesters
1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,10 @@ POST _search
269
269
270
270
The `phrase` suggester supports multiple smoothing models to balance
271
271
weight between infrequent grams (grams (shingles) are not existing in
272
- the index) and frequent grams (appear at least once in the index).
272
+ the index) and frequent grams (appear at least once in the index). The
273
+ smoothing model can be selected by setting the `smoothing` parameter
274
+ to one of the following options. Each smoothing model supports specific
275
+ properties that can be configured.
273
276
274
277
[horizontal]
275
278
`stupid_backoff`::
@@ -290,6 +293,28 @@ the index) and frequent grams (appear at least once in the index).
290
293
All parameters (`trigram_lambda`, `bigram_lambda`, `unigram_lambda`)
291
294
must be supplied.
292
295
296
+ [source,js]
297
+ --------------------------------------------------
298
+ POST _search
299
+ {
300
+ "suggest": {
301
+ "text" : "obel prize",
302
+ "simple_phrase" : {
303
+ "phrase" : {
304
+ "field" : "title.trigram",
305
+ "size" : 1,
306
+ "smoothing" : {
307
+ "laplace" : {
308
+ "alpha" : 0.7
309
+ }
310
+ }
311
+ }
312
+ }
313
+ }
314
+ }
315
+ --------------------------------------------------
316
+ // CONSOLE
317
+
293
318
==== Candidate Generators
294
319
295
320
The `phrase` suggester uses candidate generators to produce a list of
You can’t perform that action at this time.
0 commit comments