# Bulk index operation for multiple indices

**URL:** <https://discuss.elastic.co/t/bulk-index-operation-for-multiple-indices/120373>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [February 18, 2018, 11:14pm UTC](https://discuss.elastic.co/t/bulk-index-operation-for-multiple-indices/120373 "2018-02-18T23:14:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phuong\_Hoang](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@Phuong\_Hoang](https://discuss.elastic.co/u/Phuong_Hoang)\
**Post date:** [February 18, 2018, 11:14pm UTC](https://discuss.elastic.co/t/bulk-index-operation-for-multiple-indices/120373/1 "2018-02-18T23:14:18Z")

</div>

I am using esrally version 0.9.1, elasticsearch version 6.1.3  
After executing the custom track for multiple indices, I can index documents for only `oci-vcn` but not `oci-user`(testing with the existing es-cluster)

How could I index the documents for all indices (both `oci-vcn`, `oci-user`) ?

This is the track.json

```auto
{
  "name": "Sample track",
  "indices": [
    {
      "name": "oci-user",
      "auto-managed": false,
      "body": "user-index.json",
      "types": ["oci-user"]
    },
    {
      "name": "oci-vcn",
      "auto-managed": false,
      "body": "vcn-index.json",
      "types": ["oci-vcn"]
    }
  ],
  "corpora": [
    {
      "name": "oci-vcn",
      "documents": [
        {
          "source-file": "documents.json",
          "document-count": 1,
          "target-type": "oci-vcn",
          "target-index": "oci-vcn"
        }
      ]
    },
    {
      "name": "oci-user",
      "documents": [
        {
          "source-file": "documents.json",
          "document-count": 1,
          "target-type": "oci-user",
          "target-index": "oci-user"
        }
      ]
    }
  ],
  "challenges": [
    {
      "name": "create-index",
      "default": true,
      "schedule": [
        {
          "operation": {
            "operation-type": "delete-index"
          }
        },
        {
          "operation": {
            "operation-type": "create-index"
          }
        },
        {
          "operation": {
            "operation-type": "cluster-health",
            "request-params": {
              "wait-for-status": "green"
            }
          }
        },
        {
          "operation": {
            "operation-type": "bulk",
            "bulk-size": 10
          }
        }
      ]
    }
  ]
}

```

This is `user-index.json`

```auto
{
  "settings": {
    "number_of_replicas": 0
  },
  "mappings": {
    "oci-user": {
      "dynamic": "strict",
      "properties": {
        "name": {
          "type": "text"
        },
        "age": {
          "type": "integer"
        },
        "email": {
          "type": "keyword"
        }
      }
    }
  }
}

```

This is `vcn-index.json`

```auto
{
  "settings": {
    "number_of_replicas": 0
  },
  "mappings": {
    "oci-vcn": {
      "dynamic": "strict",
      "properties": {
        "name": {
          "type": "text"
        }
      }
    }
  }
}

```

This is `oci-user/documents.json`

```auto
{ "name": "Foo Bar", "age": 40, "email": "Foo@Bar.com" }

```

This is `oci-vcn/documents.json`

```auto
{ "name": "Foo Bar"}

```

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [February 19, 2018, 1:13pm UTC](https://discuss.elastic.co/t/bulk-index-operation-for-multiple-indices/120373/2 "2018-02-19T13:13:42Z")

</div>

Hi @Phuong_Hoang,

you have fallen into a very subtle trap (see already open [issue #377](https://github.com/elastic/rally/issues/377)). If you do not specify any warmup time-period, Rally assumes that by default you want to run an iteration-based benchmark. The default is to run one iteration and therefore the benchmark only issues one bulk request.

You can fix this by specifying a warmup time-period (even if it just one second). E.g:

```auto
{
    "operation": {
        "operation-type": "bulk",
        "bulk-size": 10
    },
    "warmup-time-period": 120
}

```

I have to say that this is extremely hard to spot and we should do something about it. Hence, I have increased the priority of the ticket that I've mentioned.

Daniel

---

<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:** [March 19, 2018, 1:14pm UTC](https://discuss.elastic.co/t/bulk-index-operation-for-multiple-indices/120373/3 "2018-03-19T13:14:11Z")

</div>

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