How can I exclude particular files from full text search?

Hello.
I’m using ElasticSearch for a while. How can I exclude particular files from being indexed? For example, .js and .cs files, I don’t really need them to be indexed.