Building a document repository