Indexes the model in Elasticsearch.

@return array
480725
public function index()
    {
        $params = $this->basicElasticParams(true);
        $params['body'] = $this->documentFields();

        return $this->getElasticClient()->index($params);
    }
629595
public function index($index)
    {
        if (empty($this->indexes[$index])) {
            throw new ModelException(sprintf('Unknown index, index "%s" not found in model "%s"', $index, $this->entity));
        }

        return $this->indexes[$index];
    }
201886
public function actionIndex()
	{
		$dataProvider = \App::$domain->account->login->getDataProvider();
		return $this->render('index', [
			'dataProvider' => $dataProvider,
			//'searchModel' => $searchModel,
			'idField' => 'id',
			'usernameField' => $this->usernameField,
			'extraColumns' => $this->extraColumns,
		]);
	}
11612
private function query()
    {
        foreach ($this->search_models as $model_name => $filters) {
            // Apply search against the original model.
            if ($model_name === 'self') {
                self::applySearch($this->query, $filters);
                continue;
            }

            // Apply search against the related model.
            $this->query->whereHas($model_name, function ($query) use ($filters) {
                self::applySearch($query, $filters);
            });
        }

        return $this->query;
    }
83940
public function getAllIndexNames()
    {
        $indexes = [];
        foreach ($this->getClassesAndAnnotations() as $configuration) {
            /** @var Indexable $configuration */
            $indexes[$configuration->indexName] = $configuration->indexName;
        }

        return array_keys($indexes);
    }
1252843
protected function getIndexes()
    {
        $indexes = [];
        $rawIndexes = $this->getRawIndexes();

        foreach ($rawIndexes as $rawIndex) {
            $index = new Index($rawIndex->name);
            $index->addColumns(explode('|||', $rawIndex->columns));

            $indexes[] = $index;
        }

        return $indexes;
    }
392644
public function actionIndex()
    {
        $model = $this->getModel();

        $data = Yii::$app->request->post($model->formName());
        if (empty($data)) {
            $data = $this->getThemeSettingsStorage()->get();
        }

        if (Yii::$app->request->getIsPost() && $model->load($data) && $model->validate()) {
            $this->getThemeSettingsStorage()->set($model);
            $this->setGlobalOrientation($model->filterOrientation);
            Yii::$app->session->setFlash('success', Yii::t('hiqdev.thememanager', 'Layout settings saved.'));
        }

        if (Yii::$app->request->isAjax) {
            return $this->renderAjax('//settings/_form', compact('model'));
        }

        return $this->render('index', compact('model'));
    }
1220583
public function getIndices(): array
    {
        $appId = $this->getAppKey();

        $result = [];
        foreach ($this->indices as $index => $_) {
            if (false !== preg_match("/(?P<app_id>[^_]+)\_(?P<id>[\S]+)/", $index, $matches)) {
                if (!empty($appId) && $matches['app_id'] !== $appId) {
                    continue;
                }

                $indexMeta = [
                    'uuid' => ['id' => $matches['id']],
                    'app_id' => ['id' => $matches['app_id']],
                    'doc_count' => 0,
                ];

                $result[] = Index::createFromArray($indexMeta);
            }
        }

        return $result;
    }
1302984
public function getIndexedProperties()
    {
        $props = [];
        foreach ($this->properties as $property) {
            if ($property->isIndexed()) {
                $props[] = $property;
            }
        }

        return $props;
    }
131350
public function toArray()
    {
        $result = [
            'name' => $this->init['name'],
            'apiVersion' => $this->init['apiVersion'],
            'baseUri' => isset($this->init['baseUri']) ? $this->init['baseUri'] : '',
            'description' => $this->init['description'],
        ];
        $result['operations'] = $this->operations;
        if (!empty($this->models)) {
            $result['models'] = $this->models;
        }

        return array_filter($result);
    }
808443
protected function elasticToModel()
    {
        $items = array();

        foreach ($this->response['hits']['hits'] as $hit) {
            $items[] = $this->instance->newFromElasticResults($hit);
        }

        return $items;
    }
1189125
public function getIndex(): Index
    {
        $index = $this->searchClient->findIndex($this->getIndexName());
        $index->setSettingsKey($this->searchClient->getIndexName());

        return $index;
    }
1292890
public function actionIndex()
    {
        $searchModel = new AuthItemSearch(['type' => Item::TYPE_ROLE]);
        $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());
        return $this->render('index', [
            'dataProvider' => $dataProvider,
            'searchModel' => $searchModel,
            'controller' => $this,
        ]);
    }
58187
public function actionIndex()
    {
        $model = new Country();
        if ($model->load(\Yii::$app->request->post()) && $model->save()) {
            $model = new Country(); //reset model
        }

        $searchModel = new CountrySearch();
        $dataProvider = $searchModel->search(\Yii::$app->request->queryParams);

        return $this->render('index', [
                    'searchModel' => $searchModel,
                    'dataProvider' => $dataProvider,
                    'model' => $model,
        ]);
    }
1204969
public function getAllIndexes()
    {
        $result = [new Index('id', ['id'], IndexInterface::PRIMARY)];

        if ($this->getPolymorph()) {
            $result[] = new Index('type');
        }

        if (!empty($this->getIndexes())) {
            $result = array_merge($result, $this->getIndexes());
        }

        foreach ($this->getAssociations() as $assosication) {
            if ($assosication instanceof InjectIndexesInsterface) {
                $association_indexes = $assosication->getIndexes();

                if (!empty($association_indexes)) {
                    $result = array_merge($result, $association_indexes);
                }
            }
        }

        return $result;
    }
64354
public function actionIndex()
    {
        $searchModel = Yii::createObject(AuthenticationSearch::className());
        $dataProvider = $searchModel->search(Yii::$app->request->get());

        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }
1184799
public function actionIndex()
    {
        $searchModel = new UserSearch();
        return $this->render('index', [
            'dataProvider' => $searchModel->search(Yii::$app->request->get(), true),
            'searchModel' => $searchModel
        ]);
    }