mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-30 03:48:54 +00:00
[DOCS] Added highlighting to the phrase suggester
This commit is contained in:
parent
53ad7330fc
commit
5b60506b2e
@ -37,7 +37,11 @@ curl -XPOST 'localhost:9200/_search' -d {
|
|||||||
"field" : "body",
|
"field" : "body",
|
||||||
"suggest_mode" : "always",
|
"suggest_mode" : "always",
|
||||||
"min_word_len" : 1
|
"min_word_len" : 1
|
||||||
} ]
|
} ],
|
||||||
|
"highlight": {
|
||||||
|
"pre_tag": "<em>",
|
||||||
|
"post_tag": "</em>"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -73,9 +77,11 @@ can contain misspellings (See parameter descriptions below).
|
|||||||
"length" : 17,
|
"length" : 17,
|
||||||
"options" : [ {
|
"options" : [ {
|
||||||
"text" : "xorr the god jewel",
|
"text" : "xorr the god jewel",
|
||||||
|
"highlighted": "<em>xorr</em> the <em>god</em> jewel",
|
||||||
"score" : 0.17877324
|
"score" : 0.17877324
|
||||||
}, {
|
}, {
|
||||||
"text" : "xor the god jewel",
|
"text" : "xor the god jewel",
|
||||||
|
"highlighted": "xor the <em>god</em> jewel",
|
||||||
"score" : 0.14231323
|
"score" : 0.14231323
|
||||||
} ]
|
} ]
|
||||||
} ]
|
} ]
|
||||||
@ -144,6 +150,14 @@ can contain misspellings (See parameter descriptions below).
|
|||||||
`text`::
|
`text`::
|
||||||
Sets the text / query to provide suggestions for.
|
Sets the text / query to provide suggestions for.
|
||||||
|
|
||||||
|
`highlight`::
|
||||||
|
Sets up suggestion highlighting. If not provided then
|
||||||
|
no `highlighted` field is returned. If provided must
|
||||||
|
contain exactly `pre_tag` and `post_tag` which are
|
||||||
|
wrapped around the changed tokens. If multiple tokens
|
||||||
|
in a row are changed the entire phrase of changed tokens
|
||||||
|
is wrapped rather than each token.
|
||||||
|
|
||||||
==== Smoothing Models
|
==== Smoothing Models
|
||||||
|
|
||||||
The `phrase` suggester supports multiple smoothing models to balance
|
The `phrase` suggester supports multiple smoothing models to balance
|
||||||
|
Loading…
x
Reference in New Issue
Block a user