Returns a SearchFeatureSetsResponse for the specified
        SearchFeatureSetsRequest object.
764205
def runSearchFeatureSets(self, request):
        
        return self.runSearchRequest(
            request, protocol.SearchFeatureSetsRequest,
            protocol.SearchFeatureSetsResponse,
            self.featureSetsGenerator)
601440
public GetPresetResponse getPreset(GetPresetRequest request) {
        checkNotNull(request, "The parameter request should NOT be null.");
        checkStringNotEmpty(request.getPresetName(), "The parameter presetName should NOT be null or empty string.");
        InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, PRESET, request.getPresetName());

        return invokeHttpClient(internalRequest, GetPresetResponse.class);
    }
1283667
public SearchSettings getSearchSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        SearchSettings request = new SearchSettings();
        request.setType(IQ.Type.get);
        request.setTo(workgroupJID);

        SearchSettings response = connection.createStanzaCollectorAndSend(request).nextResultOrThrow();
        return response;
    }
270799
def get_filterset(self, request, queryset, view):
        
        # TODO: .base_filters vs. .filters attr (not always present)
        filterset_class = self.get_filterset_class(view, queryset)
        kwargs = self.get_filterset_kwargs(request, queryset, view)
        self._validate_filter(kwargs.pop('filter_keys'), filterset_class)
        if filterset_class is None:
            return None
        return filterset_class(**kwargs)
1179427
public static responderaction[] get_filtered(nitro_service service, String filter) throws Exception{
		responderaction obj = new responderaction();
		options option = new options();
		option.set_filter(filter);
		responderaction[] response = (responderaction[]) obj.getfiltered(service, option);
		return response;
	}
105970
def get_queryset(self):
        
        entries = Entry.published.none()

        if self.request.GET:
            self.pattern = self.request.GET.get('pattern', '')
            if len(self.pattern) < 3:
                self.error = _('The pattern is too short')
            else:
                entries = Entry.published.search(self.pattern)
        else:
            self.error = _('No pattern to search found')
        return entries
707315
public FeatureRow getFeatureRow(UserCustomResultSet resultSet) {
		RTreeIndexTableRow row = getRow(resultSet);
		return getFeatureRow(row);
	}
1176976
def search(self, query, pagination, result_field):
        
        result = []
        url = "/".join((self.url, query))
        while url:
            log.debug("Pagure query: {0}".format(url))
            try:
                response = requests.get(url, headers=self.headers)
                log.data("Response headers:\n{0}".format(response.headers))
            except requests.RequestException as error:
                log.error(error)
                raise ReportError("Pagure search {0} failed.".format(self.url))
            data = response.json()
            objects = data[result_field]
            log.debug("Result: {0} fetched".format(
                listed(len(objects), "item")))
            log.data(pretty(data))
            # FIXME later: Work around https://pagure.io/pagure/issue/4057
            if not objects:
                break
            result.extend(objects)
            url = data[pagination]['next']
        return result
280642
def get(self, request, *args, **kwargs):
        
        if 'service_code' not in request.GET.keys():
            return Response({ 'detail': _('A service code must be inserted') }, status=404)

        service_code = request.GET['service_code']

        if service_code not in SERVICES.keys():
            return Response({ 'detail': _('Service not found') }, status=404)

        start_date = None
        end_date = None
        status = None
        layer = None

        STATUSES = {}
        for status_type in ('open', 'closed'):
            STATUSES[status_type] = [k for k, v in STATUS.items() if v == status_type]

        if 'start_date' in request.GET.keys():
            start_date = request.GET['start_date']
            if iso8601_REGEXP.match(start_date) is None:
                return Response({ 'detail': _('Invalid date inserted') }, status=404)

        if 'end_date' in request.GET.keys():
            end_date = request.GET['end_date']
            if iso8601_REGEXP.match(end_date) is None:
                return Response({ 'detail': _('Invalid date inserted') }, status=404)

        if 'status' in request.GET.keys():
            if request.GET['status'] not in ('open','closed'):
                return Response({ 'detail': _('Invalid status inserted') }, status=404)
            status = request.GET['status']

        if 'layer' in request.GET.keys():
            layer = request.GET['layer']
            node_layer = get_object_or_404(Layer, slug=layer)

        service_model = MODELS[service_code]
        if service_code in ('vote', 'comment', 'rate'):
            self.queryset = service_model.objects.none()
        else:
            self.queryset = service_model.objects.all()

            # Filter by layer
            if layer is not None:
                self.queryset = self.queryset.filter(layer = node_layer)

            # Check of date parameters
            if start_date is not None and end_date is not None:
                self.queryset = self.queryset.filter(added__gte = start_date).filter(added__lte = end_date)

            if start_date is not None and end_date is None:
                self.queryset = self.queryset.filter(added__gte = start_date)

            if start_date is None and end_date is not None:
                self.queryset = self.queryset.filter(added__lte = end_date)

        # Check of status parameter
        if status is not None:
            q_list = [Q(status__slug__exact = s) for s in STATUSES[status]]
            self.queryset = self.queryset.filter(reduce(operator.or_, q_list))
        return self.list(request, *args, **kwargs)
1284940
public JSONObject searchInFacetValues(String facetName, String facetQuery, Query params, RequestOptions requestOptions) throws AlgoliaException {
    params = params == null ? new Query() : params;
    String paramsString = params.setFacetQuery(facetQuery).getQueryString();
    JSONObject body = new JSONObject();
    String encodedFacetName;
    try {
      encodedFacetName = URLEncoder.encode(facetName, "UTF-8");
      body.put("params", paramsString);
    } catch (JSONException e) {
      throw new RuntimeException(e);
    } catch (UnsupportedEncodingException e) {
      throw new RuntimeException(e);
    }
    return client.postRequest("/1/indexes/" + encodedIndexName + "/facets/" + encodedFacetName + "/query", body.toString(), false, true, requestOptions);
  }
