def build_query
      @query   = @search_term.dup
      @pages   = -1
      @results = []

      @query << "\"#{ @options[:exact] }\"" if @options[:exact]
      @query << @options[:or].join(' OR ') unless @options[:or].nil? or @options[:or].empty?
      @query += @options[:without].map { |s| "-#{ s }" } if @options[:without]

      @query += inputs.select  { |k, v| @options[k] }.map { |k, v| "#{ k }:#{ @options[k] }" }
      @query += checks.select  { |k, v| @options[k] }.map { |k, v| "#{ k }:1" }

      byzantine = selects.select do |k, v|
        (v[:id].to_s[/^.*_id$/] && @options[k].to_s.to_i > 0) ||
        (v[:id].to_s[/^[^_]+$/] && @options[k])
      end

      @query += byzantine.map { |k, v| "#{ v[:id] }:#{ @options[k] }" }
    end
def build_query
      @query   = @search_term.dup
      @pages   = -1
      @results = []

      @query << "\"#{ @options[:exact] }\"" if @options[:exact]
      @query << @options[:or].join(' OR ') unless @options[:or].nil? or @options[:or].empty?
      @query += @options[:without].map { |s| "-#{ s }" } if @options[:without]

      @query += inputs.select  { |k, v| @options[k] }.map { |k, v| "#{ k }:#{ @options[k] }" }
      @query += checks.select  { |k, v| @options[k] }.map { |k, v| "#{ k }:1" }

      byzantine = selects.select do |k, v|
        (v[:id].to_s[/^.*_id$/] && @options[k].to_s.to_i > 0) ||
        (v[:id].to_s[/^[^_]+$/] && @options[k])
      end

      @query += byzantine.map { |k, v| "#{ v[:id] }:#{ @options[k] }" }
    end
Clear out the query and rebuild it from the various stored options. Also clears out the
 results set and sets pages back to -1