转载请出自出处: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的更多相关文章

  1. 13.1SolrCloud集群使用手册之Collections API

    转载请出自出处:http://www.cnblogs.com/hd3013779515/ 1.创建collection name:指明collection名字 router.name:指定路由策略,默 ...

  2. 13.4SolrCloud集群使用手册之CRUD

    转载请出自出处:http://www.cnblogs.com/hd3013779515/ Student.java package cn.ljh.ssm.test; import org.apache ...

  3. 13.3SolrCloud集群使用手册之Zookeeper指令

    转载请出自出处:http://www.cnblogs.com/hd3013779515/ 1.upconfig java -classpath .:/home/solr/cloud/lib/* org ...

  4. Ubuntu_10.04下Hadoop-0.20.2集群配置手册

    Ubuntu_10.04下Hadoop-0.20.2集群配置手册 一.软硬件环境的准备 下面的文章来自hadoopor.com,我先交待一下我自己的环境: 两台机器,每台机器上面两个虚机(vmware ...

  5. Nginx+Tomcat+MemCached 集群配置手册

    系统实施文档 Nginx+Tomcat+MemCached 集群配置手册 目    录 第1章   概述 1.1   目标 互联网的快速发展带来了互联网系统的高负载和高可用性, 这要求我们在设计系统架 ...

  6. 实现CI/CDk8s高可用集群搭建总结以及部署API到k8s

    实现CI/CD(Centos7.2)系列二:k8s高可用集群搭建总结以及部署API到k8s 前言:本系列博客又更新了,是博主研究很长时间,亲自动手实践过后的心得,k8s集群是购买了5台阿里云服务器部署 ...

  7. Greenplum(4.3.73)集群安装手册

    1. 概述 本文档仅限于指导Greenplum 4.3.7.3(对应安装包greenplum-db-4.3.7.3-build-2-RHEL5-x86_64.bin)版本在CentOS6.5 系统进行 ...

  8. OEMCC 13.2 集群版本安装部署

    之前测试部署过OEMCC 13.2单机,具体可参考之前随笔: OEMCC 13.2 安装部署 当时环境:两台主机,系统RHEL 6.5,分别部署OMS和OMR: OMS,也就是OEMCC的服务端 IP ...

  9. kubeadm安装kubernetes 1.13.1集群完整部署记录

    k8s是什么 Kubernetes简称为k8s,它是 Google 开源的容器集群管理系统.在 Docker 技术的基础上,为容器化的应用提供部署运行.资源调度.服务发现和动态伸缩等一系列完整功能,提 ...

随机推荐

  1. django2.1---终端打印orm转义的sql语句

    print(connection.queries)可以打印转义后的sql语句 例子: from django.http import JsonResponse,HttpResponse from .m ...

  2. Js的substring和C#的Substring

    Js的substring 语法: 程序代码String.substring(start, end) 说明:返回一个从start开始到end(不包含end)的子字符串. 示例: 程序代码var str= ...

  3. PetaPoco源代码学习--0.目录贴

    2017年3季度后,以人力外包的形式派驻到甲方单位进行项目救急时,接触到了甲方单位的ASP.NET MVC项目的ORM框架,它以PetaPoco(2012年的老版本)进行改造升级的,当初就想学习一下这 ...

  4. (六)彻底理解synchronized

    1.sychronized简介 在学习知识之前,我们先来看一个现象 public class SynchronizedDemo implements Runnable { private static ...

  5. 集合框架(TreeSet原理)

    特点: TreeSet是用来排序的,可以指定一个顺序,对象存入之后会按照指定的顺序排列 使用方式: 自然排序(Comparable) TreeSet类的add()方法中会把存入的对象提升为Compar ...

  6. Redis——基础数据结构

    Redis提供了5种基础数据结构,分别是String,list,set,hash和zset. 1.String Redis所有的键都是String.Redis的String是动态字符串,内部结构类似J ...

  7. JS 创建自定义对象的方式方法

    一.概述 还记得刚开始做项目的时候,看到别人封装的js工具类百思不得其解,看来看去看不懂,深挖一下,其实就是自己没有耐下心去看,但是遇到问题不解决,总会遇到的,今天还是遇到了,就去找了找帖子,重新思考 ...

  8. BZOJ3351: [ioi2009]Regions(根号分治)

    题意 题目链接 Sol 很神仙的题 我们考虑询问(a, b)(a是b的祖先),直接对b根号分治 如果b的出现次数\(< \sqrt{n}\),我们可以直接对每个b记录下与它有关的询问,这样每个询 ...

  9. vue webpack 打包后css背景图路径问题

    最近在写vue-webpack项目时,打包后遇到了css背景图片路径报错的问题 奇怪的是,通过img标签引入的图片路径却没有问题,看来是webpack在打包后,读取css中图片的相对路径出错了. 稍微 ...

  10. drupal常用api

    最短的函数 // 语言字串,除了可以获取对应语言外,还可以设置字串变量.可以是!var, @var或 %var,%var就添加元素外层.@var会过滤HTML,!var会原样输出HTML,%var会添 ...