在SOLR中即时创建新的核心目录 [英] create new core directories in SOLR on the fly

查看:94
本文介绍了在SOLR中即时创建新的核心目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用solr 1.4.1构建分布式搜索引擎,但是我不想只使用一个索引文件-我想在我的Java代码中即时创建新的核心索引"目录.

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.

我发现使用以下REST API使用 EXISTING 核心目录( http://wiki.apache.org/solr/CoreAdmin ).

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

是否可以在没有现有核心目录的情况下创建新核心? solr有这样的功能吗?通过休息还是在solrj-api中?谢谢.

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.

推荐答案

当前无法以编程方式将架构和配置提交给Solr以创建新的核心. 这是JIRA的问题.

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.

如评论中所述,您可以使用WebDAV或scp或sftp之类的方法来解决此问题.

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

这篇关于在SOLR中即时创建新的核心目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