Added functions for Document data extracts, added appropriate indices to base tables