304098
private FrequentlyRelatedItemSearchResponse parseResponseObject(JSONObject object) {
        Object o = object.get(ERROR_KEY);
        if(o!=null) {
            if(o instanceof String) {
                return new FrequentlyRelatedItemSearchResponse(-1,true,(String)o,false,FrequentlyRelatedItemSearchResponse.EMPTY_FACETS);

            } else {
                return FrequentlyRelatedItemSearchResponse.RESPONSE_ERROR;
            }
        }
        else {
            long taken = getResponseTime(object);
            boolean timedOut = getTimedOut(object);
            TermFacet[] facets = getFacets(object);

            return new FrequentlyRelatedItemSearchResponse(taken,false,"",timedOut,facets);
        }
    }
596793
def runSearchVariantAnnotations(self, request):
        
        return self.runSearchRequest(
            request, protocol.SearchVariantAnnotationsRequest,
            protocol.SearchVariantAnnotationsResponse,
            self.variantAnnotationsGenerator)
1269047
public List<EsaResource> queryFeatures(String searchStr) throws InstallException {
        List<EsaResource> features = new ArrayList<EsaResource>();
        RepositoryConnectionList loginInfo = getResolveDirector().getRepositoryConnectionList(null, null, null, this.getClass().getCanonicalName() + ".queryFeatures");
        try {
            for (ProductInfo productInfo : ProductInfo.getAllProductInfo().values()) {
                log(Level.FINE, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("MSG_SEARCHING_FEATURES"));
                features.addAll(loginInfo.findMatchingEsas(searchStr, new ProductInfoProductDefinition(productInfo), Visibility.PUBLIC));
                log(Level.FINE, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("MSG_SEARCHING_ADDONS"));
                features.addAll(loginInfo.findMatchingEsas(searchStr, new ProductInfoProductDefinition(productInfo), Visibility.INSTALL));
            }
            log(Level.FINE, " ");
        } catch (ProductInfoParseException pipe) {
            throw ExceptionUtils.create(pipe);
        } catch (DuplicateProductInfoException dpie) {
            throw ExceptionUtils.create(dpie);
        } catch (ProductInfoReplaceException pire) {
            throw ExceptionUtils.create(pire);
        } catch (RepositoryException re) {
            throw ExceptionUtils.create(re, re.getCause(), getResolveDirector().getProxy(), getResolveDirector().defaultRepo());
        }
        return features;
    }
51274
@Override
    public FeatureResponseResult extractFeature(UploadSearchParams uploadSearchParams) {
        try {
            ViSearchHttpResponse response = getPostImageSearchHttpResponse(uploadSearchParams, ENDPOINT_EXTRACT_FEATURE);
            return getFeatureResponseResult(response);
        } catch (InternalViSearchException e) {
            return new FeatureResponseResult(e.getMessage(), e.getCause(), e.getServerRawResponse());
        }
    }
961310
def _filterSearchPhenotypesRequest(self, request):
        
        filters = []
        if request.id:
            filters.append("?phenotype = <{}>".format(request.id))

        if request.description:
            filters.append(
                'regex(?phenotype_label, "{}")'.format(request.description))
        # OntologyTerms
        # TODO: refactor this repetitive code
        if hasattr(request.type, 'id') and request.type.id:
            ontolgytermsClause = self._formatOntologyTermObject(
                request.type, 'phenotype')
            if ontolgytermsClause:
                filters.append(ontolgytermsClause)
        if len(request.qualifiers) > 0:
            ontolgytermsClause = self._formatOntologyTermObject(
                request.qualifiers, 'phenotype_quality')
            if ontolgytermsClause:
                filters.append(ontolgytermsClause)
        if hasattr(request.age_of_onset, 'id') and request.age_of_onset.id:
            ontolgytermsClause = self._formatOntologyTermObject(
                request.age_of_onset, 'phenotype_quality')
            if ontolgytermsClause:
                filters.append(ontolgytermsClause)
        return filters
538519
def searchResults(self, REQUEST=None, used=None, **kw):
    
    if REQUEST and REQUEST.get('getRequestUID') \
            and self.id == CATALOG_ANALYSIS_LISTING:

        # Fetch all analyses that have the request UID passed in as an ancestor,
        # cause we want Primary ARs to always display the analyses from their
        # derived ARs (if result is not empty)

        request = REQUEST.copy()
        orig_uid = request.get('getRequestUID')

        # If a list of request uid, retrieve them sequentially to make the
        # masking process easier
        if isinstance(orig_uid, list):
            results = list()
            for uid in orig_uid:
                request['getRequestUID'] = [uid]
                results += self.searchResults(REQUEST=request, used=used, **kw)
            return results

        # Get all analyses, those from descendant ARs included
        del request['getRequestUID']
        request['getAncestorsUIDs'] = orig_uid
        results = self.searchResults(REQUEST=request, used=used, **kw)

        # Masking
        primary = filter(lambda an: an.getParentUID == orig_uid, results)
        derived = filter(lambda an: an.getParentUID != orig_uid, results)
        derived_keys = map(lambda an: an.getKeyword, derived)
        results = filter(lambda an: an.getKeyword not in derived_keys, primary)
        return results + derived

    # Normal search
    return self._catalog.searchResults(REQUEST, used, **kw)
664544
def retrieve(self, request, *args, **kwargs):
        
        return super(BaseServiceProjectLinkViewSet, self).retrieve(request, *args, **kwargs)