I am running a simple query like so:
{
"query": {
"term": {
"statuses": "active"
}
},
"script_fields": {
"test": {
"script": "_source.name"
}
}
}
The problem is that once I introduce the script_fields
, I no longer get _source
in my results.
I have tried:
{
"fields": [
"_all"
],
"query": {
"term": {
"statuses": "active"
}
},
"script_fields": {
"email": {
"script": "_source.name"
}
}
}
and
{
"fields": [
"*"
],
"query": {
"term": {
"statuses": "active"
}
},
"script_fields": {
"email": {
"script": "_source.name"
}
}
}
But they did not make any difference. Is there a way to get _source
returned in addition to the script_fields
?