Easiest way for me to learn Elasticsearch was through queries generated by Kibana [1] and playing with them inside Sense [2]. Kibana relies on Facets, version elasticsearch 1.0 introduces Aggregations, I would suggest using aggregations for your projects.
Is it possible to extract repeating patterns? example would be extracting repo name, number of stars, language and project description from GitHub Archive daily digests.
It is not possible to extract something (today) that would be generated inside a for loop. I'd be curious if anyone has ideas on how you might do that.
If you need support for more complex emails and extraction rules, you might look into using http://mailparser.io/.