Generic repository contract and implementations. Currently only implemented for Elasticsearch, but there are plans for other implementations.