# Data Loss/Unavailability in Elastic Search for querying after the ilm policy execution

**URL:** <https://discuss.elastic.co/t/data-loss-unavailability-in-elastic-search-for-querying-after-the-ilm-policy-execution/267548>\
**Category:** Elasticsearch\
**Created:** [March 17, 2021, 4:36pm UTC](https://discuss.elastic.co/t/data-loss-unavailability-in-elastic-search-for-querying-after-the-ilm-policy-execution/267548 "2021-03-17T16:36:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![manofjoy](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@manofjoy](https://discuss.elastic.co/u/manofjoy)\
**Post date:** [March 17, 2021, 4:36pm UTC](https://discuss.elastic.co/t/data-loss-unavailability-in-elastic-search-for-querying-after-the-ilm-policy-execution/267548/1 "2021-03-17T16:36:57Z")

</div>

I see there are documents in the index and writes are happening, yet I can't query. (attached image).

```
ilm policy: attached to indices.
PUT _ilm/policy/livestream_delete_policy
{
"policy": {
"phases": {
  "hot": {
"min_age": "0ms",
"actions": {
  "rollover": {
    "max_age": "12h"
  },
  "set_priority": {
    "priority": 100
  }
}
  },
  "delete": {
"min_age": "48h",
"actions": {
  "delete": {}
}
  }
}
}
} 

```

At every 48th hour, experiencing this problem of Data Unavailability. The index writes are happening, but reads doesn't show up, and Kibana returns blank (Discover/Search).

```
http://<host>:9200/livestream/_search
{
  "took": 305,
  "timed_out": false,
  "_shards": {
    "total": 80,
    "successful": 80,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 0,
      "relation": "eq"
    },
    "max_score": null,
    "hits": []
  }
}

```

I have another (dev/test) environment, with a different ilm policy. Both writes and reads are happening without any issue. Only difference I have is 'delete after 12h rollover'

 ![Screen Shot 2021-03-17 at 10.34.01 AM](https://us1.discourse-cdn.com/elastic/original/3X/1/8/1815da67c599f40f40e94a48f5dbf051e7b8f72a.jpeg)

```
PUT _ilm/policy/livestream_delete_policy
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_age": "12h"
          },
          "set_priority": {
            "priority": 100
          }
        }
      },
      "delete": {
        "min_age": "12h",
        "actions": {
          "delete": {
            "delete_searchable_snapshot": true
          }
        }
      }
    }
  }
}

```

Result Json from test host.

```
{
  "took": 5754,
  "timed_out": false,
  "_shards": {
    "total": 30,
    "successful": 30,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 10000,
      "relation": "gte"
    },
    "max_score": null,
    "hits": []
  }
}
```

---

<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:** [April 14, 2021, 4:37pm UTC](https://discuss.elastic.co/t/data-loss-unavailability-in-elastic-search-for-querying-after-the-ilm-policy-execution/267548/2 "2021-04-14T16:37:06Z")

</div>

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