I don't see any mention in the docs about this.
When using a script_field, only that field is returned in the results, not with the rest of the document, I have to add includes to get the rest of the fields?
GET data/_search
{
//"_source": { "includes": ["*"]},
"query": {"match_all": {}},
"script_fields" : {
"new_field" : {
"script" : {
"source": "'hello'"
}
}
}
}
Results:
{
"_index" : "data",
"_type" : "_doc",
"_id" : "1",
"_score" : 1.0,
"fields" : {
"new_field" : [
"hello"
]
}
},