Logstahs output with myType


(Fabio Ebner) #1

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


(Magnus Bäck) #2

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


(Fabio Ebner) #3

do you have some sample?

tks


(Magnus Bäck) #4
input {
  whatever {
    ...
    type => "imoveislogradourotype"
  }
}

(system) #5