# 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->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' => 'http',
'host' => 'xx.xx.xx.x',
'port' => 8983,
'path' => '/solr/',
'collection' => null,
'core' => 'my_core',
'timeout' => 5,
];


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.

• Did you create an index in the admin? Why are you editing code ? – Kevin Aug 11 '19 at 22:11
• @kevin not yet. because when I read the Endpoint.php file, it includes localhost and null values, not my main values. I through that's causing the issue. – IDI Aug 11 '19 at 22:24
• I don’t know what that file is. Read the README of those modules first. It’s configurable from the admin. – Kevin Aug 12 '19 at 1:38
• Yes, you should never need to touch any file under the vendor folder. If you look at the README, you'll see you need to install Drupal-specific configuration files in your core before it can be used, I suspect that may be your problem. – Alfred Armstrong Aug 12 '19 at 10:45
• @AlfredArmstrong thanks for replay. which README? Do you mean the search-api-solr README? yes I copy all files in /search_api_solr/solr-conf/7.x/ folder into solr-7.7.2/server/solr/my_core/conf – IDI Aug 12 '19 at 11:33