# Timelion filtering on array property

**URL:** <https://discuss.elastic.co/t/timelion-filtering-on-array-property/259380>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [December 22, 2020, 12:32pm UTC](https://discuss.elastic.co/t/timelion-filtering-on-array-property/259380 "2020-12-22T12:32:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fran6ssl](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fran6ssl](https://discuss.elastic.co/u/fran6ssl)\
**Post date:** [December 22, 2020, 12:32pm UTC](https://discuss.elastic.co/t/timelion-filtering-on-array-property/259380/1 "2020-12-22T12:32:55Z")

</div>

Hi,

I have index that holds documents like this one :

```auto
{
            "_index": "flights_points",
            "_type": "_doc",
            "_id": "dsgh-htg-2664.32080600",
            "_score": 1,
            "_source": {
              "flight": {
                "duration": 195,
                "id": "F-LYS-CDG-118VV",
                "crew": [
                  "Pierre",
                  "Paul",
                  "Antoine"
                ]
              },
              "@timestamp": "2020-10-03T06:54:40.600Z",
    	  "parametres": [
                {
                  "PARAM2": "0.0930126"
                },
                {
                  "PARAM3": "-0.243958"
                },
                {
                  "PARAM8": "0.274427"
                }
              ],
              "@version": "1",
              "ship": {
                "serial": "154556462",
                "numero_client": "AIRCO",
                "groupe": "TESTF"
              }
            }
          } 

```

I need to write a timelion query where I can filter data points where the crew contains at least "Pierre" and "Paul".  
How can I write such query with timelion ?

---

<div class="post-metadata">

**Author:** ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)\
**Post date:** [January 14, 2021, 11:03am UTC](https://discuss.elastic.co/t/timelion-filtering-on-array-property/259380/2 "2021-01-14T11:03:09Z")

</div>

Hi @fran6ssl,

something like this should work, here I display flight.duration average but you can change it to whatever you see fit:

`.es(index= flights_points, timefield='@timestamp', metric='avg: flight.duration', q='flight.crew:(Pierre AND Paul)') `

---

<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 11, 2021, 11:03am UTC](https://discuss.elastic.co/t/timelion-filtering-on-array-property/259380/3 "2021-02-11T11:03:19Z")

</div>

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