def search_rules(query, params = {}, request_options = {})
      anchoring = params[:anchoring]
      context = params[:context]
      page = params[:page] || params['page'] || 0
      hits_per_page = params[:hitsPerPage] || params['hitsPerPage'] || 20
      params = {
        :query => query,
        :page => page,
        :hitsPerPage => hits_per_page
      }
      params[:anchoring] = anchoring unless anchoring.nil?
      params[:context] = context unless context.nil?
      client.post(Protocol.search_rules_uri(name), params.to_json, :read, request_options)
    end
def search_rules(query, params = {}, request_options = {})
      anchoring = params[:anchoring]
      context = params[:context]
      page = params[:page] || params['page'] || 0
      hits_per_page = params[:hitsPerPage] || params['hitsPerPage'] || 20
      params = {
        :query => query,
        :page => page,
        :hitsPerPage => hits_per_page
      }
      params[:anchoring] = anchoring unless anchoring.nil?
      params[:context] = context unless context.nil?
      client.post(Protocol.search_rules_uri(name), params.to_json, :read, request_options)
    end
Search rules

 @param query the query
 @param params an optional hash of :anchoring, :context, :page, :hitsPerPage
 @param request_options contains extra parameters to send with your query