Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
189 views
in Technique[技术] by (71.8m points)

Is there is a way to "load balance" 2 index in elasticsearch?

Let say we have 2 index that contains almost similar data.

Example:

  • index_1 // contains some data
  • index_2 // contains some data (likely the same one)

Does there is a way to use an alias to access them, but only get results from one of it ?

One way could be to do that clientside -> fetch all the indices that the alias point and then query one of it -> but it is adding complexity in client side Right now I tried with alias pointing to index_1 and index_2 -> but it is merging the results of the 2 index.

question from:https://stackoverflow.com/questions/65949426/is-there-is-a-way-to-load-balance-2-index-in-elasticsearch

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

What you are trying to do is not possible and you have to do it from your side only or use Opster's multi-cluster load balancer if you have advance use cases.

If you want to protect your elasticsearch cluster from bad/costly searches than you might also have a look at search gateway


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...