Search for similar images from the ViSearch App given an existing image in the App.

@param searchParams the search parameters, must contain the im_name of the existing image
@return the page of search result
499268
@Override
    public PagedSearchResult search(SearchParams searchParams) {
        PagedSearchResult result = searchOperations.search(searchParams);
        if(result!=null && enableAutoSolutionActionTrack) {
            String reqId = result.getReqId();
            this.sendSolutionActions("search", reqId);
        }
        return result;
    }
840121
public function search($params)
    {
        $query = UserModel::find();
        if(array_key_exists("page", $params)&&array_key_exists("pageLimit", $params)){
            $query = $query->orderBy('id')
                    ->offset($params["page"]*$params["pageLimit"])
                    ->limit($params["pageLimit"]);
        }
        if(array_key_exists("status",$params)){
            $query->where(['status'=>$params["status"]]);
        }
        if(array_key_exists("q",$params)){
            $query->andFilterWhere(['like','username', $params["q"] ]);
        }
        $count = $query->count();
        $query=$query->all();


        return ['count'=>$count,'items'=>$query];
    }
1039787
static String appendQueryParameters( final CharSequence url, final Map<?, ?> params ) {
        final String baseUrl = url.toString();
        if( params == null || params.isEmpty() )
            return baseUrl;

        final StringBuilder result = new StringBuilder(baseUrl);

        addPathSeparator(baseUrl, result);
        addParamPrefix(baseUrl, result);

        Entry<?, ?> entry;
        Object value;
        Iterator<?> iterator = params.entrySet().iterator();
        entry = (Entry<?, ?>) iterator.next();
        result.append(entry.getKey().toString());
        result.append('=');
        value = entry.getValue();
        if( value != null )
            result.append(value);

        while( iterator.hasNext() ) {
            result.append('&');
            entry = (Entry<?, ?>) iterator.next();
            result.append(entry.getKey().toString());
            result.append('=');
            value = entry.getValue();
            if( value != null )
                result.append(value);
        }

        return result.toString();
    }
1329179
public MUCRoomEntities getChatRooms(Map<String, String> queryParams) {
		return restClient.get("chatrooms", MUCRoomEntities.class, queryParams);
	}
577526
public UriComponentsBuilder queryParams(MultiValueMap<String, String> params) {
		Assert.notNull(params, "'params' must not be null");
		this.queryParams.putAll(params);
		return this;
	}
486627
@Override
	public Set<ResourceIndexedSearchParamDate> extractSearchParamDates(ResourceTable theEntity, IBaseResource theResource) {
		HashSet<ResourceIndexedSearchParamDate> retVal = new HashSet<>();

		Collection<RuntimeSearchParam> searchParams = getSearchParams(theResource);
		for (RuntimeSearchParam nextSpDef : searchParams) {
			if (nextSpDef.getParamType() != RestSearchParameterTypeEnum.DATE) {
				continue;
			}

			String nextPath = nextSpDef.getPath();
			if (isBlank(nextPath)) {
				continue;
			}

			boolean multiType = false;
			if (nextPath.endsWith("[x]")) {
				multiType = true;
			}

			for (Object nextObject : extractValues(nextPath, theResource)) {
				if (nextObject == null) {
					continue;
				}

				ResourceIndexedSearchParamDate nextEntity;
				if (nextObject instanceof BaseDateTimeType) {
					BaseDateTimeType nextValue = (BaseDateTimeType) nextObject;
					if (nextValue.isEmpty()) {
						continue;
					}
					nextEntity = new ResourceIndexedSearchParamDate(nextSpDef.getName(), nextValue.getValue(), nextValue.getValue(), nextValue.getValueAsString());
				} else if (nextObject instanceof Period) {
					Period nextValue = (Period) nextObject;
					if (nextValue.isEmpty()) {
						continue;
					}
					nextEntity = new ResourceIndexedSearchParamDate(nextSpDef.getName(), nextValue.getStart(), nextValue.getEnd(), nextValue.getStartElement().getValueAsString());
				} else if (nextObject instanceof Timing) {
					Timing nextValue = (Timing) nextObject;
					if (nextValue.isEmpty()) {
						continue;
					}
					TreeSet<Date> dates = new TreeSet<>();
					String firstValue = null;
					for (DateTimeType nextEvent : nextValue.getEvent()) {
						if (nextEvent.getValue() != null) {
							dates.add(nextEvent.getValue());
							if (firstValue == null) {
								firstValue = nextEvent.getValueAsString();
							}
						}
					}
					if (dates.isEmpty()) {
						continue;
					}

					nextEntity = new ResourceIndexedSearchParamDate(nextSpDef.getName(), dates.first(), dates.last(), firstValue);
				} else if (nextObject instanceof StringType) {
					// CarePlan.activitydate can be a string
					continue;
				} else {
					if (!multiType) {
						throw new ConfigurationException("Search param " + nextSpDef.getName() + " is of unexpected datatype: " + nextObject.getClass());
					} else {
						continue;
					}
				}
				if (nextEntity != null) {
					nextEntity.setResource(theEntity);
					retVal.add(nextEntity);
				}
			}
		}

		return retVal;
	}
