执行搜索操作。

@param \OpenSearch\Generated\Search\SearchParams $searchParams 制定的搜索条件。
@return \OpenSearch\Generated\Common\OpenSearchResult OpenSearchResult类
775738
public function execute(SearchParams $searchParams) {
        $path = self::getPath($searchParams);
        $params = SuggestParamsBuilder::getQueryParams($searchParams);
        return $this->openSearchClient->get($path, $params);
    }
1063134
public function search($params)
    {
        $this->load($params);
        $query = NutsLocation::find();

        $query->where(['country_id'=>$this->country_id,'postcode'=>$this->postcode,]);

        $this->pageSize = 1;

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'pagination' => ($this->pagination ? [
                'pageSize' => $this->pageSize,
                    ] : FALSE),
            'sort' => [
                'attributes' => [
                    'postcode'
                ],
            ]
        ]);



        return $dataProvider;
    }
920163
public function execute($url, $params = [])
    {
        $uri = rtrim(rtrim($this->site, '/') . '/' . ltrim($url, '/') . '?' . http_build_query($params), '?');

        try {
            $result = $this->client->get($uri, ['timeout' => 10])->getBody();

            return ($this->format === 'json') ? json_decode($result) : (string) $result;
        } catch (\Exception $e) {
            if ($this->isRetry) {
                $msg = "Error connecting to the Extension Marketplace:\n" . $e->getMessage();
                throw new SatisQueryException($msg, $e->getCode(), $e);
            }
            $this->isRetry = true;
            $this->site = str_replace('https://', 'http://', $this->site);

            return $this->execute($url, $params);
        }
    }
841049
public function search($params)
    {
        $query = Language::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,
            'domain_id' => $this->domain_id,
            'bydefault' => $this->bydefault,
            'status' => $this->status,
            'position' => $this->position,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
        ]);

        $query->andFilterWhere(['like', 'slug', $this->slug])
            ->andFilterWhere(['like', 'name', $this->name])
            ->andFilterWhere(['like', 'locale', $this->locale])
            ->andFilterWhere(['like', 'alias', $this->alias])
            ->andFilterWhere(['like', 'icon_id', $this->icon_id]);

        return $dataProvider;
    }
361222
public function search($params)
    {
        $query = OrderStatus::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,
        ]);

//        $query->andFilterWhere(['like', 'title', $this->title]);

        return $dataProvider;
    }
816153
public function queryProcessing($queryParams) 
    {
        $driver = strtolower($this->connection->getAttribute(PDO::ATTR_DRIVER_NAME));
        //drivers = Array ( [0] => mysql [1] => oci [2] => pgsql [3] => sqlite [4] => sqlsrv )
        switch ($driver) {
        case 'mysql':
            list($this->query, $this->totalQuery, $this->filterQuery)
                = MySQLDataSource::processQuery($this->query, $queryParams);
            break;
        case 'oci':
            list($this->query, $this->totalQuery, $this->filterQuery)
                = OracleDataSource::processQuery($this->query, $queryParams);
            break;
        case 'pgsql':
            list($this->query, $this->totalQuery, $this->filterQuery)
                = PostgreSQLDataSource::processQuery($this->query, $queryParams);
            break;
        case 'sqlsrv':
            list($this->query, $this->totalQuery, $this->filterQuery)
                = SQLSRVDataSource::processQuery($this->query, $queryParams);
            break;
        default:
            break;
        }
        $this->countTotal = Util::get($queryParams, 'countTotal', false);
        $this->countFilter = Util::get($queryParams, 'countFilter', false);
        return $this;
    }
1306474
public function search($params)
    {
        /* @var \yii\rbac\DbManager $authManager */
        $authManager = Yii::$app->authManager;
        $models = [];
        $included = !($this->load($params) && $this->validate() && trim($this->name) !== '');
        foreach ($authManager->getRules() as $name => $item) {
            if ($name != RouteRule::RULE_NAME && ($included || stripos($item->name, $this->name) !== false)) {
                $models[$name] = new AdminBizRule($item);
            }
        }

        return new ArrayDataProvider([
            'allModels' => $models,
        ]);
    }
109702
public function search($params)
    {
        $query = Pkk5kadastr::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,
        ]);

        $query->andFilterWhere(['like', 'kadastrnumber', $this->kadastrnumber])
            ->andFilterWhere(['like', 'address', $this->address])
            ->andFilterWhere(['like', 'cost', $this->cost])
            ->andFilterWhere(['like', 'area', $this->area]);

        return $dataProvider;
    }
