mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Add highlighting documentation
Closes #54. (cherry picked from commit efdf8ef)
This commit is contained in:
parent
8855bd7ddc
commit
7f8143ff12
21
README.md
21
README.md
@ -121,6 +121,27 @@ It can also be provided on a per document indexed using the `_detect_language` p
|
||||
|
||||
Note, this feature is supported since `2.0.0` version.
|
||||
|
||||
Highlighting attachments
|
||||
------------------------
|
||||
|
||||
If you want to highlight your attachment content, you will need to store your file content and set `term_vector` as follow:
|
||||
|
||||
```
|
||||
PUT test/my_type/_mapping
|
||||
{
|
||||
"my_type" : {
|
||||
"properties" : {
|
||||
"my_html_file" : {
|
||||
"type" : "attachment",
|
||||
"fields" : {
|
||||
"title" : { "store" : "yes" },
|
||||
"my_html_file" : { "term_vector":"with_positions_offsets", "store":"yes" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
License
|
||||
-------
|
||||
|
Loading…
x
Reference in New Issue
Block a user