Recommendation for similar images from the ViSearch App given an existing image in the App.
@param searchParams
@return
427604
public PagedSearchResult recommendation(SearchParams searchParams) {
        PagedSearchResult result = searchOperations.recommendation(searchParams);
        if(result!=null && enableAutoSolutionActionTrack) {
            String reqId = result.getReqId();
            this.sendSolutionActions("recommendation", reqId);
        }
        return result;
    }
1171577
public SearchResult getSuggestions(StaplerRequest req, String query) {
        Set<String> paths = new HashSet<>();  // paths already added, to control duplicates
        SearchResultImpl r = new SearchResultImpl();
        int max = req.hasParameter("max") ? Integer.parseInt(req.getParameter("max")) : 100;
        SearchableModelObject smo = findClosestSearchableModelObject(req);
        for (SuggestedItem i : suggest(makeSuggestIndex(req), query, smo)) {
            if(r.size()>=max) {
                r.hasMoreResults = true;
                break;
            }
            if(paths.add(i.getPath()))
                r.add(i);
        }
        return r;
    }
820558
public Collection<BrowserApplication> list(List<String> queryParams)
    {
        return HTTP.GET("/v2/browser_applications.json", null, queryParams, BROWSER_APPLICATIONS).get();
    }
1335655
private SearchFilter getSearchFilter(HttpServletRequest httpServletRequest) {
        SearchFilter ret = new SearchFilter();
        Set<String> keySet = httpServletRequest.getParameterMap().keySet();
        for (String key : keySet) {
            ret.setParam(String.valueOf(key), String.valueOf(httpServletRequest.getParameter(key)));
        }

        return ret;
    }
713313
public Object searchGreater(
                               Object            searchKey)
    {
        SearchComparator comp = searchComparator(SearchComparator.GT);
        Object p = find(comp, searchKey);
        return p;
    }
672591
protected QueryParameters[] getQueryParams(Object[][] params) {
        QueryParameters[] result = new QueryParameters[params.length];

        for (int i = 0; i < params.length; i++) {
            result[i] = new QueryParameters(params[i]);
        }

        return result;
    }
444389
public static SearchExecutor newSearchExecutor(final String baseDn, final String filterQuery, final String... params) {
        final SearchExecutor executor = new SearchExecutor();
        executor.setBaseDn(baseDn);
        executor.setSearchFilter(newSearchFilter(filterQuery, params));
        executor.setReturnAttributes(ReturnAttributes.ALL.value());
        executor.setSearchScope(SearchScope.SUBTREE);
        return executor;
    }
275030
public static SearchFilter newSearchFilter(final String filterQuery, final String... params) {
        final SearchFilter filter = new SearchFilter();
        filter.setFilter(filterQuery);
        if (params != null) {
            for (int i = 0; i < params.length; i++) {
                if (filter.getFilter().contains("{" + i + "}")) {
                    filter.setParameter(i, params[i]);
                } else {
                    filter.setParameter("user", params[i]);
                }
            }
        }
        LOGGER.debug("Constructed LDAP search filter [{}]", filter.format());
        return filter;
    }
1000466
public PhotoList<Photo> search(SearchParameters params, int perPage, int page) throws FlickrException {
        PhotoList<Photo> photos = new PhotoList<Photo>();

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_SEARCH);

        parameters.putAll(params.getAsParameters());

        if (perPage > 0) {
            parameters.put("per_page", "" + perPage);
        }
        if (page > 0) {
            parameters.put("page", "" + page);
        }

        Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
        Element photosElement = response.getPayload();
        photos.setPage(photosElement.getAttribute("page"));
        photos.setPages(photosElement.getAttribute("pages"));
        photos.setPerPage(photosElement.getAttribute("perpage"));
        photos.setTotal(photosElement.getAttribute("total"));

        NodeList photoNodes = photosElement.getElementsByTagName("photo");
        for (int i = 0; i < photoNodes.getLength(); i++) {
            Element photoElement = (Element) photoNodes.item(i);
            photos.add(PhotoUtils.createPhoto(photoElement));
        }
        return photos;
    }
545418
public Object searchGreaterOrEqual(
                                      Object            searchKey)
    {
        SearchComparator comp = searchComparator(SearchComparator.GE);
        Object p = find(comp, searchKey);
        return p;
    }
881918
public JSONObject find(HashMap<String, String> params) throws JSONException {   
        return oClient.get("/profiles/v2/search/providers", params);
    }
555653
public BoxRequestsSearch.Search getSearchRequest(String query) {
        BoxRequestsSearch.Search request = new BoxRequestsSearch.Search(query, getSearchUrl(), mSession);
        return request;
    }
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);
  }
252962
@Override
    public PagedSearchResult colorSearch(ColorSearchParams colorSearchParams) {
        PagedSearchResult result = searchOperations.colorSearch(colorSearchParams);
        if(result!=null && enableAutoSolutionActionTrack) {
            String reqId = result.getReqId();
            this.sendSolutionActions("colorsearch", reqId);
        }
        return result;
    }
760979
@Programmatic
    public List<ApplicationUser> find(final String search) {
        final String regex = String.format("(?i).*%s.*", search.replace("*", ".*").replace("?", "."));
        return container.allMatches(new QueryDefault<>(
                ApplicationUser.class,
                "find", "regex", regex));
    }
551526
public Map<String, String> getUriVariablesForIdSearch(BullhornEntityInfo entityInfo,
                                                                 String query,
                                                                 SearchParams params) {

        Map<String, String> uriVariables = params.getParameterMap();

        uriVariables.put(BH_REST_TOKEN, bullhornApiRest.getBhRestToken());
        uriVariables.put(ENTITY_TYPE, entityInfo.getName());
        uriVariables.put(QUERY, query);

        return uriVariables;
    }
1114580
public static ImageItem create(final ImageParams imageParams) {
        // Ensure that the uid will be unique at runtime
        return ImageItemImpl.create().uid(imageIdGenerator.incrementAndGet()).set(imageParams);
    }