544850
public function search($params)
    {
        $query = UserWithRoles::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,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
        ]);

        $query->andFilterWhere(['like', 'username', $this->username])
            ->andFilterWhere(['like', 'auth_key', $this->auth_key])
          //->andFilterWhere(['like', 'email_confirm_token', $this->email_confirm_token])
            ->andFilterWhere(['like', 'password_hash', $this->password_hash])
            ->andFilterWhere(['like', 'password_reset_token', $this->password_reset_token])
            ->andFilterWhere(['like', 'email', $this->email]);

        // looking for roles
        if (!empty($this->roles)) {
            $query->alias('user')->leftJoin(['role' => AuthAssignment::tableName()], "user.id = role.user_id");
            if ($this->roles == self::ROLE_LOGINED) {
                $query->andWhere(['item_name' => null]);
            } else {
                $query->andFilterWhere(['like', 'item_name', $this->roles]);
            }
        }

        return $dataProvider;
    }
176081
public function search($params)
    {
        $query = ShopAttribute::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,
            'type_id' => $this->type_id,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
        ]);

        return $dataProvider;
    }
1262240
public function select( $params ) {

		global $wpdb;

		$cache_key = false;
		$results   = false;

		/**
		 * Filter select parameters before the query
		 *
		 * @param array|object    $params
		 * @param PodsData|object $this The current PodsData class instance.
		 *
		 * @since unknown
		 */
		$params = apply_filters( 'pods_data_pre_select_params', $params, $this );

		// Debug purposes.
		if ( 1 === (int) pods_v( 'pods_debug_params', 'get', 0 ) && pods_is_admin( array( 'pods' ) ) ) {
			pods_debug( $params );
		}

		// Get from cache if enabled.
		if ( null !== pods_v( 'expires', $params, null, true ) ) {
			$cache_key = md5( (string) $this->pod . serialize( $params ) );

			$results = pods_view_get( $cache_key, pods_v( 'cache_mode', $params, 'cache', true ), 'pods_data_select' );

			if ( empty( $results ) ) {
				$results = false;
			}
		}

		if ( empty( $results ) ) {
			// Build.
			$this->sql = $this->build( $params );

			// Debug purposes.
			if ( ( 1 === (int) pods_v( 'pods_debug_sql', 'get', 0 ) || 1 === (int) pods_v( 'pods_debug_sql_all', 'get', 0 ) ) && pods_is_admin( array( 'pods' ) ) ) {
				echo '<textarea cols="100" rows="24">' . esc_textarea(
					str_replace(
						array(
							'@wp_users',
							'@wp_',
						), array( $wpdb->users, $wpdb->prefix ), $this->sql
					)
				) . '</textarea>';
			}

			if ( empty( $this->sql ) ) {
				return array();
			}

			// Get Data.
			$results = pods_query( $this->sql, $this );

			// Cache if enabled.
			if ( false !== $cache_key ) {
				pods_view_set( $cache_key, $results, pods_v( 'expires', $params, 0, false ), pods_v( 'cache_mode', $params, 'cache', true ), 'pods_data_select' );
			}
		}//end if

		/**
		 * Filter results of Pods Query
		 *
		 * @param array           $results
		 * @param array|object    $params
		 * @param PodsData|object $this The current PodsData class instance.
		 *
		 * @since unknown
		 */
		$results = apply_filters( 'pods_data_select', $results, $params, $this );

		$this->data = $results;

		$this->row_number = - 1;
		$this->row        = null;

		// Fill in empty field data (if none provided).
		if ( ( ! isset( $this->fields ) || empty( $this->fields ) ) && ! empty( $this->data ) ) {
			$this->fields = array();
			$data         = (array) @current( $this->data );

			foreach ( $data as $data_key => $data_value ) {
				$this->fields[ $data_key ] = array( 'label' => ucwords( str_replace( '-', ' ', str_replace( '_', ' ', $data_key ) ) ) );
				if ( isset( $this->pod_data['object_fields'][ $data_key ] ) ) {
					$this->fields[ $data_key ] = $this->pod_data['object_fields'][ $data_key ];
				}
			}

			$this->fields = PodsForm::fields_setup( $this->fields );
		}

		$this->total_found_calculated = false;

		$this->total = 0;

		if ( ! empty( $this->data ) ) {
			$this->total = count( (array) $this->data );
		}

		/**
		 * Filters whether the total_found should be calculated right away or not.
		 *
		 * @param boolean  $auto_calculate_total_found Whether to auto calculate total_found.
		 * @param array    $params                     Select parameters.
		 * @param PodsData $this                       The current PodsData instance.
		 *
		 * @since 2.7.11
		 */
		if ( apply_filters( 'pods_data_auto_calculate_total_found', false, $params, $this ) ) {
			// Run the calculation logic.
			$this->calculate_totals();
		}

		return $this->data;
	}
