Leverage the jira-ruby Issue.jql search feature

 @param [Type String] jql Valid JQL query
 @return [Type Array] 0-m JIRA Issues returned from query
188022
def fetch_issues(jql, suppress_exceptions = false)
      client.Issue.jql(jql)
    rescue StandardError => e
      throw e unless suppress_exceptions
      nil
    end
198341
def build_query_string(options)
      options = camelcase_keys(options)
      
      query = ''

      options.each do |k,v|
        if k == :address
          if RUBY_VERSION.to_f >= 1.9
            if v.instance_of?(String)
              v.each_line { |address| query += "#{ '&' if query != '' }address=#{CGI.escape address}" }
            else
              v.each { |address| query += "#{ '&' if query != '' }address=#{CGI.escape address}" }
            end
          else
            v.each { |address| query += "#{ '&' if query != '' }address=#{CGI.escape address}" }
          end
        else
          query += "#{ '&' if query != '' }#{k.to_s}=#{CGI.escape v}"
        end
      end

      query
    end
385559
def match_query(query)
        query ||= {}
        
        if match_event(query) && (state_requirement = match_states(query))
          state_requirement.merge(:on => event_requirement)
        end
      end
234038
def search(query, options={})
     api_response = @api_client.make_api_request(:GET, "artist/search", {:q => query}, options)
     @api_client.artist_digestor.nested_list_from_xml_doc(api_response.item_xml("searchResults"), :searchResult, :artist)
    end
516164
function getQueryObj(query='') {
  const qObj = {};
  const pairs = (query[0] === '?' ? query.substr(1) : query).split('&');
  for (let i = 0, j = pairs.length; i < j; i++) {
    let pair = pairs[i].split('=');
    qObj[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || '');
  }
  return qObj;
}
143351
def search_messages(query, &callback)
      http(:get, "/search/#{query}.json") do |data, http|
        callback.call(data[:messages].map { |msg| Firering::Message.instantiate(self, msg) }) if callback
      end
    end
1217284
def search(query,type = nil)
      checking_type(type)
      type = set_type(type) unless type.nil?
      if query.nil?
        puts 'Enter the text to search'
        text = gets
      end
      json = JSON.parse(connect_google(@api_key,type,query))
      @total_count = json["totalItems"]
      @items = json["items"]
    end
584210
def index
      if defined?(ActiveRecord)
        @ar_error_messages = params[:app] ? RailsExceptionHandler::ActiveRecord::ErrorMessage.where(app_name: params[:app]).order('created_at DESC') : RailsExceptionHandler::ActiveRecord::ErrorMessage.order('created_at DESC')
      end
      if defined?(Mongoid)
        @mg_error_messages = params[:app] ? RailsExceptionHandler::Mongoid::ErrorMessage.where(app_name: params[:app]).order(created_at: 'desc') : RailsExceptionHandler::Mongoid::ErrorMessage.order_by(created_at: 'desc')
      end
      if defined?(WillPaginate)
        @ar_error_messages = @ar_error_messages.paginate(page: params[:page] || 1, per_page: params[:per_page] || 100)
      elsif defined?(Kaminari)
        @ar_error_messages = @ar_error_messages.page(params[:page] || 1).per(params[:per_page] || 100)
      end

      respond_to do |format|
        format.html # index.html.erb
        format.json {
          if @ar_error_messages.present? && @mg_error_messages.present?
            json = {active_record: @ar_error_messages, mongoid: @mg_error_messages}
          elsif @ar_error_messages.present? && @mg_error_messages.blank?
            json = @ar_error_messages
          elsif @ar_error_messages.blank? && @mg_error_messages.present?
            json = @mg_error_messages
          end
          render json: json
        }
      end
    end
645587
def _get_query(self, query, params):
        
        if "apikey" not in params:
            params["apikey"] = self.api_key

        response = requests.get(query, params=params)
        return response.json()
901584
def settlement_search(search_request)
      unless @is_valid
        return make_response_with_exception(Exceptions::APIKeyInvalidException.new('API key, password or Rapid endpoint missing or invalid'), QueryCustomerResponse)
      end
      begin

        request = Message::TransactionProcess::SettlementSearchMsgProcess.create_request(search_request)
        url = @web_url + Constants::SETTLEMENT_SEARCH_METHOD +  request

        response = Message::TransactionProcess::SettlementSearchMsgProcess.send_request(url, @api_key, @password, @version)
        Message::TransactionProcess::SettlementSearchMsgProcess.make_result(response)

      rescue => e
        @logger.error(e.to_s) if @logger
        make_response_with_exception(e, SettlementSearchResponse)
      end
    end
