# Roll Up Index does not get populated with documents

**URL:** <https://discuss.elastic.co/t/roll-up-index-does-not-get-populated-with-documents/294707>\
**Category:** Elasticsearch\
**Tags:** rollups\
**Created:** [January 18, 2022, 3:25pm UTC](https://discuss.elastic.co/t/roll-up-index-does-not-get-populated-with-documents/294707 "2022-01-18T15:25:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kosodrom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kosodrom/32/99278_2.png) [@Kosodrom](https://discuss.elastic.co/u/Kosodrom)\
**Post date:** [January 18, 2022, 3:25pm UTC](https://discuss.elastic.co/t/roll-up-index-does-not-get-populated-with-documents/294707/1 "2022-01-18T15:25:52Z")

</div>

Hi folks,

my goal is to archive the document [\_size](https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-size.html) of incoming logs in specific archive index, because the original document gets deleted using ILM.

Example Document:

```auto
{
   "_index":"filebeat-live-index-01",
   "_type":"_doc",
   "_id":"okl-3H0BqY5xTzuloFW0",
   "_size":1435,
   "_source":{
      "kubernetes":{
         "namespace":"some_namespace",
         "container":{
            "name":"some_container"
         },
 
      "message":" some log message"
   }
}

```

From [this post](https://discuss.elastic.co/t/save-a-field-into-another-index/292455) I learned that [roll up](https://www.elastic.co/guide/en/kibana/current/data-rollups.html) mechanism can be used for it. I have configured the rollup-job but my rollup index has always 0 documents.

This is my rollup job:

```auto
{
  "config": {
    "id": "rollup_test",
    "index_pattern": "filebeat-live-index-*",
    "rollup_index": "size_archive",
    "cron": "0 * * * * ?",
    "groups": {
      "date_histogram": {
        "fixed_interval": "30s",
        "field": "@timestamp",
        "time_zone": "UTC"
      },
      "terms": {
        "fields": [
          "_size"
        ]
      }
    },
    "metrics": [],
    "timeout": "20s",
    "page_size": 1000
  },
  "status": {
    "job_state": "stopped",
    "current_position": {
      "@timestamp.date_histogram": 1640081820000,
      "_size.terms": 1461
    },
    "upgraded_doc_id": true
  },
  "stats": {
    "pages_processed": 554,
    "documents_processed": 2156167,
    "rollups_indexed": 397469,
    "trigger_count": 156,
    "index_time_in_ms": 48054,
    "index_total": 398,
    "index_failures": 0,
    "search_time_in_ms": 5844,
    "search_total": 554,
    "search_failures": 0,
    "processing_time_in_ms": 1524,
    "processing_total": 554
  }
}

```

Do you have any Idea why `size_archive` index is empty?

Thanks

---

<div class="post-metadata">

**Author:** ![Kosodrom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kosodrom/32/99278_2.png) [@Kosodrom](https://discuss.elastic.co/u/Kosodrom)\
**Post date:** [January 18, 2022, 5:04pm UTC](https://discuss.elastic.co/t/roll-up-index-does-not-get-populated-with-documents/294707/2 "2022-01-18T17:04:37Z")

</div>

When I do rollup on some other field such as `kubernetes.namespace` (which is a keyword) it works.

I can see documents in the rollup index. Can anyone help me to add \_size field to rollup index? Thanks

---

<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 15, 2022, 5:04pm UTC](https://discuss.elastic.co/t/roll-up-index-does-not-get-populated-with-documents/294707/3 "2022-02-15T17:04:38Z")

</div>

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