我正在运行Zookeeper和Solr Cloud集群。 ZK最新的稳定版本和Solr 7.7.1。 我将配置集上传到ZK
#!/usr/bin/env bash
# This script is used for uploading ordbog configsets to Zookeeper and creating collections based on those configsets.
# The script must best located in the server/solr/configsets folder of Solr.
# run this as solr user
# sudo su - solr
set -euo pipefail
for d in $(ls | grep -iE "lemma|entry"); do
../../../bin/solr zk upconfig -n ${d} -d ${d}
done
然后,我使用Solr集合API创建集合。
for d in $(ls | grep -iE "lemma|entry"); do
wget "localhost:8983/solr/admin/collections?action=CREATE&autoAddReplicas=true&collection.configName=${d}&maxShardsPerNode=1&name=${d}&numShards=${SHARDS}&replicationFactor=${REP_FACTOR}&router.name=compositeId&wt=json&rule=shard:*,replica:<2,node:*" -O /dev/null
done
我仅在其中一个节点上执行此操作,上传后删除config文件夹。 我没有solr.xml或solrconfig.xml,只是每个集合的停用词和架构。
当我在solr admin中查看日志选项卡时,我会看到很多警告:
19/03/2019, 14:52:35
WARN false
x:lemmainflection_es_shard1_replica_n4
ManagedIndexSchemaFactory
Error persisting managed schema resource managed-schema
它不仅适用于所有收藏,而且适用于所有收藏。
我真的很想了解为什么我收到警告。这阻止了我投入生产。