Feed one input event into another input

I am looking for a way to read from a file and use the content to query elasticsearch. Basically, feeding the data from file input to elastic input.

How does one achieve this in logstash ? Any help would be appreciated.

Thanks !