# The Java API client verifies the alias of the remote cluster

**URL:** https://discuss.elastic.co/t/the-java-api-client-verifies-the-alias-of-the-remote-cluster/351848
**Category:** Elastic Search
**Tags:** elastic-app-search
**Created:** [January 26, 2024, 4:36am UTC](https://discuss.elastic.co/t/the-java-api-client-verifies-the-alias-of-the-remote-cluster/351848 "2024-01-26T04:36:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![cwh1663044117](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cwh1663044117/32/131129_2.png) [@cwh1663044117](https://discuss.elastic.co/u/cwh1663044117)
#### Post date: [January 26, 2024, 4:36am UTC](https://discuss.elastic.co/t/the-java-api-client-verifies-the-alias-of-the-remote-cluster/351848/1 "2024-01-26T04:36:32Z")

</div>

### 1.The remote cluster verifies the index alias

Hello, when you use Java API Client to verify the remote cluster alias, this alias index exists in the remote cluster,  
However, the API interface returns false and does not exist  
When using Kibana to test the remote cluster alias index, you can get the data as follows:

#### 1.1 request

```elm
GET /normal-combind-1084,HFZQ-FZ-Elasticsearch:normal-combind-1084/_search?ignore_unavailable=true
{
  "size": 0,
  "aggs": {
    "agent_names": {
      "terms": {
        "field": "agent.name",
        "size": 100000
      }
    }
  }
}

```

#### 1.2 return

```elm
{
  "took": 34,
  "timed_out": false,
  "_shards": {
    "total": 2,
    "successful": 2,
    "skipped": 0,
    "failed": 0
  },
  "_clusters": {
    "total": 1,
    "successful": 1,
    "skipped": 0
  },
  "hits": {
    "total": {
      "value": 10000,
      "relation": "gte"
    },
    "max_score": null,
    "hits": []
  },
  "aggregations": {
    "agent_names": {
      "doc_count_error_upper_bound": 0,
      "sum_other_doc_count": 0,
      "buckets": [
        {
          "key": "fzrdsj61-81.hfzq.local",
          "doc_count": 76919
        },
        {
          "key": "fzrdsj61-82.hfzq.local",
          "doc_count": 68178
        },
        {
          "key": "fzrdsj61-92.hfzq.local",
          "doc_count": 51231
        },
        {
          "key": "fzrdsj61-93.hfzq.local",
          "doc_count": 49505
        },

```

#### 1.3 Verify the remote alias index

```elm
GET /HFZQ-FZ-Elasticsearch:*/_alias/normal-combind-1084

return :
{
  "error": "alias [normal-combind-1084] missing",
  "status": 404
}

```

How Do I Obtain the Existence of a Remote Cluster Alias Index?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 23, 2024, 4:36am UTC](https://discuss.elastic.co/t/the-java-api-client-verifies-the-alias-of-the-remote-cluster/351848/2 "2024-02-23T04:36:58Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
