Query nth element of an array


(Hardy Heron) #1

I've got json documents as follows:

{
  "_index": "x",
  "_type": "y",
  "_id": "z",
  "_version": 1,
  "found": true,
  "_source": {
	"request": {
	  "segmentList": [
		{
		  "departure": {
			"code": "JFK"
		  },
		  "destination": {
			"code": "LAX"
		  },
		  "departureDate": "2017-06-14"
		},
		{
		  "departure": {
			"code": "LAX"
		  },
		  "destination": {
			"code": "JFK"
		  },
		  "departureDate": "2017-06-28"
		}
	  ]
	}
  }
}

Is there any way i can search in kibana for first departureDate="2017-06-14" and second departureDate="2017-06-28" ?


(Mark Walkom) #2

There's not because we cannot guarantee the order of response, see Order of aggregations


(Hardy Heron) #3

ok, understood - thanks for the info!


(system) #4

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