File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
docs/reference/search/search-your-data Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -853,14 +853,16 @@ PUT _scripts/my-search-template
853
853
{
854
854
"script": {
855
855
"lang": "mustache",
856
- "source": {
856
+ "source":
857
+ """
858
+ {
857
859
"query":{
858
- "multi_match ":{
860
+ "multi-match ":{
859
861
"query": "{{query_string}}",
860
- "fields": """ [{{#text_fields}}{{user_name}}{{^last}},{{/last}}{{/text_fields}}]"""
862
+ "fields": [{{#text_fields}}" {{user_name}}" {{^last}},{{/last}}{{/text_fields}}]
861
863
}
862
864
}
863
- }
865
+ }"""
864
866
}
865
867
}
866
868
----
@@ -897,7 +899,7 @@ When rendered the template outputs:
897
899
"query": {
898
900
"multi_match": {
899
901
"query": "My string",
900
- "fields": "[ John, kimchy]"
902
+ "fields": [" John"," kimchy"]
901
903
}
902
904
}
903
905
}
You can’t perform that action at this time.
0 commit comments