'find suggestions for a given man page
oid is the objectid of the man page in question,
existing is a list of (oid, man page) of suggestions that were
already discovered'

def _discovermanpagesuggestions(self, oid, existing):

    skip = set([oid for (oid, m) in existing])
    cursor = self.mapping.find({'dst': oid})
    srcs = [d['src'] for d in cursor]
    suggestionoids = self.mapping.find({'src': {'$in': srcs}}, {'dst': 1})
    suggestionoids = [d['dst'] for d in suggestionoids if (d['dst'] not in skip)]
    if (not suggestionoids):
        return []
    suggestionoids = self.manpage.find({'_id': {'$in': suggestionoids}}, {'name': 1, 'source': 1})
    return [(d.pop('_id'), manpage.from_store_name_only(**d)) for d in suggestionoids]
