Hi, I am using ES 7.1.1 and elasticsearchjs. When I do msearch for the first time, it return "skipped" responses. But when I do the same msearch again (click F5 in gui), I finally get my data. Timerange is correct (last 6 hours). The queries are the same. Can it be problem in ES caching or??
Part of my msearch
{"index":"logstash*","ignore_unavailable":true,"preference":1542895076143}.
{"size":0,"track_total_hits":true,"query":{"bool":{"must":[[{"query_string":{"query":"attrs.type:call-
end OR attrs.type:call-start OR attrs.type:call-attempt"}},{
"range":{"@timestamp":{"gte":1582528063000,"lte":1582549663000,"format":"epoch_millis"}}},
{"query_string":{"query":"attrs.type:call-end"}}]],"must_not":{"exists":{"field":"nofield"}}}}
,"aggs":{"nested":{"value_count":{"field":"attrs.originator"}},"agg":{"terms":
{"field":"attrs.originator","size":10,"order":{"_count":"desc"}}}}}.
{"index":"logstash*","ignore_unavailable":true,"preference":1542895076143}
....
Response:
HTTP/1.1 200 OK..content-type: application/json; charset=UTF-8..content-length: 4720....
{"took":249,"responses":[{"took":103,"timed_out":false,"_shards":
{"total":22,"successful":22,"skipped":21,"failed":0},"hits":{"total":
{"value":0,"relation":"eq"},"max_score":null,"hits":[]},"aggregations":{"agg":
{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[
]},"nested":{"value":0}},"status":200},{"took":102,"timed_out":false,"_shards":
{"total":22,"successful":22,"skipped":21,"failed":0},"hits":{"total":
{"value":0,"relation":"eq"},"max_score":null,"hits":[]},"aggregations":{"agg":
{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[]}},"status":200},
{"took":9,"timed_out":false,"_shards":{"total":22,"successful":22,"skipped":21,"failed":0},"hits":
{"total":{"value":0,"relation":"eq"},"max_score":null,"hits":[]},"status":200},
{"took":27,"timed_out":false,"_shards":{"total":22,"successful":22,"skipped":21,"failed":0},
The same msearch
POST /_msearch HTTP/1.1..content-type: application/x-ndjson..Host:
localhost:9200..ContentLength: 9660..Connection: keep-alive....
{"index":"logstash*","ignore_unavailable":true,"preference":1542895076143}.
{"size":0,"track_total_hits":true,"query":{"bool":{"must":[[{"query_string":{"query":"attrs.type:call-
end OR attrs.type:call-start OR attrs.type:call-attempt"}},{
"range":{"@timestamp":{"gte":1582529796000,"lte":1582551396000,"format":"epoch_millis"}}},
{"query_string":{"query":"attrs.type:call-end"}}]],"must_not":{"exists":{"field":"nofield"}}}}
,"aggs":{"nested":{"value_count":{"field":"attrs.originator"}},"agg":{"terms":
{"field":"attrs.originator","size":10,"order":{"_count":"desc"}}}}}.
{"index":"logstash*","ignore_unavailable":true,"preference":1542895076143}.
{"size":0,"track_total_hits":true,"query":{"bool":{"must":[[{"query_string":{"query":"attrs.type:call- end OR attrs.type:call-start OR attrs.type:ca ll-attempt"}},{"range":{"@timestamp":
{"gte":1582529796000,"lte":1582551396000,"format":"epoch_millis"}}}]],"must_not":{"exists":
{"field":"nofield"}}}},"aggs":{"agg":{"terms":{"field":"
termination","size":10},"aggs":{"agg":{"terms":{"field":"attrs.sip-code"}}}}}}
....
second response (with data)
HTTP/1.1 200 OK..content-type: application/json; charset=UTF-8..content-length: 1282213....
{"took":1985,"timed_out":false,"_shards":{"total":22,"successful":22,"skipped":0,"failed":0},
"hits":{"total":{"value":1828,"relation":"eq"},"max_score":null,"hits":[{"_index":"logstash- 2020.02.24","_type":"_doc","_id":"5Nxpd3ABhoswMxhJ63tC","_score":null,"_source":{"DATA"