zoukankan      html  css  js  c++  java
  • solrCloud 管理

    创建collection:

    1. /soft/server/solr-4.10.0/example/scripts/cloud-scripts/zkcli.sh -cmd upconfig -zkhost localhost:2181/solrcloud -confdir /soft/server/solr-4.10.0/example/solr/sku_search/conf -confname sku_search
    2. curl 'http://localhost:50080/solr/admin/collections?action=CREATE&name=test_date&numShards=1&replicationFactor=3'

    修改collection的配置信息:

    1. 写入ZK:
      1. sh zkcli.sh  -zkhost localhost:2181/solrcloud -cmd upconfig -confdir /soft/server/solr-4.10.0-1/example/solr/collection1/conf -confname collection1
    2. reload conf:
      1. curl 'http://localhost:50080/solr/admin/collections?action=RELOAD&name=collection1'

    删除collection

    1. curl 'http://172.24.28.110:50080/solr/admin/collections?action=DELETE&name=test'
    2. 数据目录下只保留了目录,数据已经删除了。
    3. zk中的该collection的信息没有被删除。

    split shard

    1. curl 'http://localhost:50080/solr/admin/collections?action=SPLITSHARD&collection=name&shard=shardID'

    delete inactive shard

    1. curl 'http://localhost:50080/solr/admin/collections?action=DELETESHARD&shard1=shardID&collection=name'

    给分片创建副本:

    1. curl 'http://localhost:50080/solr/admin/collections?action=ADDREPLICA&collection=collection&shard=shard&node=solr_node_name'
    2. 例如:curl 'http://localhost:50080/solr/admin/collections?action=ADDREPLICA&collection=test_shard&shard=shard1_0&node=172.24.28.118:50080_solr'

    删除副本:

    1. curl 'http://localhost:50080/solr/admin/collections?action=DELETEREPLICA&collection=collection&shard=shard&replica=replica'
    2. 例如:curl 'http://localhost:50080/solr/admin/collections?action=DELETEREPLICA&collection=test_shard&shard=shard1_0&replica=core_node5'

        

  • 相关阅读:
    List转换为Datatable
    C# NPOI导出Excel和EPPlus导出Excel比较
    NPOI导出excel2007
    C#中的事务TransactionScope
    switch,case语句易误区
    消息队列mq总结
    一文搞定十大经典排序算法(Java实现)
    常见数据结构与算法整理总结(下)
    常见数据结构与算法整理总结(上)
    mysql开发常用技巧总结
  • 原文地址:https://www.cnblogs.com/fanweiwei/p/4030623.html
Copyright © 2011-2022 走看看