Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit efdf8ef

Browse files
committed
Add highlighting documentation
Closes #54.
1 parent 63c60b8 commit efdf8ef

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,27 @@ It can also be provided on a per document indexed using the `_detect_language` p
121121

122122
Note, this feature is supported since `2.0.0` version.
123123

124+
Highlighting attachments
125+
------------------------
126+
127+
If you want to highlight your attachment content, you will need to store your file content and set `term_vector` as follow:
128+
129+
```
130+
PUT test/my_type/_mapping
131+
{
132+
"my_type" : {
133+
"properties" : {
134+
"my_html_file" : {
135+
"type" : "attachment",
136+
"fields" : {
137+
"title" : { "store" : "yes" },
138+
"my_html_file" : { "term_vector":"with_positions_offsets", "store":"yes" }
139+
}
140+
}
141+
}
142+
}
143+
}
144+
```
124145

125146
License
126147
-------

0 commit comments

Comments
 (0)