es有没可能同时写多个索引?

Elasticsearch | 作者 God_lockin | 发布于2019年03月11日 | 阅读数:218

有旧有数据的同步问题的困扰,需要类似数据双写的操作,貌似直接设置同一个别名然后insert会报错
 
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "no write index is defined for alias [test_writer]. The write index may be explicitly disabled using is_write_index=false or the alias points to multiple indices without one being designated as a write index"
}
],
"type": "illegal_argument_exception",
"reason": "no write index is defined for alias [test_writer]. The write index may be explicitly disabled using is_write_index=false or the alias points to multiple indices without one being designated as a write index"
},
"status": 400
}
已邀请:

rochy - rochy_he@tw

赞同来自:

alias 只能声明一个索引为写活跃状态,无法多个同时写入

zqc0512 - andy zhou

赞同来自:

你前端跑两个进程撒。指定 两个索引  这玩意本来就带副本的,这是什么需求?

要回复问题请先登录注册