creates an index
@param $index
@param array $configuration
@return mixed
@see http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html
18189
public function createIndex($index, $configuration = null)
    {
        $body = $configuration !== null ? Json::encode($configuration) : null;

        return $this->db->put([$index], [], $body);
    }
1144428
public static function fromIndex(Db\Index $index)
    {
        return new self([
            'name' => $index->getName(),
            'columns' => $index->getColumns(),
            'type' => $index->getType()
        ]);
    }
766501
protected function createZedClient($index = null): Index
    {

        if ($index === null) {
            $index = Config::get(ConditionalAvailabilityConstants::ELASTICA_PARAMETER__INDEX_NAME);
        }

        return parent::createZedClient($index);
    }
453613
public boolean createIndex(String indexName) {
        CreateIndexResponse response =
                getClient().admin().indices().prepareCreate(indexName).execute().actionGet();
        return response.isAcknowledged();
    }
963845
public function addConfiguration(array $configuration)
    {
        $this ->configuration->setParameter(
            'configuration',
            array_merge(
                $this->configuration->getParameter('configuration'),
                $configuration
            )
        );

        return $this;
    }
416916
def create_index(self, index=None, settings=None, es=None):
        """"""
        if index is None:
            index = self.index
        if es is None:
            es = self.es
        try:
            alias = index
            index = generate_index_name(alias)

            args = {'index': index}
            if settings:
                args['body'] = settings

            es.indices.create(**args)
            es.indices.put_alias(index, alias)
            logger.info('created index alias=%s index=%s' % (alias, index))
        except elasticsearch.TransportError:  # index exists
            pass
627542
public function drop($index)
    {
        $indexes = func_get_args();

        foreach ($indexes as $index) {
            $index = is_array($index) ? $this->prepareIndex($index) : $index;

            $this->collection->deleteIndex($index);
        }

        return $this;
    }
1017495
public function getConfig($index = ''){
		if($index === ''){
			return $this->_config;
		}
		if(isset($this->_config[$index])){
			return $this->_config[$index];
		}
		return null;
	}
999304
public function indexesAction()
    {
        return $this->viewHandler->handle(
            View::create(
                array_map(
                    function($indexName) {
                        $indexConfiguration = $this->indexConfigurationProvider->getIndexConfiguration($indexName);

                        return $indexConfiguration ?: new IndexConfiguration($indexName);
                    },
                    $this->getAllowedIndexes()
                )
            )
        );
    }
705950
public function createPrimaryIndex($indexName = null, $options = [])
    {
        return $this->db->createPrimaryIndex($this->name, $indexName, $options);
    }
1303197
public function injectIndex(Index $index)
    {
        foreach ($this->_indexes as $_index) {
            if ($_index->getId() === $index->getId()) {
                return;
            }
        }
        $this->_indexes[] = $index;
    }
1199862
def create_index(config):
    """"""
    filename = pathlib.Path(config.cache_path) / "index.json"
    index = {"version": __version__}
    with open(filename, "w") as out:
        out.write(json.dumps(index, indent=2))
860107
public function createIndex($indexName, $columns, $condition = null, &$params = [], $options = [])
    {
        return $this->db->createIndex($this->name, $indexName, $columns, $condition, $params, $options);
    }
831511
public function createIndex(Index $index, $table)
    {
        $this->_execSql($this->_platform->getCreateIndexSQL($index, $table));
    }
1146404
public function addIndex($index)
    {
        if ($index instanceof Index) {
            $index = $index->getName();
        }

        if (!\is_scalar($index)) {
            throw new InvalidException('Invalid param type');
        }

        $this->_indices[] = (string) $index;

        return $this;
    }
1030848
public static function createIndex($shards = null, $replicas = null)
    {
        $instance = new static();

        $client = $instance->getElasticSearchClient();

        $index = [
            'index'     => $instance->getIndexName(),
        ];

        if ($shards) {
            $index['body']['settings']['number_of_shards'] = $shards;
        }

        if ($replicas) {
            $index['body']['settings']['number_of_replicas'] = $replicas;
        }

        return $client->indices()->create($index);
    }
881958
public function createIndex(
        IndexUUID $indexUUID,
        Config $config
    ) {
        if (array_key_exists($this->getIndexKey($indexUUID), $this->indices)) {
            throw ResourceExistsException::indexExists();
        }

        $this->indices[$this->getIndexKey($indexUUID)] = [
            'config' => $config,
            'was_reset' => false,
            'was_reconfigured' => false,
        ];
    }