13.2SolrCloud Cluster User manual coreadmin API

Source: Internet
Author: User
Tags ranges solr

reprint please from Source: http://www.cnblogs.com/hd3013779515/

Coreadminhandler is used to manage the SOLR cores to manage all cores in a SOLR instance.

1. View status statuses

Http://192.168.137.171:8080/solr-cloud/admin/cores?action=STATUS

2. Create a Core

Name

The name of the new core. Same as "name" on the <core> element.

Instancedir

The directory where files for this solrcore should is 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 BES set if a new collection is B Eing created. Use collection.configname=<configname> to the configuration for a new collection.

Shard

(Optional) The Shard ID this core represents. Normally 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'll be processed asynchronously

(1) Increase Shard3 the first Replica ( specify core name and directory )

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) Increase Shard3 the second Replica ( specify configuration file )

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) New Collection ( increase shard1 's first 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. Refresh the core

When the configuration file for the core changes, you can reload it a bit. The use of a seamless connection method.

Http://192.168.137.171:8080/solr-cloud/admin/cores?action=RELOAD&core=myc3_s1_r1

4. Rename the core

Http://192.168.137.171:8080/solr-cloud/admin/cores?action=RENAME&core=myc3_s1_r1&other=coreother

5. Exchange core

Swapping the core name allows the standby core to be upgraded to Livecore while maintaining the ability to recover livecore.

Official Example: HTTP://LOCALHOST:8983/SOLR/ADMIN/CORES?ACTION=SWAP&CORE=CORE1&OTHER=CORE0

6. offline core

Official Example: HTTP://LOCALHOST:8983/SOLR/ADMIN/CORES?ACTION=UNLOAD&CORE=CORE0

7. Merging indexes

Official Example:

Way 1:http://localhost:8983/solr/admin/cores?action=mergeindexes&core=core0&indexdir=/opt/solr/core1/ Data/index&indexdir=/opt/solr/core2/data/index

Way 2:http://localhost:8983/solr/admin/cores?action=mergeindexes&core=core0&srccore=core1&srccore= Core2

8. slicing

Official Example: http://localhost:8983/solr/admin/cores?action=SPLIT&core=core0&targetCore=core1&targetCore= Core2

Optional Parameters:

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 would be written.

True

Targetcore

The target SOLR core to which a piece of the index would be merged

True

Ranges

A comma-separated List of hashes ranges in hexadecimal format

false

Split.key

The key to being used for splitting the index

False

Async

(Optional) Request ID to track this action which'll be processed ASYNCHRONOUSL Y

False

9. View request status

Official Example: http://localhost:8983/solr/admin/cores?action=REQUESTSTATUS&requestid=1

13.2SolrCloud Cluster User manual coreadmin API

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.