code: func (i *Index) Search(term string, threshold int, regexp bool) ([]*Result, error) {
  	if regexp {
  		return i.SearchRegexp(term, threshold)
  	}
  	return i.SearchLiteral(term, threshold), nil
  }
docs: // Search searches an index for the given term.
  //
  // Threshold indicates the maximum score a term may have before being marked
  // irrelevant. (Low score means higher relevance. Golf, not bowling.)
  //
  // If regexp is true, the term is treated as a regular expression. Otherwise,
  // term is treated as a literal string.