The site crash when add a server I'm trying to use Search_api_solr and search-api.
I install the required modules and run the solr server and create a core.
But when I'm trying to add a server to my drupal 8 site, an error appears 
Solarium\Exception\UnexpectedValueException: Neither collection nor core set. in Solarium\Core\Client\Endpoint-&gt;getBaseUri() (line 299 of /var/www/html/vendor/solarium/solarium/src/Core/Client/Endpoint.php).

I try to change the following block in Endpoint.php file to my data but it's not working.

protected $options = [
        'scheme' =&gt; 'http',
        'host' =&gt; 'xx.xx.xx.x',
        'port' =&gt; 8983,
        'path' =&gt; '/solr/',
        'collection' =&gt; null,
        'core' =&gt; 'my_core',
        'timeout' =&gt; 5,
        'leader' =&gt; false,
    ];


also, should the host include the http:// or only the ip address?
However, I try all above with no luck.
Any advice. Thanks in advance.
Collection is required in solr configuration. You'll need to create a collection you want to use for your site. Create using below command or by user interface of solr, then use the same name for the collection.


  sudo su - solr -c "/opt/solr/bin/solr create -c COLLECTION_NAME -n
  data_driven_schema_configs" // Only for ubuntu


Replace COLLECTION_NAME with the name of your collection you want.