def search(search_type, klass, query, options = false)
      header = {}

      # Required Data
      data = {
        'SearchType' => search_type,
        'Class'      => klass,
        'Query'      => query,
        'QueryType'  => 'DMQL2',
        'Format'     => format,
        'Count'      => '0'
      }

      # Options
      #--
      # We might want to switch this to merge!, but I've kept it like this for now because it
      # explicitly casts each value as a string prior to performing the search, so we find out now
      # if can't force a value into the string context. I suppose it doesn't really matter when
      # that happens, though...
      #++
      options.each { |k,v| data[k] = v.to_s } if options

      response = request(@urls.search, data, header)

      # TODO: make parser configurable
      results = RETS4R::Client::CompactNokogiriParser.new(response.body)

      if block_given?
        results.each {|result| yield result}
      else
        return results.to_a
      end
    end
def search(search_type, klass, query, options = false)
      header = {}

      # Required Data
      data = {
        'SearchType' => search_type,
        'Class'      => klass,
        'Query'      => query,
        'QueryType'  => 'DMQL2',
        'Format'     => format,
        'Count'      => '0'
      }

      # Options
      #--
      # We might want to switch this to merge!, but I've kept it like this for now because it
      # explicitly casts each value as a string prior to performing the search, so we find out now
      # if can't force a value into the string context. I suppose it doesn't really matter when
      # that happens, though...
      #++
      options.each { |k,v| data[k] = v.to_s } if options

      response = request(@urls.search, data, header)

      # TODO: make parser configurable
      results = RETS4R::Client::CompactNokogiriParser.new(response.body)

      if block_given?
        results.each {|result| yield result}
      else
        return results.to_a
      end
    end
Peforms a RETS search transaction. Again, please see the RETS specification for details
 on what these parameters mean. The options parameter takes a hash of options that will
 added to the search statement.