def score_docs(self, query_vec, postings_lists, N, get_doc_freq, get_doc_len, **extra):
        
        if N == 0: return ()
        doc_hit_map = defaultdict(int)
        for (term, postings_list) in postings_lists:
            idf = self.idf_weight(N, get_doc_freq(term))
            query_term_wt = self.tf_weight(query_vec[term]) * idf
            for (docid, freq) in postings_list:
                doc_hit_map[docid] += self.tf_weight(freq) * query_term_wt
        for (docid, weight) in doc_hit_map.iteritems():
            doc_len = get_doc_len(docid)
            doc_hit_map[docid] = weight / doc_len
            
        # construct list of tuples sorted by value
        return sorted(doc_hit_map.iteritems(),
                      key=operator.itemgetter(1),
                      reverse=True)

# Register scorers by name
Update consumer offsets to explicit positions.
dataset/ETHPy150Open taherh/pysimsearch/pysimsearch/query_scorer.py/TFIDFQueryScorer.score_docs--crossover with--dataset/ETHPy150Open dpkp/kafka-python/kafka/context.py/OffsetCommitContext.update_consumer_offsets