gpt4 book ai didi

elasticsearch - 防止某些索引与Elasticsearch 1.7.x中的其他节点共享

转载 作者:行者123 更新时间:2023-12-03 01:02:18 24 4
gpt4 key购买 nike

我在Elasticsearch 1.7.x中与不同的节点共享不同的索引。但是,我想知道是否有可能不共享其中一些索引并将它们仅保留在某些节点中。

谢谢,

最佳答案

是的,您可以,基本上索引是其碎片的组合。

A shard is a single Lucene instance. It is a low-level “worker” unit which is managed automatically by elasticsearch. An index is a logical namespace which points to primary and replica shards. Other than defining the number of primary and replica shards that an index should have, you never need to refer to shards directly. Instead, your code should deal only with an index. Elasticsearch distributes shards amongst all nodes in the cluster, and can move shards automatically from one node to another in the case of node failure, or the addition of new nodes.



您可以按索引设置分片分配
PUT test/_settings
{
"index.routing.allocation.include._ip": "192.168.2.*"
}

关于elasticsearch - 防止某些索引与Elasticsearch 1.7.x中的其他节点共享,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35552337/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com