(self, results)
Combines the effects of extend() and upgrade(): hits that are also
        in 'results' are raised. Then any hits from the other results object
        that are not in this results object are appended to the end.

        :param results: another results object.
Combines the effects of extend() and upgrade(): hits that are also
        in 'results' are raised. Then any hits from the other results object
        that are not in this results object are appended to the end.
Combines the effects of extend () and upgrade () : hits that are also in results are raised . Then any hits from the other results object that are not in this results object are appended to the end .
def upgrade_and_extend(self, results):
        """Combines the effects of extend() and upgrade(): hits that are also
        in 'results' are raised. Then any hits from the other results object
        that are not in this results object are appended to the end.

        :param results: another results object.
        """

        if not len(results):
            return

        docs = self.docs()
        otherdocs = results.docs()

        arein = [item for item in self.top_n if item[1] in otherdocs]
        notin = [item for item in self.top_n if item[1] not in otherdocs]
        other = [item for item in results.top_n if item[1] not in docs]

        self.docset = docs | otherdocs
        self.top_n = arein + notin + other
def upgrade_and_extend ( self , results ) : if not len ( results ) : return docs = self . docs ( ) otherdocs = results . docs ( ) arein = [ item for item in self . top_n if item [ 1 ] in otherdocs ] notin = [ item for item in self . top_n if item [ 1 ] not in otherdocs ] other = [ item for item in results . top_n if item [ 1 ] not in docs ] self . docset = docs | otherdocs self . top_n = arein + notin + other