File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed
docs/reference/search/search-your-data Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -145,15 +145,35 @@ The following example adds `my_analyzer` as a search analyzer to the `title` fie
145145
146146[source,JSON]
147147----
148+ {
148149 "mappings": {
149150 "properties": {
150151 "title": {
151152 "type": "text",
152- "search_analyzer": "my_analyzer",
153- "updateable": true
153+ "search_analyzer": "my_analyzer"
154+ }
155+ }
156+ },
157+ "settings": {
158+ "analysis": {
159+ "analyzer": {
160+ "my_analyzer": {
161+ "tokenizer": "whitespace",
162+ "filter": [
163+ "synonyms_filter"
164+ ]
165+ }
166+ },
167+ "filter": {
168+ "synonyms_filter": {
169+ "type": "synonym",
170+ "synonyms_path": "analysis/synonym-set.txt",
171+ "updateable": true
172+ }
154173 }
155174 }
156175 }
176+ }
157177----
158178
159179
You can’t perform that action at this time.
0 commit comments