create new core directories in SOLR on the fly

╄→гoц情女王★ 提交于 2019-12-19 14:49:20

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/4064880/create-new-core-directories-in-solr-on-the-fly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!