def index(context, update):
    """Create indexes for the database"""
    LOG.info("Running scout index")
    adapter = context.obj['adapter']
    
    if update:
        adapter.update_indexes()
    else:
        adapter.load_indexes()
Create indexes for the database