Logstash Elasticsearch Output Plugin (Index)

Hi.
In the following configuration I would like to name my index and document_type to have the 'type' field automatically put in instead of having to manually write it out.
Extract of output LS file:

} else if [type] == "wineventlog" {
elasticsearch {
hosts => ["els03","els04"]
sniffing => true
manage_template => false
index => "wineventlog-%{+YYYY.MM.dd}"
document_type => "wineventlog"

Thanks.

See https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#sprintf.