# Region Map not showing all results

**URL:** <https://discuss.elastic.co/t/region-map-not-showing-all-results/162522>\
**Category:** Kibana\
**Created:** [December 31, 2018, 2:22pm UTC](https://discuss.elastic.co/t/region-map-not-showing-all-results/162522 "2018-12-31T14:22:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmisztal1980](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mmisztal1980/32/38519_2.png) [@mmisztal1980](https://discuss.elastic.co/u/mmisztal1980)\
**Post date:** [December 31, 2018, 2:22pm UTC](https://discuss.elastic.co/t/region-map-not-showing-all-results/162522/1 "2018-12-31T14:22:55Z")

</div>

Hi all, I'm using a dockerized Elastic Stack v 6.5.3.

My Kibana container has been configured to use the regionmap:

```auto
regionmap:
 layers:
  - name: "Warsaw Districts"
    url: "https://realmdevstrg.blob.core.windows.net/json/pl-warsaw-geojson.json"
    fields:
     - name: "name"
       description: "Name"
     - name: "regionId"
       description: "Region.Id"

```

Please note that in the above, the **regionId** is the field I use for joining.

I've got a business process that does some work and emits results for each of the regions, here is a saved search result (middle column is the join field), containing 16 regional results:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/5/254d07a8d33c6687b31e02950a7107e6cdc45d06.png)

I've created a region map, using the above saved search visualization and set the join field to the middle column of the saved search. The aggregated value is an average of the right-hand side column.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/4/e4ee5fd6aeab15f563700f049eb8ffdc4fb17023.jpeg)

Having enabled the region map I've noticed that only 5/16 regions are displayed. I've verified the saved search results and the contents of the geojson file (see config). Can you tell me what is wrong, eventually how to diagnose this?

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [December 31, 2018, 3:08pm UTC](https://discuss.elastic.co/t/region-map-not-showing-all-results/162522/2 "2018-12-31T15:08:41Z")

</div>

Click `inspect` button in the top navigation. This will display the `terms` aggregation request. The results of the request are used to perform the join with the geojson file in the browser. What does the response look like? Does it contain a bucket for each of the 16 districts?

---

<div class="post-metadata">

**Author:** ![mmisztal1980](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mmisztal1980/32/38519_2.png) [@mmisztal1980](https://discuss.elastic.co/u/mmisztal1980)\
**Post date:** [December 31, 2018, 3:13pm UTC](https://discuss.elastic.co/t/region-map-not-showing-all-results/162522/3 "2018-12-31T15:13:31Z")

</div>

Hi @Nathan_Reese , thanks for responding.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/8/8870566d0f7ecfd766928009d0e00c4c438911ad.jpeg)

It appears that the join result only contains 5 districts.

Request:

```json
{
  "aggs": {
    "2": {
      "terms": {
        "field": "fields.AllSubRegionSearchesCompleted.SubRegion.Id.keyword",
        "size": 5,
        "order": {
          "1": "desc"
        }
      },
      "aggs": {
        "1": {
          "avg": {
            "field": "fields.AllSubRegionSearchesCompleted.Count"
          }
        }
      }
    }
  },
  "size": 0,
  "version": true,
  "_source": {
    "excludes": []
  },
  "stored_fields": [
    "*"
  ],
  "script_fields": {},
  "docvalue_fields": [
    {
      "field": "@timestamp",
      "format": "date_time"
    },
    {
      "field": "fields.Timestamp",
      "format": "date_time"
    }
  ],
  "query": {
    "bool": {
      "must": [
        {
          "match_all": {}
        },
        {
          "query_string": {
            "query": "AllSubRegionSearchesCompleted",
            "analyze_wildcard": true,
            "default_field": "*"
          }
        },
        {
          "range": {
            "@timestamp": {
              "gte": 1546267206890,
              "lte": 1546269006890,
              "format": "epoch_millis"
            }
          }
        }
      ],
      "filter": [],
      "should": [],
      "must_not": []
    }
  },
  "highlight": {
    "pre_tags": [
      "@kibana-highlighted-field@"
    ],
    "post_tags": [
      "@/kibana-highlighted-field@"
    ],
    "fields": {
      "*": {}
    },
    "fragment_size": 2147483647
  }
}

```

Response:

```json
{
  "took": 18,
  "timed_out": false,
  "_shards": {
    "total": 25,
    "successful": 25,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": 16,
    "max_score": 0,
    "hits": []
  },
  "aggregations": {
    "2": {
      "doc_count_error_upper_bound": 0,
      "sum_other_doc_count": 11,
      "buckets": [
        {
          "1": {
            "value": 3026
          },
          "key": "146505-8",
          "doc_count": 1
        },
        {
          "1": {
            "value": 1644
          },
          "key": "146518-8",
          "doc_count": 1
        },
        {
          "1": {
            "value": 1335
          },
          "key": "146507-8",
          "doc_count": 1
        },
        {
          "1": {
            "value": 1120
          },
          "key": "146513-8",
          "doc_count": 1
        },
        {
          "1": {
            "value": 889
          },
          "key": "146502-8",
          "doc_count": 1
        }
      ]
    }
  },
  "status": 200
}

```

This is weird. If you examine the geojson under the link, you'll see that the **regionId** property is attached to each region 😕 Why might be the join failing?

---

<div class="post-metadata">

**Author:** ![mmisztal1980](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mmisztal1980/32/38519_2.png) [@mmisztal1980](https://discuss.elastic.co/u/mmisztal1980)\
**Post date:** [December 31, 2018, 3:38pm UTC](https://discuss.elastic.co/t/region-map-not-showing-all-results/162522/4 "2018-12-31T15:38:31Z")

</div>

@Nathan_Reese I think I've found it, in the Request, the size defaults to 5. This solves the issue.

---

<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:** [January 28, 2019, 3:38pm UTC](https://discuss.elastic.co/t/region-map-not-showing-all-results/162522/5 "2019-01-28T15:38:39Z")

</div>

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