# Search inside the first element of an array

**URL:** https://discuss.elastic.co/t/search-inside-the-first-element-of-an-array/22949
**Category:** Elasticsearch
**Created:** [March 27, 2015, 5:45pm UTC](https://discuss.elastic.co/t/search-inside-the-first-element-of-an-array/22949 "2015-03-27T17:45:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sagar\_Chandarana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sagar_chandarana/32/808_2.png) [@Sagar\_Chandarana](https://discuss.elastic.co/u/Sagar_Chandarana)
#### Post date: [March 27, 2015, 5:45pm UTC](https://discuss.elastic.co/t/search-inside-the-first-element-of-an-array/22949/1 "2015-03-27T17:45:34Z")

</div>

Trying to do something like

script : {  
script: "\_source.\_matchedCrmRecords[0].bean\_module.size() != 0"  
}

ideas?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6384c2ea-3764-48f8-88d9-99e5ffc59d7f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6384c2ea-3764-48f8-88d9-99e5ffc59d7f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:23am UTC](https://discuss.elastic.co/t/search-inside-the-first-element-of-an-array/22949/2 "2017-07-06T00:23:24Z")

</div>


