Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create new core directories in SOLR on the fly

i am using solr 1.4.1 for building a distributed search engine, but i dont want to use only one index file - i want to create new core "index"-directories on the fly in my java code.

i found following rest api to create new cores using an EXISTING core directory (http://wiki.apache.org/solr/CoreAdmin).

http://localhost:8983/solr/admin/cores?action=CREATE&name=coreX&instanceDir=path_to_instance_directory&config=config_file_name.xml&schema=schem_file_name.xml&dataDir=data

is there a way to create a new core without an extisting core directory? has solr such a function? via rest or in the solrj-api? thanks.

like image 513
ndiks Avatar asked Oct 31 '10 20:10

ndiks


1 Answers

It's not currently possible to programmatically submit your schema and config to Solr to create a new core. Here's the JIRA issue about it.

As mentioned in the comments, you can work around it by using something like WebDAV or scp or sftp.

like image 96
Mauricio Scheffer Avatar answered Oct 01 '22 00:10

Mauricio Scheffer