Ctx.payload.hits.total returns me zero, why?

This is my Watch, for some reason ctx.payload.hits.total returns zero

curl -XPUT 'http://172.17.0.2:9200/_watcher/watch/ehackb_watch19' -d '
{
"trigger": {
"schedule": { "interval" : "15s"}
},
"input" : {
"search" : {
"request" : {
"indices" : ["capi"],
"types" : ["generics"],
"body" : {
"query" : {
"match" : {"data.to.name":"crm@person-get"}
}
}
}
}
},
"condition": {
"compare" : {
"ctx.payload.hits.total" : {
"gt":0
}
}
},
"actions" : {
"send_email" : {
"email" : {
"to" : "lim_le_kamelancien@hotmail.com",
"subject" : "Alert",
"body" : "No data being received"
}
}
}
}'

Hey

does the query return any hits, if you execute it manually and standalone?

--Alex

Yes, i found my problem thank you very much

My problem was the "types " field, i removed it and it's working now !