827487
private PagedSearchResult postImageSearch(UploadSearchParams uploadSearchParams, String endpointMethod) {
        ViSearchHttpResponse response = getPostImageSearchHttpResponse(uploadSearchParams, endpointMethod);
        return getPagedResult(response);
    }
1321990
public Page findPageParameter(Object paramObj) {
    Page page = null;
    if (paramObj instanceof Page) {
      page = (Page) paramObj;
    } else if (paramObj instanceof Map) {
      Map m = (Map) paramObj;
      for (Object o : m.values()) {
        if (o instanceof Page) {
          page = (Page) o;
          break;
        }
      }
    }
    if (page != null) {
      PAGE_THREAD_LOCAL.set(page);
    }
    return page;
  }
1241957
function (url, paramName, paramValue)
    {
      // if the specified url is valid
      var urlAsObject = Url.parse(url);
      if (urlAsObject)
      {
        // if the url already has query parameters, use '&' as the separator
        // when appending the additional query parameter, otherwise use '?'
        url += (urlAsObject.search ? '&' : '?') + paramName + '=' + paramValue;
      }

      return url;
    }
384441
static Style get(final GridParam params) {
        final StyleBuilder builder = new StyleBuilder();

        final Symbolizer pointSymbolizer = crossSymbolizer("shape://plus", builder, CROSS_SIZE,
                                                           params.gridColor);
        final Style style = builder.createStyle(pointSymbolizer);
        final List<Symbolizer> symbolizers = style.featureTypeStyles().get(0).rules().get(0).symbolizers();

        if (params.haloRadius > 0.0) {
            Symbolizer halo = crossSymbolizer("cross", builder, CROSS_SIZE + params.haloRadius * 2.0,
                                              params.haloColor);
            symbolizers.add(0, halo);
        }

        return style;
    }
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;
    }
