Cross Cluster Search

配置:

  1. put _cluster/settings
  2. {
  3. "persistent": {
  4. "cluster": {
  5. "remote":{
  6. "cluster_one": {
  7. "seeds": ["127.0.0.1:9300"]
  8. },
  9. "cluster_two": {
  10. "seeds": ["127.0.0.1:9301"]
  11. }
  12. }
  13. }
  14. }
  15. }

查询

  1. GET /cluster_one:tmdb,movies/search
  2. {
  3. "query":{
  4. "match":{
  5. "title": "matrix"
  6. }
  7. }
  8. }

跳过不可用的remote cluster

  1. PUT _cluster/settings
  2. {
  3. "persistent": {
  4. "cluster.remote.cluster_two.skip_unavaliable": true
  5. }
  6. }

参考:https://blog.csdn.net/u013200380/article/details/109285330