code: def _get_search_result(self, query_url, **query_params):
          
          param_q = query_params.get('q')
          param_query = query_params.get('query')
          # Either q or query parameter is required
          if bool(param_q) == bool(param_query):
              raise CloudantArgumentError(104, query_params)
  
          # Validate query arguments and values
          for key, val in iteritems_(query_params):
              if key not in list(SEARCH_INDEX_ARGS.keys()):
                  raise CloudantArgumentError(105, key)
              if not isinstance(val, SEARCH_INDEX_ARGS[key]):
                  raise CloudantArgumentError(106, key, SEARCH_INDEX_ARGS[key])
          # Execute query search
          headers = {'Content-Type': 'application/json'}
          resp = self.r_session.post(
              query_url,
              headers=headers,
              data=json.dumps(query_params, cls=self.client.encoder)
          )
          resp.raise_for_status()
          return response_to_json_dict(resp)
docs: Get search results helper.