我们正在寻找一个Solr 4.9设置,其中我们有一个非常简单的爬虫清除和加载一个“爬虫”核心,然后触发一个数据副本到“搜索”核心时,爬行完成。这样做的目的是,我们的爬虫非常简单,不真正跟踪文档的方式,将有助于进行更新和删除。基本上,爬虫将清除整个“爬虫”核心,撕毁大约50k个文档(提交1000多个文档),然后触发一些东西将数据复制到另一个“搜索”核心。
假设我们必须重新启动搜索核心,如何通过命令行或代码实现这一点?
发布于 2014-08-26 09:11:56
创建第三个核心作为search核心的副本。然后CoreAdmin中的命令将两个不同的核合并到第三个核中。合并完成后,交换第三个核心使用旧的search核心。然后是卸下交换的磁芯 (如果您觉得可以永久删除旧数据,则使用deleteInstanceDir=true )。
类似于:
http://localhost:8983/solr/admin/cores/action=CREATE&name=core0&instanceDir=path_to_instance_directory&config=config_file_name.xml&schema=schema_file_name.xml&dataDir=data
http://localhost:8983/solr/admin/cores?action=mergeindexes&core=core0&indexDir=/opt/solr/crawl/data/index&indexDir=/opt/solr/index/data/index
http://localhost:8983/solr/admin/cores?action=SWAP&core=search&other=core0
http://localhost:8983/solr/admin/cores?action=UNLOAD&core=core0https://stackoverflow.com/questions/25492804
复制相似问题