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