changed type to query_type as it conflicts with logstash