Created
May 23, 2017 08:56
-
-
Save tecsyscom/15339f2984df4b5e71998a45753ce0a9 to your computer and use it in GitHub Desktop.
how to get an template example for twitter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"template": "twitter_elastic_example", | |
"settings": { | |
"number_of_shards": 1, | |
"number_of_replicas": 0 | |
}, | |
"mappings": { | |
"_default_": { | |
"_all": { | |
"enabled": true | |
}, | |
"properties": { | |
"@timestamp": { | |
"type": "date", | |
"format": "dateOptionalTime" | |
}, | |
"text": { | |
"type": "text" | |
}, | |
"user": { | |
"type": "object", | |
"properties": { | |
"description": { | |
"type": "text" | |
} | |
} | |
}, | |
"coordinates": { | |
"type": "object", | |
"properties": { | |
"coordinates": { | |
"type": "geo_point" | |
} | |
} | |
}, | |
"entities": { | |
"type": "object", | |
"properties": { | |
"hashtags": { | |
"type": "object", | |
"properties": { | |
"text": { | |
"type": "text", | |
"fielddata": true | |
} | |
} | |
} | |
} | |
}, | |
"retweeted_status": { | |
"type": "object", | |
"properties": { | |
"text": { | |
"type": "text" | |
} | |
} | |
} | |
}, | |
"dynamic_templates": [ | |
{ | |
"string_template": { | |
"match": "*", | |
"match_mapping_type": "string", | |
"mapping": { | |
"type": "keyword" | |
} | |
} | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
output {
stdout {
codec => dots
}
elasticsearch {
hosts => "localhost:9200"
index => "logstash-twitter_elastic_example"
document_type => "tweets"
template => "./twitter_template.json"
template_name => "twitter_elastic_example"
template_overwrite => true
}
}