565567
public function search($jql, $start_at = 0, $max_results = 20, $fields = '*navigable')
	{
		$result = $this->api(
			self::REQUEST_GET,
			'/rest/api/2/search',
			array(
				'jql' => $jql,
				'startAt' => $start_at,
				'maxResults' => $max_results,
				'fields' => $fields,
			)
		);

		return $result;
	}
272730
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
1211577
def _gql(query_string, query_class=Query):
  
  from .google_imports import gql  # Late import, to avoid name conflict.
  gql_qry = gql.GQL(query_string)
  kind = gql_qry.kind()
  if kind is None:
    # The query must be lacking a "FROM <kind>" class.  Let Expando
    # stand in for the model class (it won't actually be used to
    # construct the results).
    modelclass = model.Expando
  else:
    modelclass = model.Model._lookup_model(
        kind,
        tasklets.get_context()._conn.adapter.default_model)
    # Adjust kind to the kind of the model class.
    kind = modelclass._get_kind()
  ancestor = None
  flt = gql_qry.filters()
  filters = list(modelclass._default_filters())
  for name_op in sorted(flt):
    name, op = name_op
    values = flt[name_op]
    op = op.lower()
    if op == 'is' and name == gql.GQL._GQL__ANCESTOR:
      if len(values) != 1:
        raise ValueError('"is" requires exactly one value')
      [(func, args)] = values
      ancestor = _args_to_val(func, args)
      continue
    if op not in _OPS:
      raise NotImplementedError('Operation %r is not supported.' % op)
    for (func, args) in values:
      val = _args_to_val(func, args)
      prop = _get_prop_from_modelclass(modelclass, name)
      if prop._name != name:
        raise RuntimeError('Whoa! _get_prop_from_modelclass(%s, %r) '
                           'returned a property whose name is %r?!' %
                           (modelclass.__name__, name, prop._name))
      if isinstance(val, ParameterizedThing):
        node = ParameterNode(prop, op, val)
      elif op == 'in':
        node = prop._IN(val)
      else:
        node = prop._comparison(op, val)
      filters.append(node)
  if filters:
    filters = ConjunctionNode(*filters)
  else:
    filters = None
  orders = _orderings_to_orders(gql_qry.orderings(), modelclass)
  offset = gql_qry.offset()
  limit = gql_qry.limit()
  if limit < 0:
    limit = None
  keys_only = gql_qry._keys_only
  if not keys_only:
    keys_only = None
  options = QueryOptions(offset=offset, limit=limit, keys_only=keys_only)
  projection = gql_qry.projection()
  if gql_qry.is_distinct():
    group_by = projection
  else:
    group_by = None
  qry = query_class(kind=kind,
                    ancestor=ancestor,
                    filters=filters,
                    orders=orders,
                    default_options=options,
                    projection=projection,
                    group_by=group_by)
  return qry
1074898
def url_for_request(query, sort_by: nil, order: nil)
      url = "https://api.github.com/search/issues?q="
      url += ERB::Util.url_encode(query)
      url += "+repo:#{repo_owner}/#{repo_name}"
      url += "&sort=#{sort_by}" if sort_by
      url += "&order=#{order}" if order

      url
    end
470387
def parse_hash
      query.map do |key, value|
        new_value = value.is_a?(Array) ? ["$in", value] : value
        [key.to_s, new_value]
      end
    end
149012
def _doQueryHash( doQueryOptions )
     doQueryOptions ||= {}
     raise "options must be a Hash" unless doQueryOptions.is_a?(Hash)
     doQueryOptions["dbid"] ||= @dbid
     doQueryOptions["fmt"] ||= "structured"
     doQuery( doQueryOptions["dbid"], 
                   doQueryOptions["query"],
                   doQueryOptions["qid"], 
                   doQueryOptions["qname"], 
                   doQueryOptions["clist"], 
                   doQueryOptions["slist"], 
                   doQueryOptions["fmt"], 
                   doQueryOptions["options"] )
   end
187731
def hash_to_rets_query_string(hash)
      [].tap do |str|
        hash.each_pair do |k,v|
          val = value_map(v)
          str << "(#{k.to_s.camelize}=#{val})"
        end
      end.join(',')
    end