library/Garp/Cli/Command/Elasticsearch.php
protected function _createIndexIfNotExists() {
        $service        = $this->getService();
        $indexExists    = $service->doesIndexExist();

        if ($indexExists) {
            return self::MSG_INDEX_EXISTS;
        }

        return $service->createIndex()
            ? self::MSG_INDEX_CREATED
            : self::MSG_INDEX_CREATION_FAILURE;
    }
protected function _createIndexIfNotExists() {
        $service        = $this->getService();
        $indexExists    = $service->doesIndexExist();

        if ($indexExists) {
            return self::MSG_INDEX_EXISTS;
        }

        return $service->createIndex()
            ? self::MSG_INDEX_CREATED
            : self::MSG_INDEX_CREATION_FAILURE;
    }
protected function _createIndexIfNotExists ( ) { $ service = $ this -> getService ( ) ; $ indexExists = $ service -> doesIndexExist ( ) ; if ( $ indexExists ) { return self :: MSG_INDEX_EXISTS ; } return $ service -> createIndex ( ) ? self :: MSG_INDEX_CREATED : self :: MSG_INDEX_CREATION_FAILURE ; }
Makes sure the service can be used; creates a primary index.

@return String Log message
Makes sure the service can be used ; creates a primary index .