code: func (idx *InvertedIndex) SearchDoc(doc Document, indices ...string) ([]Document, error) {
  	var q []queryElement
  
  	var configs IndexConfigs
  
  	if len(indices) == 0 {
  		configs = idx.cfg.Indices
  	} else {
  		configs = make(IndexConfigs, len(indices))
  		for i, indexName := range indices {
  			cfg, found := idx.getIndexCfg(indexName)
  			if !found {
  				return nil, fmt.Errorf("index %q not found", indexName)
  			}
  			configs[i] = cfg
  		}
  	}
  
  	for _, cfg := range configs {
  		keywords, err := doc.RelatedKeywords(cfg)
  		if err != nil {
  			return nil, err
  		}
  
  		q = append(q, newQueryElement(cfg.Name, keywords...))
  
  	}
  
  	return idx.searchDate(doc.PublishDate(), q...)
  }
docs: // SearchDoc finds the documents matching any of the keywords in the given indices
  // against the given document.
  // The resulting document set will be sorted according to number of matches
  // and the index weights, and any matches with a rank below the configured
  // threshold (normalize to 0..100) will be removed.
  // If an index name is provided, only that index will be queried.