# Logstahs output with myType

**URL:** <https://discuss.elastic.co/t/logstahs-output-with-mytype/39914>\
**Category:** Logstash\
**Created:** [January 22, 2016, 6:46pm UTC](https://discuss.elastic.co/t/logstahs-output-with-mytype/39914 "2016-01-22T18:46:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabio\_Ebner](https://avatars.discourse-cdn.com/v4/letter/f/ccd318/32.png) [@Fabio\_Ebner](https://discuss.elastic.co/u/Fabio_Ebner)\
**Post date:** [January 22, 2016, 6:46pm UTC](https://discuss.elastic.co/t/logstahs-output-with-mytype/39914/1 "2016-01-22T18:46:12Z")

</div>

I create one index with my mapping for example:

```
{
  "aliases" : {
    "imoveislogradouro" : {}
  },
    "mappings" : {
      "imoveislogradourotype" : {
        "properties" : {
          "logradouros" : {
            "type" : "string",
            "analyzer" : "phoneticAnalyzer"
          },
          "logradourosNaoFoneticado" : {
            "type" : "string",
            "analyzer" : "naoFoneticado"
          }
        }
      }
    },
    "settings" : {
      "index" : {
        "analysis" : {
          "filter" : {
            "beider_morse" : {
              "languageset" : ["portuguese", "french", "english", "german"],
              "type" : "phonetic",
              "encoder" : "beider_morse"
            },
            "my_stemmer" : {
              "type" : "stemmer",
              "name" : "brazilian"
            }
          },
          "analyzer" : {
            "phoneticAnalyzer" : {
              "filter" : ["asciifolding","standard", "lowercase", "stemmer", "beider_morse"],
              "type" : "custom",
              "tokenizer" : "standard"
            },
            "naoFoneticado" : {
              "filter" : ["asciifolding","standard","lowercase", "my_stemmer"],
              "type" : "custom",
              "tokenizer" : "standard"
            }
          }
        }
      }
    }
}

```

so how can I tell to logasth to use my `imoveislogradourotype` to insert the values? because when I try to input the logstash create one logs type and don`t use my.

tks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 23, 2016, 4:38pm UTC](https://discuss.elastic.co/t/logstahs-output-with-mytype/39914/2 "2016-01-23T16:38:06Z")

</div>

Set the `type` field of the events to "imoveislogradourotype". This is usually done in the input plugins.

---

<div class="post-metadata">

**Author:** ![Fabio\_Ebner](https://avatars.discourse-cdn.com/v4/letter/f/ccd318/32.png) [@Fabio\_Ebner](https://discuss.elastic.co/u/Fabio_Ebner)\
**Post date:** [January 23, 2016, 5:08pm UTC](https://discuss.elastic.co/t/logstahs-output-with-mytype/39914/3 "2016-01-23T17:08:09Z")

</div>

do you have some sample?

tks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 23, 2016, 5:22pm UTC](https://discuss.elastic.co/t/logstahs-output-with-mytype/39914/4 "2016-01-23T17:22:16Z")

</div>

```auto
input {
  whatever {
    ...
    type => "imoveislogradourotype"
  }
}

```

---

<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:** [July 6, 2017, 5:14am UTC](https://discuss.elastic.co/t/logstahs-output-with-mytype/39914/5 "2017-07-06T05:14:37Z")

</div>

Closed on July 6, 2017, 5:14am UTC


