Skip to content

Commit 1d97168

Browse files
authored
Update search-template.asciidoc
Update search-template.asciidoc recreate #103416 in main
1 parent e7c0a3f commit 1d97168

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/reference/search/search-your-data/search-template.asciidoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -853,14 +853,16 @@ PUT _scripts/my-search-template
853853
{
854854
"script": {
855855
"lang": "mustache",
856-
"source": {
856+
"source":
857+
"""
858+
{
857859
"query":{
858-
"multi_match":{
860+
"multi-match":{
859861
"query": "{{query_string}}",
860-
"fields": """[{{#text_fields}}{{user_name}}{{^last}},{{/last}}{{/text_fields}}]"""
862+
"fields": [{{#text_fields}}"{{user_name}}"{{^last}},{{/last}}{{/text_fields}}]
861863
}
862864
}
863-
}
865+
}"""
864866
}
865867
}
866868
----
@@ -897,7 +899,7 @@ When rendered the template outputs:
897899
"query": {
898900
"multi_match": {
899901
"query": "My string",
900-
"fields": "[John,kimchy]"
902+
"fields": ["John","kimchy"]
901903
}
902904
}
903905
}

0 commit comments

Comments
 (0)