Elasticsearch Query discard documents where sum of field is x

Hello,

I have documents that look like the following:

  "_index": "test",
  "_type": "_doc",
  "_id": "p767Cn0BpA6tOYGm9B_P",
  "_version": 1,
  "_score": null,
  "_source": {
    "path": "entry_1",
    "elap_t": 89,
    "account_type": "b1",
    "order_key": "911cd7bf476e39dfcfc2b3c6b23860",
    "repeat": 0,
    "timestamp": 2021-11-10T16:42:46.000Z

I'm trying to build a query that only shows documents after the first documents where teh elap_t field totals 1800 Documents will have an elap_t field of arbitrary values. I think what I need to do is sort the documents in ascending order and somehow only show the documents after the first documents where the total of elap_t > 1800 Does that make sense and is this even doable in Elasticsearch?

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