solrcloud

创建用户
启动
交互式命令
./solr -e cloud
./solr status
./solr healthcheck -c gettingstarted 诊断
./solr stop -all
没提示命令
./solr -e cloud -noprompt
启动节点
./solr start -cloud -s ../example/cloud/node1/solr -p 8983
重启节点1
./solr restart -c -p 8983 -s ../example/cloud/node1/solr
重启节点2,localhost:9983管理员地址
./solr restart -c -p 7574 -z localhost:9983 -s ../example/cloud/node2/solr
添加节点
solr start -cloud -s example/cloud/node3/solr -p 8987 -z localhost:9983
zk管理配置
cd /export/servers/solr-6.6.0/bin/
启动zk
使用单个zk管理solr
./solr start -e cloud -z localhost:2181 -noprompt
添加node
./solr start -cloud -s ../example/cloud/node1/solr -p 8987 -z localhost:2181
使用多个zk管理solr
./solr start -e cloud -z localhost:2181,localhost:2182,localhost:2183 -noprompt
上传配置文件zk更新,crate时候上传一份data_driven_schema_configs配置目录文件
./solr create -c newCollection2 -d data_driven_schema_configs
手动上传zk
./solr zk upconfig -z localhost:2181 -n newCollection -d data_driven_schema_configs
cd /export/servers/solr-6.6.0/server/solr/configsets/data_driven_schema_configs/conf/
./solr zk upconfig -z localhost:2181 -n gettingstarted -d /export/servers/solr-6.6.0/example/cloud/node1/solr/gettingstarted_shard1_replica2/conf/gettingstarted/
下载到本地
./solr zk downconfig -z localhost:2181 -n gettingstarted -d /path/to/configset
递归从zk复制文件到solr
./solr zk cp -r zk:/configs/gettingstarted /export/servers/solr-6.6.0/example/cloud/node1/solr/gettingstarted_shard1_replica2/conf/ -z localhost:2181
复制单个文件
./solr zk cp zk:/configs/newCollection/solrconfig.xml /export/servers/solr-6.6.0/example/cloud/node1/solr/newCollection_shard1_replica1/conf/ -z localhost:2181
其他solr公用一个zk
./solr cp file:local/file/path/to/solr.xml zk:/solr.xml -z localhost:2181
创建集合
http://192.168.3.10:8983/solr/admin/collections?action=CREATE&name=newCollection2&numShards=2&replicationFactor=1
http://192.168.3.10:8983/solr/admin/collections?action=CREATE&name=gettingstarted&numShards=2&replicationFactor=2&maxShardsPerNode=2&collection.configName=gettingstarted
motify集合属性
/admin/collections?action=MODIFYCOLLECTION&collection=&= &=
reload
/admin/collections?action=RELOAD&name=name
切分片
/admin/collections?action=SPLITSHARD&collection=name&shard=shardID
创建分片
/admin/collections?action=CREATESHARD&shard=shardName&collection=name
删除分片
/admin/collections?action=DELETESHARD&shard=shardID&collection=name
创建or修改别名集合
/admin/collections?action=CREATEALIAS&name=name&collections=collectionlist
删除别名集合
/admin/collections?action=DELETEALIAS&name=name
删除集合
/admin/collections?action=DELETE&name=collection
删除副本
/admin/collections?action=DELETEREPLICA&collection=collection&shard=shard&replica=replica
添加副本
/admin/collections?action=ADDREPLICA&collection=collection&shard=shard&node=nodeName
添加or修改集群属性
/admin/collections?action=CLUSTERPROP&name=propertyName&val=propertyValue
集群状态
http://192.168.3.10:8983/solr/admin/collections?action=CLUSTERSTATUS
获取集群所有集合名称
http://192.168.3.10:8983/solr/admin/collections?action=LIST&wt=json
添加副本属性
/admin/collections?action=ADDREPLICAPROP&collection=collectionName&shard=shardName&replica=replicaName&property=propertyName&property.value=value
删除副本属性
/admin/collections?action=DELETEREPLICAPROP&collection=collectionName&shard=shardName&replica=replicaName&property=propertyName
备份集合
/admin/collections?action=BACKUP&name=myBackupName&collection=myCollectionName&location=/path/to/my/shared/drive
重新保存集合
/admin/collections?action=RESTORE&name=myBackupName&location=/path/to/my/shared/drive&collection=myRestoredCollectionName
删除副本节点
/admin/collections?action=DELETENODE&node=nodeName

赋值
./post -c gettingstarted ../example/exampledocs/*.xml

你可能感兴趣的:(搜索引擎)