957597
@Override
    public SearchResults getSearchResults(PortletRequest request, SearchRequest query) {

        final String queryString = query.getSearchTerms().toLowerCase();
        final List<IPortletDefinition> portlets =
                portletDefinitionRegistry.getAllPortletDefinitions();

        final HttpServletRequest httpServletRequest =
                this.portalRequestUtils.getPortletHttpRequest(request);

        final SearchResults results = new SearchResults();
        for (IPortletDefinition portlet : portlets) {
            if (this.matches(
                    queryString,
                    new MarketplacePortletDefinition(
                            portlet, this.marketplaceService, this.portletCategoryRegistry))) {
                final SearchResult result = new SearchResult();
                result.setTitle(portlet.getTitle());
                result.setSummary(portlet.getDescription());
                result.getType().add("marketplace");

                final IPortletWindow portletWindow =
                        this.portletWindowRegistry.getOrCreateDefaultPortletWindowByFname(
                                httpServletRequest, portlet.getFName());
                // portletWindow is null if user does not have access to portlet.
                // If user does not have browse permission, exclude the portlet.
                if (portletWindow != null
                        && authorizationService.canPrincipalBrowse(
                                authorizationService.newPrincipal(
                                        request.getRemoteUser(), EntityEnum.PERSON.getClazz()),
                                portlet)) {
                    final IPortletWindowId portletWindowId = portletWindow.getPortletWindowId();
                    final IPortalUrlBuilder portalUrlBuilder =
                            this.portalUrlProvider.getPortalUrlBuilderByPortletFName(
                                    httpServletRequest, portlet.getFName(), UrlType.RENDER);
                    final IPortletUrlBuilder portletUrlBuilder =
                            portalUrlBuilder.getPortletUrlBuilder(portletWindowId);
                    portletUrlBuilder.setWindowState(PortletUtils.getWindowState("maximized"));
                    result.setExternalUrl(portalUrlBuilder.getUrlString());

                    PortletUrl url = new PortletUrl();
                    url.setType(PortletUrlType.RENDER);
                    url.setPortletMode("VIEW");
                    url.setWindowState("maximized");
                    PortletUrlParameter actionParam = new PortletUrlParameter();
                    actionParam.setName("action");
                    actionParam.getValue().add("view");
                    url.getParam().add(actionParam);
                    PortletUrlParameter fNameParam = new PortletUrlParameter();
                    fNameParam.setName("fName");
                    fNameParam.getValue().add(portlet.getFName());
                    url.getParam().add(fNameParam);
                    result.setPortletUrl(url);
                    // Add the result to list to return
                    results.getSearchResult().add(result);
                }
            }
        }
        return results;
    }
824430
public List<CmsUser> searchUsers(CmsObject cms, CmsUserSearchParameters params) throws CmsException {

        return m_securityManager.searchUsers(cms.getRequestContext(), params);
    }
431629
public function search($searchParams = array())
    {
        $queryBuilder = $this->createQueryBuilder('e');

        if (!empty($searchParams)) {
            $searchAttributes = array(
                'recipients',
                'template',
                'sent',
                'variables',
                'token',
            );

            foreach ($searchAttributes as $attribute) {
                if (empty($searchParams[$attribute])) {
                    continue;
                }

                $attributeValue = $searchParams[$attribute];

                $queryBuilder->andWhere('e.'.$attribute.' LIKE :'.$attribute)
                    ->setParameter($attribute, '%'.$attributeValue.'%');
            }
        }

        return $queryBuilder->getQuery();
    }
1106060
@Action(
            domainEvent = FindUsersByNameDomainEvent.class,
            semantics = SemanticsOf.SAFE
    )
    @MemberOrder(sequence = "100.10.2")
    public List<ApplicationUser> findUsers(
            final @ParameterLayout(named = "Search") String search) {
        return applicationUserRepository.find(search);
    }
604067
static function search( $searchText, $params, $searchTypes = array() )
    {
        $searchEngine = eZSearch::getEngine();

        if ( $searchEngine instanceof ezpSearchEngine )
        {
            return $searchEngine->search( $searchText, $params, $searchTypes );
        }
    }
327449
public function search($params)
    {
        $query = SeoPresets::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
            'status' => $this->status,
        ]);

        $query->andFilterWhere(['like', 'key', $this->key])
            ->andFilterWhere(['like', 'comment', $this->comment])
            ->andFilterWhere(['like', 'meta_title', $this->meta_title])
            ->andFilterWhere(['like', 'meta_description', $this->meta_description])
            ->andFilterWhere(['like', 'seo_h1', $this->seo_h1])
            ->andFilterWhere(['like', 'seo_text', $this->seo_text]);

        return $dataProvider;
    }