Changing MongoProvider.get_diff so that indexes can be used for all queries.