13.2SolrCloud集群使用手册之CoreAdmin API
转载请出自出处:http://www.cnblogs.com/hd3013779515/
CoreAdminHandler是用来管理Solr cores的,用来管理一个Solr instance中所有的cores。
1. 查看状态STATUS
http://192.168.137.171:8080/solr-cloud/admin/cores?action=STATUS


2.创建Core
| name | The name of the new core. Same as "name" on the <core> element. | 
| instanceDir | The directory where files for this SolrCore should be stored. Same as instanceDir on the <core> element. | 
| config | (Optional) Name of the config file (solrconfig.xml) relative to instanceDir. | 
| schema | (Optional) Name of the schema file (schema.xml) relative to instanceDir. | 
| datadir | (Optional) Name of the data directory relative to instanceDir. | 
| configSet | (Optional) Name of the configset to use for this core (see Config Sets) | 
| collection | (Optional) The name of the collection to which this core belongs. The default is the name of the core. collection.<param>=<value> causes a property of <param>=<value> to be set if a new collection is being created. Use collection.configName=<configname> to point to the configuration for a new collection. | 
| shard | (Optional) The shard id this core represents. Normally you want to be auto-assigned a shard id. | 
| property.name=value | (Optional) Sets the core property name to value. See core.properties file contents. | 
| async | (Optional) Request ID to track this action which will be processed asynchronously | 
(1)增加shard3的第一个replica(指定core名字和目录)
http://192.168.137.171:8080/solr-cloud/admin/cores?action=CREATE&name=myc2_s3_r1&instanceDir=myc2_s3_r1_t&collection=myc2&shard=shard3


(2)增加shard3的第二个replica(指定配置文件)
http://192.168.137.172:8080/solr-cloud/admin/cores?action=CREATE&name=myc2_s3_r2&instanceDir=myc2_s3_r2&collection=myc2&shard=shard3&config=solrconfig2.xml&schema=schema2.xml


(3)新建collection(增加shard1的第一个replica)
http://192.168.137.171:8080/solr-cloud/admin/cores?action=CREATE&name=myc3_s1_r1&instanceDir=myc3_s1_r1&collection=myc3&shard=shard1&configSet=myconf&collection.configName=myconf2

3.刷新core
当core的配置文件有变化时,可以reload一下。采用的是无缝连接方式。
http://192.168.137.171:8080/solr-cloud/admin/cores?action=RELOAD&core=myc3_s1_r1
4.重命名core
http://192.168.137.171:8080/solr-cloud/admin/cores?action=RENAME&core=myc3_s1_r1&other=coreother
5.交换core
交换core的名字,可以把待机core升格为livecore,同时保持可以恢复livecore。
官方示例:http://localhost:8983/solr/admin/cores?action=SWAP&core=core1&other=core0
6.下线core
官方示例:http://localhost:8983/solr/admin/cores?action=UNLOAD&core=core0
7.合并索引
官方示例:
方式1:http://localhost:8983/solr/admin/cores?action=MERGEINDEXES&core=core0&indexDir=/opt/solr/core1/data/index&indexDir=/opt/solr/core2/data/index
方式2:http://localhost:8983/solr/admin/cores?action=mergeindexes&core=core0&srcCore=core1&srcCore=core2
8.切分
官方示例:http://localhost:8983/solr/admin/cores?action=SPLIT&core=core0&targetCore=core1&targetCore=core2
可选参数:
| Parameter | Description | Multi-valued | 
| core | The name of the core to be split. | false | 
| path | The directory path in which a piece of the index will be written. | true | 
| targetCore | The target Solr core to which a piece of the index will be merged | true | 
| ranges | A comma-separated list of hash ranges in hexadecimal format | false | 
| split.key | The key to be used for splitting the index | false | 
| async | (Optional) Request ID to track this action which will be processed asynchronously | false | 
9.查看请求状态
官方示例:http://localhost:8983/solr/admin/cores?action=REQUESTSTATUS&requestid=1
13.2SolrCloud集群使用手册之CoreAdmin API的更多相关文章
- 13.1SolrCloud集群使用手册之Collections API
		转载请出自出处:http://www.cnblogs.com/hd3013779515/ 1.创建collection name:指明collection名字 router.name:指定路由策略,默 ... 
- 13.4SolrCloud集群使用手册之CRUD
		转载请出自出处:http://www.cnblogs.com/hd3013779515/ Student.java package cn.ljh.ssm.test; import org.apache ... 
- 13.3SolrCloud集群使用手册之Zookeeper指令
		转载请出自出处:http://www.cnblogs.com/hd3013779515/ 1.upconfig java -classpath .:/home/solr/cloud/lib/* org ... 
