Execute the search and return the response.
1258
def execute(self):
        
        r = self._s.execute()
        r._faceted_search = self
        return r
767314
def execute(self, query, *parameters, **kwargs):
        """"""
        cursor = self._cursor()
        try:
            self._execute(cursor, query, parameters, kwargs)

        except:
            raise

        finally:
            cursor.close()
991664
@Override
    public void execute() {
        try {
            String str = editor.readLine("Find:");
            editor.findNext(str);
            FindContext.setLastSearch(str);
        } catch (IOException e) {
            //noop
        }
    }
863095
def get_response(self):
        """"""
        request = getattr(requests, self.request_method, None)
        if request is None and self._request_method is None:
            raise ValueError("A effective http request method must be set")
        if self.request_url is None:
            raise ValueError(
                "Fatal error occurred, the class property \"request_url\" is"
                "set to None, reset it with an effective url of dingtalk api."
            )
        response = request(self.request_url, **self.kwargs)
        self.response = response
        return response
1035552
public function execute()
    {
        $params = $this->getRequest()->getParams();

        //if no value to any of the required params send error response
        if (empty($params['apiUser']) ||
            empty($params['pass']) ||
            empty($params['code']) ||
            ! $this->isCodeValid($params['code'])
        ) {
            $this->sendAjaxResponse(true);
        } else {
            $this->processAccountCallback($params);
        }
    }
1330379
def execute(self, data):
        """"""
        if Crawl.is_aborted(self.crawler, self.run_id):
            return

        try:
            Crawl.operation_start(self.crawler, self.stage, self.run_id)
            self.log.info('[%s->%s(%s)]: %s',
                          self.crawler.name,
                          self.stage.name,
                          self.stage.method_name,
                          self.run_id)
            return self.stage.method(self, data)
        except Exception as exc:
            self.emit_exception(exc)
        finally:
            Crawl.operation_end(self.crawler, self.run_id)
            shutil.rmtree(self.work_path)
335172
def execute(self, requests, resp_generator, *args, **kwargs):
        '''
            
        '''
        return [resp_generator(request) for request in requests]
195656
def index(request):
    """"""
    if request.method == 'GET':
        return get(request)
    elif request.method == 'POST':
        return post(request)
    return HttpResponse('')
466930
def search(self, kw):
		'''
		'''
		if not kw:
			return requests.codes.bad_request, None

		code, data = self._req('get', self.search_uri + kw)

		return code, data
34317
def process_requests(self):
        
        while True:
            id, args, kwargs = self.request_queue.get()
            try:
                response = self._make_request(*args, **kwargs)
            except Exception as e:
                response = e
            self.results[id] = response
236512
def search(self, q, **kw):
        """"""
        url = '{base_url}/search/{stream}'.format(**vars(self))

        params = {
            'q': q,
        }
        params.update(self.params)
        params.update(kw)

        response = self.session.get(url, params=params)
        response.raise_for_status()
        return response.json()
967206
def _execute_query(self):
        ''''''
        pipe = self.pipe
        if not self.card:
            if self.meta.ordering:
                self.ismember = getattr(self.backend.client, 'zrank')
                self.card = getattr(pipe, 'zcard')
                self._check_member = self.zism
            else:
                self.ismember = getattr(self.backend.client, 'sismember')
                self.card = getattr(pipe, 'scard')
                self._check_member = self.sism
        else:
            self.ismember = None
        self.card(self.query_key)
        result = yield pipe.execute()
        yield result[-1]
1304595
def execute(self, request):
        """"""
        url = request.uri
        if request.parameters:
            url += '?' + urlencode(request.parameters)

        if request.headers:
            headers = dict(self._headers, **request.headers)
        else:
            headers = self._headers

        
        retry = 0
        server = getattr(self._local, "server", None)
        while True:
            if not server:
                self._local.server = server = self._get_server()
            try:
                parse_result = urlparse(server)
                conn = get_pool().connection_from_host(parse_result.hostname,
                                                         parse_result.port,
                                                         parse_result.scheme)
                kwargs = dict(
                    method=Method._VALUES_TO_NAMES[request.method],
                    url=parse_result.path + url,
                    body=request.body,
                    headers=headers,
                    timeout=self._timeout,
                )

                response = conn.urlopen(**kwargs)
                return RestResponse(status=response.status,
                                    body=response.data,
                                    headers=response.headers)
            except (IOError, urllib3.exceptions.HTTPError) as ex:
                self._drop_server(server)
                self._local.server = server = None
                if retry >= self._max_retries:
                    logger.error("Client error: bailing out after %d failed retries",
                                 self._max_retries, exc_info=1)
                    raise NoServerAvailable(ex)
                logger.exception("Client error: %d retries left", self._max_retries - retry)
                retry += 1
687744
def execute(self, fn, *args, **kwargs):
        """"""
        if self.in_executor_context():
            return fn(*args, **kwargs)
        task = self.submit(fn, *args, **kwargs)
        return task.result()
360172
def execute(self, return_results=True):
        '''
        
        '''
        if self.results:
            return self.results if return_results else None

        self.execute_raw()

        if self._raw_results_only:
            self.results = self.raw_results
        else:
            self.map_results()

        if return_results:
            return self.results
816261
private function processSearchResponse()
    {
        /** @var SearchResponse $obj_search_response */
        $obj_search_response = $this->obj_last_response;
        $obj_response = (object)[
            'status' => $this->describeStatusCode($obj_search_response->getStatus()->getCode()),
            'hits' => $obj_search_response->getMatchedCount(),
            'count' => $obj_search_response->getResultSize(),
            'results' => []
        ];
        $obj_mapper = new Mapper();
        foreach($obj_search_response->getResultList() as $obj_result) {
            /** @var SearchResult $obj_result */
            $obj_doc = $obj_mapper->fromGoogle($obj_result->getDocument(), $obj_result->getExpressionList());
            $obj_response->results[] = (object)[
                'score' => ($obj_result->getScoreSize() > 0 ? $obj_result->getScore(0) : 0),
                'doc' => $obj_doc
            ];
        }

        // Map facets from results
        // @todo Restructure/review response object and moving this code to Mapper
        if($obj_search_response->getFacetResultSize() > 0) {
            $obj_response->facets = []; // create the empty facets placeholder in the response
            /** @var \google\appengine\FacetResult $obj_facet */
            foreach($obj_search_response->getFacetResultList() as $obj_facet) {
                $arr_facet_values = [];
                /** @var \google\appengine\FacetResultValue $obj_facet_value */
                foreach($obj_facet->getValueList() as $obj_facet_value) {
                    $arr_facet_values[] = [
                        'agg' => $obj_facet_value->getName(),
                        'count' => $obj_facet_value->getCount()
                    ];
                }
                $obj_response->facets[$obj_facet->getName()] = $arr_facet_values;
            }
        }

        return $obj_response;
    }
596416
def main(search, query):
    """"""
    url = search.search(query)
    print(url)
    search.open_page(url)