views:

29

answers:

1

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.

+3  A: 

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.

Mauricio Scheffer