def to_s
      buf = ["Document {"]
      self.keys.sort_by {|key| key.to_s}.each do |key|
        val = self[key]
        val_str = if val.instance_of? Array then %{["#{val.join('", "')}"]}
                  elsif val.is_a? Field then val.to_s
                  else %{"#{val.to_s}"}
                  end
        buf << "  :#{key} => #{val_str}"
      end
      buf << ["}#{@boost == 1.0 ? "" : "^" + @boost.to_s}"]
      return buf.join("\n")
    end
def to_s
      buf = ["Document {"]
      self.keys.sort_by {|key| key.to_s}.each do |key|
        val = self[key]
        val_str = if val.instance_of? Array then %{["#{val.join('", "')}"]}
                  elsif val.is_a? Field then val.to_s
                  else %{"#{val.to_s}"}
                  end
        buf << "  :#{key} => #{val_str}"
      end
      buf << ["}#{@boost == 1.0 ? "" : "^" + @boost.to_s}"]
      return buf.join("\n")
    end
Create a string representation of the document