def search(search_string)
    load_keywords if Page.visited != (0..Page.total).to_a

    puts "searching..."
    @searching = true

    search_string.downcase!
    terms = search_string.scan(/"[^"]*"/)
    terms.each { |term| search_string.slice!(term) }
    terms.collect! { |term| term.gsub("\"", '') }
    terms += search_string.split(' ')

    @results = (1..Problem.total).select do |i|
      terms.all? { |term| Problem[i].title.downcase.include?(term) }
    end
  end
def search(search_string)
    load_keywords if Page.visited != (0..Page.total).to_a

    puts "searching..."
    @searching = true

    search_string.downcase!
    terms = search_string.scan(/"[^"]*"/)
    terms.each { |term| search_string.slice!(term) }
    terms.collect! { |term| term.gsub("\"", '') }
    terms += search_string.split(' ')

    @results = (1..Problem.total).select do |i|
      terms.all? { |term| Problem[i].title.downcase.include?(term) }
    end
  end
Performs a simple search of the problems. It accepts multiple terms and
 recognizes quoted phrases. Results will contain *all* of the search terms.

 * +terms+ - String of search terms