code: func NewInvertedIndex(cfg Config) *InvertedIndex {
  	idx := &InvertedIndex{index: make(map[string]map[Keyword][]Document), cfg: cfg}
  	for _, conf := range cfg.Indices {
  		idx.index[conf.Name] = make(map[Keyword][]Document)
  		if conf.Weight < idx.minWeight {
  			// By default, the weight scale starts at 0, but we allow
  			// negative weights.
  			idx.minWeight = conf.Weight
  		}
  		if conf.Weight > idx.maxWeight {
  			idx.maxWeight = conf.Weight
  		}
  	}
  	return idx
  }
docs: // NewInvertedIndex creates a new InvertedIndex.
  // Documents to index must be added in Add.