Solr云模式下唯一键更新

huangapple go评论68阅读模式
英文:

Solr Unique key update in cloud mode

问题

在Solr云模式下,是否可以修改唯一键的类型而无需删除集合?或者是否可以创建新的唯一键?

英文:

Is it possible to modify type of unique key without dropping collection in solr cloud mode? or is it possible create new unique key?

答案1

得分: 1

你无法在Solr Cloud中修改唯一键(unique key)而不重新建立索引或删除集合。

我建议另一种选项,您无需删除集合。

在这种方法中,您可以为唯一键更新适当类型的架构,并通过Zookeeper上传架构。

然后您可以重新加载数据... 这与重新建立索引的效果相同。

一个更好的替代方案是创建一个带有修改后架构的新集合。
为新集合创建一个别名(Alias的名称应与之前的集合相同)。

确保所有新请求通过别名名称重定向到新集合。

然后删除旧的集合。

英文:

You cannot modify the unique key without re-indexing or dropping the collection in solr cloud.

I would suggest the alternative option where you don't need to drop the collection.

Here you update the schema with appropriate type for your unique key and upload the schema through zookeeper.

Then you can reload the data..it is as good as re-indexing the collection.

A better alternative would be to create another collection with modified schema.
Create an alias to the new collection(Alias should have the same name as earlier collection).

Make sure all the new requests are re-directed to the new collection with the help of alias name.

Then drop the older collection.

huangapple
  • 本文由 发表于 2020年9月9日 19:12:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/63810434.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定