"Change notification" to external applications - where should I start?

Hello!

I want to start some work on https://github.com/elasticsearch/elasticsearch/issues/1242
because we need such a functionality and don't want to poll the
indices.

Where would I start to hook in to get the required information. I have
seen that the statistics-part of elasticsearch has all the required
information about new indexed documents (we don't care about deletes
for now).

As a first start I want to implement a service that gives you freshly
indexed documents per node/per index (next step for the whole
cluster).

CU
Thomas