Timelion filtering on array property

Hi,

I have index that holds documents like this one :

{
            "_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 ?

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)')

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