Używam proste zapytanie tak:Nie więcej _source jeśli script_fields jest stosowany w elasticsearch zapytania
{
"query": {
"term": {
"statuses": "active"
}
},
"script_fields": {
"test": {
"script": "_source.name"
}
}
}
Problem polega na tym, że gdy wprowadzam script_fields
, już nie dostać _source
w moich wynikach.
Próbowałem:
{
"fields": [
"_all"
],
"query": {
"term": {
"statuses": "active"
}
},
"script_fields": {
"email": {
"script": "_source.name"
}
}
}
i
{
"fields": [
"*"
],
"query": {
"term": {
"statuses": "active"
}
},
"script_fields": {
"email": {
"script": "_source.name"
}
}
}
Ale nie robi żadnej różnicy. Czy istnieje sposób na odzyskanie _source
oprócz script_fields
?
Czy ktoś wie dokładnie _why_ tak się dzieje? Czy jest to związane z https://github.com/elastic/elasticsearch/issues/20068? –