def __init__(self, url, db_name):
    self.db_name = db_name
    self.db = pymongo.MongoClient(url)[self.db_name]
    self.db['reports'].create_index('group')
    self.db['reports'].create_index('author')
    self.db['reports'].create_index('title')
    self.db['reports'].create_index([('group', pymongo.ASCENDING), ('author', pymongo.ASCENDING)])
    self.db['reports'].create_index([('group', pymongo.ASCENDING), ('faculty', pymongo.ASCENDING), ('department', pymongo.ASCENDING)])
def __init__(self, url, db_name):
    self.db_name = db_name
    self.db = pymongo.MongoClient(url)[self.db_name]
    self.db['reports'].create_index('group')
    self.db['reports'].create_index('author')
    self.db['reports'].create_index('title')
    self.db['reports'].create_index([('group', pymongo.ASCENDING), ('author', pymongo.ASCENDING)])
    self.db['reports'].create_index([('group', pymongo.ASCENDING), ('faculty', pymongo.ASCENDING), ('department', pymongo.ASCENDING)])