class_docstr: Uses an ExpansionModel to expand the set of query terms based on the top
  N result documents.
docstr: Adds forward-index information about one of the "top N" documents.
  
  :param vector: A series of (text, weight) tuples, such as is
      returned by Reader.vector_as("weight", docnum, fieldname).
docstr_tok: ["Adds","forward-index","information","about","one","of","the","``","top","N","''","documents",".",":","param","vector",":","A","series","of","(","text",",","weight",")","tuples",",","such","as","is","returned","by","Reader.vector_as","(","``","weight","''",",","docnum",",","fieldname",")","."]
code: def add(self, vector):
      """Adds forward-index information about one of the "top N" documents.
  
      :param vector: A series of (text, weight) tuples, such as is
          returned by Reader.vector_as("weight", docnum, fieldname).
      """
  
      total_weight = 0
      topN_weight = self.topN_weight
  
      for word, weight in vector:
          total_weight += weight
          topN_weight[word] += weight
  
      self.top_total += total_weight
  
imports: from __future__ import division
  import random
  from collections import defaultdict
  from math import log
  from whoosh.compat import xrange, iteritems
label_desc: Use image node_id 2 for calling the Expander obj's underlying member method code with example usage: obj.add(vector) without return types