- Ubuntu_10.04下Hadoop-0.20.2集群配置手册
		Ubuntu_10.04下Hadoop-0.20.2集群配置手册 一.软硬件环境的准备 下面的文章来自hadoopor.com,我先交待一下我自己的环境: 两台机器,每台机器上面两个虚机(vmware ... 
- Nginx+Tomcat+MemCached 集群配置手册
		系统实施文档 Nginx+Tomcat+MemCached 集群配置手册 目 录 第1章 概述 1.1 目标 互联网的快速发展带来了互联网系统的高负载和高可用性, 这要求我们在设计系统架 ... 
- 实现CI/CDk8s高可用集群搭建总结以及部署API到k8s
		实现CI/CD(Centos7.2)系列二:k8s高可用集群搭建总结以及部署API到k8s 前言:本系列博客又更新了,是博主研究很长时间,亲自动手实践过后的心得,k8s集群是购买了5台阿里云服务器部署 ... 
- Greenplum(4.3.73)集群安装手册
		1. 概述 本文档仅限于指导Greenplum 4.3.7.3(对应安装包greenplum-db-4.3.7.3-build-2-RHEL5-x86_64.bin)版本在CentOS6.5 系统进行 ... 
- OEMCC 13.2 集群版本安装部署
		之前测试部署过OEMCC 13.2单机,具体可参考之前随笔: OEMCC 13.2 安装部署 当时环境:两台主机,系统RHEL 6.5,分别部署OMS和OMR: OMS,也就是OEMCC的服务端 IP ... 
- kubeadm安装kubernetes 1.13.1集群完整部署记录
		k8s是什么 Kubernetes简称为k8s,它是 Google 开源的容器集群管理系统.在 Docker 技术的基础上,为容器化的应用提供部署运行.资源调度.服务发现和动态伸缩等一系列完整功能,提 ... 
随机推荐
- [转]DevOps实战:百度持续交付体系与最佳实践大解密!
			本文转自:http://dbaplus.cn/news-21-471-1.html “互联网+”时代,软件产品要想满足快速增长的用户需求,高效.快速的迭代转型必不可少,面对时刻发生改变的互联网及业务模 ... 
- ASP.NET开发,从二层至三层,至面向对象 (4)
			继续上一篇<ASP.NET开发,从二层至三层,至面向对象 (3)>http://www.cnblogs.com/insus/p/3826706.html .我们更深层次学会了逻辑层对象,即 ... 
- winform窗体   小程序【打开多个窗体、窗体之间传值、打开唯一窗体】
			1.打开多个窗体 2.窗体之间的传值 3打开唯一窗体 
- 【C#数据结构系列】查找
			一:查找 1.1 基本概念和术语 查找(Search)是在数据结构中确定是否存在关键码等于给定关键码的记录的过程.关键码有主关键码和次关键码.主关键码能够唯一区分各个不同的记录,次关键码通常不能唯一区 ... 
- Linux常用基本命令( mkdir )
			mkdir: 作用:创建目录( make directories ) 命令格式: make [option] 目录 1,创建目录, 当目录存在时,再次创建会提示文件已经存在 ghostwu@dev:~ ... 
- Flask如何给多个视图函数增加装饰器
			这几天在学习Flask, 遇到了些小问题,比如说怎么给多个视图函数加相同的装饰器 给单独一个视图函数加装饰器的话很简单,写一个装饰器,然后直接加在原装饰器下面即可,多个的话,会报这样一个错误: 这个异 ... 
- contenttypes组件  (处理大量外键)
			介绍 Django contenttypes是一个非常有用的框架,主要用来创建模型间的通用关系(generic relation). https://www.cnblogs.com/huchong ... 
- mongodb ISODate问题(大量数据update优化)
			问题描述: 上周有个需求,把mongodb中birthday (ISO日期格式) 转换成北京时间,并保存成string类型. 最初思路: 遍历查找出的结果,逐个加8小时,然后通过_id逐个去updat ... 
- php.ini中date.timezone设置详解
			date.timezone设置php5默认date.timezone为utc,改为date.timezone = PRC即可解决时间相差八小时的问题,但我在php的官方文档中看了半天也没找到这个参数啊 ... 
- apache web服务器安全配置
			尽管现在购买的云服务器很多都有一键web环境安装包,但是如果是自己配置web环境则需要对各种安全配置十分了解,今天我们就来尝试这做好web服务器安全配置.这里的配置不尽完善,若有纰漏之处还望指出. 修 ... 
