Reputation: 898
I am trying to make multi core Solr server and connect from PHP laravel. I did connect the solr and laravel but i cant find a way to create a core. I am also using solarium lib. Is it possible to create a new core with parameters from php?
Upvotes: 0
Views: 725
Reputation: 898
$solr = SolrClient::factory(array(
'base_url' => 'http://LOCALHOST:8983',
'base_path' => '/solr',
));
$response = $solr->get('admin/cores?action=CREATE&name='.$corename.'&instanceDir='.$corename.'&configSet=_default')->send()->json();
Imports;
use PSolr\Client\SolrClient;
This is the solution that i used. I hope it helps someone else.
Upvotes: 0