Created
July 19, 2016 07:00
-
-
Save synhershko/665530fc71eac0a0232145a667175891 to your computer and use it in GitHub Desktop.
ES template for Twitter data
This file contains hidden or 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*", | |
"settings": { | |
"number_of_replicas" : 0, "number_of_shards" : 1, | |
"analysis": { | |
"analyzer": { | |
"html_keyword": { | |
"type":"custom", | |
"tokenizer": "keyword", | |
"char_filter": ["html_strip"] | |
} | |
} | |
} | |
}, | |
"mappings":{ | |
"tweet":{ | |
"dynamic_templates":[ | |
{"unindexed_fields":{"mapping":{"enabled":false,"type":"object"},"match":"*"}} | |
], | |
"properties": { | |
"@timestamp":{ | |
"type":"date", | |
"format":"dateOptionalTime" | |
}, | |
"coordinates":{ | |
"properties": { | |
"coordinates": { | |
"type": "geo_point" | |
}, | |
"type": { | |
"type": "string" | |
} | |
} | |
}, | |
"created_at":{ | |
"type":"date", | |
"format": "E MMM dd HH:mm:ss Z yyyy" | |
}, | |
"entities":{ | |
"properties":{ | |
"hashtags":{ | |
"properties":{ | |
"text":{ | |
"type":"string" | |
} | |
} | |
}, | |
"media":{ | |
"properties":{ | |
"expanded_url":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"id_str":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"media_url":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"media_url_https":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"source_status_id_str":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"source_user_id_str":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"type":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"url":{ | |
"type":"string", "index": "not_analyzed" | |
} | |
} | |
}, | |
"urls":{ | |
"properties":{ | |
"display_url":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"expanded_url":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"url":{ | |
"type":"string", "index": "not_analyzed" | |
} | |
} | |
}, | |
"user_mentions":{ | |
"properties":{ | |
"id_str":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"name":{ | |
"type":"string" | |
}, | |
"screen_name":{ | |
"type":"string" | |
} | |
} | |
} | |
} | |
}, | |
"favorite_count":{ | |
"type":"long" | |
}, | |
"favorited":{ | |
"type":"boolean" | |
}, | |
"filter_level":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"geo":{ | |
"properties": { | |
"coordinates": { | |
"type": "geo_point" | |
}, | |
"type": { | |
"type": "string" | |
} | |
} | |
}, | |
"id_str":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"in_reply_to_screen_name":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"in_reply_to_status_id_str":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"in_reply_to_user_id_str":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"is_quote_status":{ | |
"type":"boolean" | |
}, | |
"lang":{ | |
"type":"string", "index":"not_analyzed" | |
}, | |
"place":{ | |
"properties":{ | |
"country":{ | |
"type":"string" | |
}, | |
"country_code":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"full_name":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"id":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"name":{ | |
"type":"string" | |
}, | |
"place_type":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"url":{ | |
"type":"string", "index": "not_analyzed" | |
} | |
} | |
}, | |
"possibly_sensitive":{ | |
"type":"boolean" | |
}, | |
"quoted_status_id_str":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"retweet_count":{ | |
"type":"long" | |
}, | |
"retweeted":{ | |
"type":"boolean" | |
}, | |
"source":{ | |
"type":"string", "analyzer": "html_keyword" | |
}, | |
"text":{ | |
"type":"string" | |
}, | |
"timestamp_ms":{ | |
"type":"long" | |
}, | |
"truncated":{ | |
"type":"boolean" | |
}, | |
"user":{ | |
"properties":{ | |
"favourites_count":{ | |
"type":"long" | |
}, | |
"followers_count":{ | |
"type":"long" | |
}, | |
"friends_count":{ | |
"type":"long" | |
}, | |
"geo_enabled":{ | |
"type":"boolean" | |
}, | |
"id_str":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"is_translator":{ | |
"type":"boolean" | |
}, | |
"lang":{ | |
"type":"string", "index": "not_analyzed" | |
}, | |
"location":{ | |
"type":"string" | |
}, | |
"name":{ | |
"type":"string", | |
"fields": { | |
"raw": { "type": "string", "index": "not_analyzed"} | |
} | |
}, | |
"protected":{ | |
"type":"boolean" | |
}, | |
"screen_name":{ | |
"type": "string", | |
"fields": { | |
"raw": { "type": "string", "index": "not_analyzed"} | |
} | |
}, | |
"statuses_count":{ | |
"type":"long" | |
}, | |
"time_zone":{ | |
"type":"string" | |
}, | |
"url":{ | |
"type":"string" | |
}, | |
"utc_offset":{ | |
"type":"long" | |
}, | |
"verified":{ | |
"type":"boolean" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment