# Filter Nested Objects

**URL:** <https://discuss.elastic.co/t/filter-nested-objects/185797>\
**Category:** Elasticsearch\
**Created:** [June 14, 2019, 8:34am UTC](https://discuss.elastic.co/t/filter-nested-objects/185797 "2019-06-14T08:34:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohamad\_Alkerdi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mohamad_alkerdi/32/48133_2.png) [@Mohamad\_Alkerdi](https://discuss.elastic.co/u/Mohamad_Alkerdi)\
**Post date:** [June 14, 2019, 8:34am UTC](https://discuss.elastic.co/t/filter-nested-objects/185797/1 "2019-06-14T08:34:00Z")

</div>

Hello guys i have this nested schema what i want to do is to search episodes.objects.name and filter the returned array based on the matching objects  
Any help

```
{  
   "mappings":{  
      "properties":{  
         "episodes":{  
            "type":"nested",
            "properties":{  
               "objects":{  
                  "type":"nested",
                  "properties":{  
                     "name":{  
                        "type":"text",
                        "fields":{  
                           "english":{  
                              "type":"text",
                              "analyzer":"english_analyzer"
                           },
                           "arabic":{  
                              "type":"text",
                              "analyzer":"arabic_analyzer"
                           }
                        }
                     }
                  }
               },
               "faces":{  
                  "type":"nested",
                  "properties":{  
                     "first_name":{  
                        "type":"text",
                        "analyzer":"english_analyzer"
                     },
                     "last_name":{  
                        "type":"text",
                        "analyzer":"english_analyzer"
                     },
                     "full_name":{  
                        "type":"text",
                        "analyzer":"english_analyzer"
                     }
                  }
               },
               "speech":{  
                  "type":"nested",
                  "properties":{  
                     "exact_text":{  
                        "type":"text",
                        "fields":{  
                           "english":{  
                              "type":"text",
                              "analyzer":"english_analyzer"
                           },
                           "arabic":{  
                              "type":"text",
                              "analyzer":"arabic_analyzer"
                           }
                        }
                     }
                  }
               }
            }
         },
         "genre":{  
            "type":"text",
            "fields":{  
               "english":{  
                  "type":"text",
                  "analyzer":"english_analyzer"
               },
               "arabic":{  
                  "type":"text",
                  "analyzer":"arabic_analyzer"
               }
            }
         }
      }
   }
}
```

---

<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 12, 2019, 8:34am UTC](https://discuss.elastic.co/t/filter-nested-objects/185797/2 "2019-07-12T08:34:01Z")

</div>

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