How to write only specific fields to elasticsearch from logstash

Not a file. It's a log being sent to logstash on a TCP port.