# How to filter nested documents on dashboard in Kibana 4.1?

**URL:** <https://discuss.elastic.co/t/how-to-filter-nested-documents-on-dashboard-in-kibana-4-1/34288>\
**Category:** Kibana\
**Created:** [November 10, 2015, 9:38pm UTC](https://discuss.elastic.co/t/how-to-filter-nested-documents-on-dashboard-in-kibana-4-1/34288 "2015-11-10T21:38:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankitc](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@ankitc](https://discuss.elastic.co/u/ankitc)\
**Post date:** [November 10, 2015, 9:38pm UTC](https://discuss.elastic.co/t/how-to-filter-nested-documents-on-dashboard-in-kibana-4-1/34288/1 "2015-11-10T21:38:43Z")

</div>

I am new to Kibana world. I am trying to filter nested document on dashboard, it doesn't get filter because on dashboard when I click on any of the visualization value it applies filter query as shown below. I would like to know how can I get nested document filter on dashboard? Below is the mapping file and few sample documents of my use case.

Thanks in advance,  
Ankit

```json
PUT /usr
{
  "mappings": {
    "usr": {
      "properties": {
        "first_name": {
          "type": "string",
          "index": "not_analyzed"
        }, 
        "last_name": {
          "type": "string",
          "index": "not_analyzed"
        }, 
        "moniker": {
          "include_in_parent": true, 
          "properties": {
            "first_name": {
              "type": "string",
              "index": "not_analyzed"
            }, 
            "last_name": {
              "type": "string",
              "index": "not_analyzed"
            }
          }, 
          "type": "nested"
        }
      }
    }
  }
}

PUT /usr/usr/1
{
    "first_name" : "Timothy",
    "last_name" : "Parker",
    "moniker" : [
        {
            "first_name" : "Tim",
            "last_name" : "Parker"
        },
        {
            "first_name" : "Tom",
            "last_name" : "Park"
        }
    ]
}

PUT /usr/usr/2
{
    "first_name" : "James",
    "last_name" : "Pecker",
    "moniker" : [
        {
            "first_name" : "Jim",
            "last_name" : "Peck"
        },
        {
            "first_name" : "Jane",
            "last_name" : "Park"
        }
    ]
}

PUT /usr/usr/3
{
    "first_name" : "Thomas",
    "last_name" : "Watson",
    "moniker" : [
        {
            "first_name" : "Tom",
            "last_name" : "Watson"
        },
        {
            "first_name" : "Jim",
            "last_name" : "Watt"
        }
    ]
}

PUT /usr/usr/4
{
    "first_name" : "Jane",
    "last_name" : "Knightly",
    "moniker" : [
        {
            "first_name" : "Jenny",
            "last_name" : "Watt"
        },
        {
            "first_name" : "Jane",
            "last_name" : "Park"
        }
    ]
}

PUT /usr/usr/5
{
    "first_name" : "Bill",
    "last_name" : "Knightly",
    "moniker" : [
        {
            "first_name" : "Bob",
            "last_name" : "Watt"
        },
        {
            "first_name" : "Bobby",
            "last_name" : "Park"
        }
    ]
}

```

**BEFORE APPLYING FILTER**

 ![](https://us1.discourse-cdn.com/elastic/original/2X/4/4644f24ea41e8c7caded5126c9d0be1890e869e9.png)

**AFTER APPLYING FILTER**

 ![](https://us1.discourse-cdn.com/elastic/original/2X/4/4f1064586346f3cf718ffd989c3a6a3649cebf95.png)

## **I am expecting only "Jim" to be seen in the visualization.**

---

<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:** [July 6, 2017, 2:08pm UTC](https://discuss.elastic.co/t/how-to-filter-nested-documents-on-dashboard-in-kibana-4-1/34288/2 "2017-07-06T14:08:47Z")

</div>