418234
public function expandQuery(QueryInterface $searchQuery, array $requestParameters = [])
    {
        if ($this->hasDate($requestParameters)) {
            $this->addDateFilterToQuery($searchQuery->getSearchQuery(), $this->getDateFrom($requestParameters));
        }

        return $searchQuery;
    }
517297
public static function search($query, array $searchParameters = null)
    {
        $manager = static::getAlgoliaManager();

        return $manager->search(__CLASS__, $query, $searchParameters);
    }
659123
public function search($params)
    {
        $query = Seo::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'sort' => [
                'defaultOrder' => ['id' => SORT_DESC],
            ],
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            Seo::tableName() . '.id' => $this->id,
        ])->andFilterWhere(['LIKE', Seo::tableName() . '.title', $this->title])
            ->andFilterWhere(['LIKE', Seo::tableName() . '.description', $this->description]);
        return $dataProvider;
    }
239951
public function search($params)
    {
        $query = Message::find();
        $query->joinWith('source');
        
        $dataProvider = new ActiveDataProvider(['query' => $query]);
        $dataProvider->getSort()->attributes['sourceMessage'] = [
            'asc' => ['source.message' => SORT_ASC],
            'desc' => ['source.message' => SORT_DESC],
        ];
        $dataProvider->getSort()->attributes['sourceCategory'] = [
            'asc' => ['source.category' => SORT_ASC],
            'desc' => ['source.category' => SORT_DESC],
        ];

        if (!($this->load($params) && $this->validate())) {
            return $dataProvider;
        }

        $query->andFilterWhere(['id' => $this->id]);
        if ($this->translation) {
            $t = addslashes($this->translation);
            $query->where("translation like '%{$t}%'");
        }

        if ($this->translationUpdate === 'is null') {
            $query->where('translation is null');
        }
        if ($this->translationUpdate === 'is not null') {
            $query->where('translation is not null');
        }

        if ($this->translation) {
            $query->andWhere(['like', 'translation', '%' . $this->translation .'%', false]);
        }
        if ($this->sourceMessage) {
            $query->andFilterWhere(['like', 'source.message', $this->sourceMessage]);
        }

        if ($this->language) {
            $query->andWhere(['language' => $this->language]);
        }
        
        if ($this->sourceCategory) {
            $query->andFilterWhere(['like', 'source.category', $this->sourceCategory]);
        }
        return $dataProvider;
    }
1296885
public function search($params)
    {
        /* @var \yii\rbac\Manager $authManager */
        $authManager = Configs::authManager();
        if ($this->type == Item::TYPE_ROLE) {
            $items = $authManager->getRoles();
        } else {
            $items = array_filter($authManager->getPermissions(), function($item) {
                return $this->type == Item::TYPE_PERMISSION xor strncmp($item->name, '/', 1) === 0;
            });
        }
        $this->load($params);
        if ($this->validate()) {

            $search = mb_strtolower(trim($this->name));
            $desc = mb_strtolower(trim($this->description));
            $ruleName = $this->ruleName;
            foreach ($items as $name => $item) {
                $f = (empty($search) || mb_strpos(mb_strtolower($item->name), $search) !== false) &&
                    (empty($desc) || mb_strpos(mb_strtolower($item->description), $desc) !== false) &&
                    (empty($ruleName) || $item->ruleName == $ruleName);
                if (!$f) {
                    unset($items[$name]);
                }
            }
        }

        return new ArrayDataProvider([
            'allModels' => $items,
        ]);
    }
313992
public function search($params)
    {
        $query = AuthRule::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        if (!($this->load($params) && $this->validate())) {
            return $dataProvider;
        }
        $query->andFilterWhere([
                'created_at' => $this->created_at,
                'updated_at' => $this->updated_at,
            ]);
        $query->andFilterWhere(['like', 'name', $this->name])
            ->andFilterWhere(['like', 'data', $this->data]);
        return $dataProvider;
    }