# Ingest Node Processor

**URL:** https://discuss.elastic.co/t/ingest-node-processor/109616
**Category:** Elasticsearch
**Created:** [November 29, 2017, 3:14pm UTC](https://discuss.elastic.co/t/ingest-node-processor/109616 "2017-11-29T15:14:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![annaK](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@annaK](https://discuss.elastic.co/u/annaK)
#### Post date: [November 29, 2017, 3:14pm UTC](https://discuss.elastic.co/t/ingest-node-processor/109616/1 "2017-11-29T15:14:05Z")

</div>

Hi all,  
short question about the Processor.  
I am using a processor called monthlyindex, with the following settings:

```
{
  "description": "monthly date-time index naming",
  "processors" : [
    {
      "date_index_name" : {
        "field" : "@timestamp",
        "index_name_prefix" : "anna-test-index-",
        "date_rounding" : "M",
		"index_name_format" : "YYYY.MM"
      }
    }
  ]
}

```

I am inserting documents to this a index with Java via:  
`IndexResponse response = client.prepareIndex("anna-test-index", "test").setSource(insertObject).setId("eins").setPipeline("monthlyindex").get();`

As far as I can see the index for this month has been created automatically. But unfortunately I need a special index mapping for this index. Am I able to specify this mapping somehow in the processor? Or how can I do it?  
I am using elasticsearch 5.2.2. 🙂

Thanks in advance  
Anna

---

<div class="post-metadata">

### Author: ![luiz.santos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luiz.santos/32/24664_2.png) [@luiz.santos](https://discuss.elastic.co/u/luiz.santos)
#### Post date: [November 29, 2017, 7:34pm UTC](https://discuss.elastic.co/t/ingest-node-processor/109616/2 "2017-11-29T19:34:51Z")

</div>

Hi Anna,

You could use a [template](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html) for index creation.

In your example it would look like this:

```
PUT _template/name_of_your_template
{
  "index_patterns": ["anna-test*"],
  "mappings": {
    "my-type": {
      "properties": {
        "age": {
          "type": "integer"
        }
      }
    }
  }
}

```

It means that all indices starting with "anna-test" will be created with that configuration.

Hope it helps,  
LG

---

<div class="post-metadata">

### Author: ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)
#### Post date: [November 30, 2017, 12:32am UTC](https://discuss.elastic.co/t/ingest-node-processor/109616/3 "2017-11-30T00:32:09Z")

</div>

Anna you should be using the Index Template feature as my colegue Luiz refered, but just keep in mind that the example he used is the syntax for 6.0. The syntax for Index Template for 5.x is slightly different, you should be using the attribute `template` instead of `index_patterns` (more details [here](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/indices-templates.html))

---

<div class="post-metadata">

### Author: ![annaK](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@annaK](https://discuss.elastic.co/u/annaK)
#### Post date: [November 30, 2017, 7:23am UTC](https://discuss.elastic.co/t/ingest-node-processor/109616/4 "2017-11-30T07:23:25Z")

</div>

Thank you very much 😊  
Works like a charm!

---

<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: [December 28, 2017, 7:23am UTC](https://discuss.elastic.co/t/ingest-node-processor/109616/5 "2017-12-28T07:23:51Z")

</div>

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