Skip to content

Instantly share code, notes, and snippets.

@loicbertron
Created November 9, 2012 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loicbertron/4048019 to your computer and use it in GitHub Desktop.
Save loicbertron/4048019 to your computer and use it in GitHub Desktop.
Twitter Mapping
{
"tweet" : {
"_source" : {
"compress" : true
},
"properties" : {
"contributors" : {
"type" : "long",
"ignore_malformed" : false
},
"coordinates" : {
"dynamic" : "true",
"properties" : {
"coordinates" : {
"type" : "double",
"ignore_malformed" : false
},
"type" : {
"type" : "string"
}
}
},
"created_at" : {
"type" : "date",
"ignore_malformed" : false,
"format" : "EEE MMM dd HH:mm:ss Z yyyy"
},
"entities" : {
"dynamic" : "true",
"properties" : {
"hashtags" : {
"dynamic" : "true",
"properties" : {
"indices" : {
"type" : "long",
"ignore_malformed" : false
},
"text" : {
"type" : "string"
}
}
},
"media" : {
"dynamic" : "true",
"properties" : {
"display_url" : {
"type" : "string"
},
"expanded_url" : {
"type" : "string"
},
"id" : {
"type" : "long",
"ignore_malformed" : false
},
"id_str" : {
"type" : "string"
},
"indices" : {
"type" : "long",
"ignore_malformed" : false
},
"media_url" : {
"type" : "string"
},
"media_url_https" : {
"type" : "string"
},
"sizes" : {
"dynamic" : "true",
"properties" : {
"large" : {
"dynamic" : "true",
"properties" : {
"h" : {
"type" : "long",
"ignore_malformed" : false
},
"resize" : {
"type" : "string"
},
"w" : {
"type" : "long",
"ignore_malformed" : false
}
}
},
"medium" : {
"dynamic" : "true",
"properties" : {
"h" : {
"type" : "long",
"ignore_malformed" : false
},
"resize" : {
"type" : "string"
},
"w" : {
"type" : "long",
"ignore_malformed" : false
}
}
},
"small" : {
"dynamic" : "true",
"properties" : {
"h" : {
"type" : "long",
"ignore_malformed" : false
},
"resize" : {
"type" : "string"
},
"w" : {
"type" : "long",
"ignore_malformed" : false
}
}
},
"thumb" : {
"dynamic" : "true",
"properties" : {
"h" : {
"type" : "long",
"ignore_malformed" : false
},
"resize" : {
"type" : "string"
},
"w" : {
"type" : "long",
"ignore_malformed" : false
}
}
}
}
},
"source_status_id" : {
"type" : "long",
"ignore_malformed" : false
},
"source_status_id_str" : {
"type" : "string"
},
"type" : {
"type" : "string"
},
"url" : {
"type" : "string"
}
}
},
"urls" : {
"dynamic" : "true",
"properties" : {
"display_url" : {
"type" : "string"
},
"expanded_url" : {
"type" : "string"
},
"indices" : {
"type" : "long",
"ignore_malformed" : false
},
"url" : {
"type" : "string"
}
}
},
"user_mentions" : {
"dynamic" : "true",
"properties" : {
"id" : {
"type" : "long",
"ignore_malformed" : false
},
"id_str" : {
"type" : "string"
},
"indices" : {
"type" : "long",
"ignore_malformed" : false
},
"name" : {
"type" : "string"
},
"screen_name" : {
"type" : "string"
}
}
}
}
},
"facets" : {
"type" : "object",
"dynamic" : "true"
},
"favorited" : {
"type" : "boolean"
},
"from" : {
"type" : "long",
"ignore_malformed" : false
},
"geo" : {
"dynamic" : "true",
"properties" : {
"coordinates" : {
"type" : "double",
"ignore_malformed" : false
},
"type" : {
"type" : "string"
}
}
},
"hashtag" : {
"dynamic" : "true",
"properties" : {
"end" : {
"type" : "long",
"ignore_malformed" : false
},
"start" : {
"type" : "long",
"ignore_malformed" : false
},
"text" : {
"type" : "string"
}
}
},
"id" : {
"type" : "string"
},
"id_str" : {
"type" : "string"
},
"in_reply" : {
"dynamic" : "true",
"properties" : {
"status" : {
"type" : "long",
"ignore_malformed" : false
},
"user_id" : {
"type" : "long",
"ignore_malformed" : false
},
"user_screen_name" : {
"type" : "string"
}
}
},
"in_reply_to_screen_name" : {
"type" : "string"
},
"in_reply_to_status_id" : {
"type" : "long",
"ignore_malformed" : false
},
"in_reply_to_status_id_str" : {
"type" : "string"
},
"in_reply_to_user_id" : {
"type" : "long",
"ignore_malformed" : false
},
"in_reply_to_user_id_str" : {
"type" : "string"
},
"link" : {
"dynamic" : "true",
"properties" : {
"display_url" : {
"type" : "string"
},
"end" : {
"type" : "long",
"ignore_malformed" : false
},
"expand_url" : {
"type" : "string"
},
"start" : {
"type" : "long",
"ignore_malformed" : false
},
"url" : {
"type" : "string"
}
}
},
"location" : {
"dynamic" : "true",
"properties" : {
"lat" : {
"type" : "double",
"ignore_malformed" : false
},
"lon" : {
"type" : "double",
"ignore_malformed" : false
}
}
},
"mention" : {
"dynamic" : "true",
"properties" : {
"end" : {
"type" : "long",
"ignore_malformed" : false
},
"id" : {
"type" : "long",
"ignore_malformed" : false
},
"name" : {
"type" : "string"
},
"screen_name" : {
"type" : "string"
},
"start" : {
"type" : "long",
"ignore_malformed" : false
}
}
},
"place" : {
"dynamic" : "true",
"properties" : {
"attributes" : {
"dynamic" : "true",
"properties" : {
"locality" : {
"type" : "string"
},
"region" : {
"type" : "string"
},
"street_address" : {
"type" : "string"
}
}
},
"bounding_box" : {
"dynamic" : "true",
"properties" : {
"coordinates" : {
"type" : "double",
"ignore_malformed" : false
},
"type" : {
"type" : "string"
}
}
},
"country" : {
"type" : "string"
},
"country_code" : {
"type" : "string"
},
"full_name" : {
"type" : "string"
},
"id" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"place_type" : {
"type" : "string"
},
"type" : {
"type" : "string"
},
"url" : {
"type" : "string"
}
}
},
"possibly_sensitive" : {
"type" : "boolean"
},
"possibly_sensitive_editable" : {
"type" : "boolean"
},
"query" : {
"dynamic" : "true",
"properties" : {
"bool" : {
"dynamic" : "true",
"properties" : {
"must" : {
"dynamic" : "true",
"properties" : {
"match_all" : {
"type" : "object",
"dynamic" : "true"
}
}
}
}
}
}
},
"retweet_count" : {
"type" : "long",
"ignore_malformed" : false
},
"retweeted" : {
"type" : "boolean"
},
"retweeted_status" : {
"dynamic" : "true",
"properties" : {
"contributors" : {
"type" : "long",
"ignore_malformed" : false
},
"coordinates" : {
"dynamic" : "true",
"properties" : {
"coordinates" : {
"type" : "double",
"ignore_malformed" : false
},
"type" : {
"type" : "string"
}
}
},
"created_at" : {
"type" : "string"
},
"entities" : {
"dynamic" : "true",
"properties" : {
"hashtags" : {
"dynamic" : "true",
"properties" : {
"indices" : {
"type" : "long",
"ignore_malformed" : false
},
"text" : {
"type" : "string"
}
}
},
"media" : {
"dynamic" : "true",
"properties" : {
"display_url" : {
"type" : "string"
},
"expanded_url" : {
"type" : "string"
},
"id" : {
"type" : "long",
"ignore_malformed" : false
},
"id_str" : {
"type" : "string"
},
"indices" : {
"type" : "long",
"ignore_malformed" : false
},
"media_url" : {
"type" : "string"
},
"media_url_https" : {
"type" : "string"
},
"sizes" : {
"dynamic" : "true",
"properties" : {
"large" : {
"dynamic" : "true",
"properties" : {
"h" : {
"type" : "long",
"ignore_malformed" : false
},
"resize" : {
"type" : "string"
},
"w" : {
"type" : "long",
"ignore_malformed" : false
}
}
},
"medium" : {
"dynamic" : "true",
"properties" : {
"h" : {
"type" : "long",
"ignore_malformed" : false
},
"resize" : {
"type" : "string"
},
"w" : {
"type" : "long",
"ignore_malformed" : false
}
}
},
"small" : {
"dynamic" : "true",
"properties" : {
"h" : {
"type" : "long",
"ignore_malformed" : false
},
"resize" : {
"type" : "string"
},
"w" : {
"type" : "long",
"ignore_malformed" : false
}
}
},
"thumb" : {
"dynamic" : "true",
"properties" : {
"h" : {
"type" : "long",
"ignore_malformed" : false
},
"resize" : {
"type" : "string"
},
"w" : {
"type" : "long",
"ignore_malformed" : false
}
}
}
}
},
"source_status_id" : {
"type" : "long",
"ignore_malformed" : false
},
"source_status_id_str" : {
"type" : "string"
},
"type" : {
"type" : "string"
},
"url" : {
"type" : "string"
}
}
},
"urls" : {
"dynamic" : "true",
"properties" : {
"display_url" : {
"type" : "string"
},
"expanded_url" : {
"type" : "string"
},
"indices" : {
"type" : "long",
"ignore_malformed" : false
},
"url" : {
"type" : "string"
}
}
},
"user_mentions" : {
"dynamic" : "true",
"properties" : {
"id" : {
"type" : "long",
"ignore_malformed" : false
},
"id_str" : {
"type" : "string"
},
"indices" : {
"type" : "long",
"ignore_malformed" : false
},
"name" : {
"type" : "string"
},
"screen_name" : {
"type" : "string"
}
}
}
}
},
"favorited" : {
"type" : "boolean"
},
"geo" : {
"dynamic" : "true",
"properties" : {
"coordinates" : {
"type" : "double",
"ignore_malformed" : false
},
"type" : {
"type" : "string"
}
}
},
"id" : {
"type" : "long",
"ignore_malformed" : false
},
"id_str" : {
"type" : "string"
},
"in_reply_to_screen_name" : {
"type" : "string"
},
"in_reply_to_status_id" : {
"type" : "long",
"ignore_malformed" : false
},
"in_reply_to_status_id_str" : {
"type" : "string"
},
"in_reply_to_user_id" : {
"type" : "long",
"ignore_malformed" : false
},
"in_reply_to_user_id_str" : {
"type" : "string"
},
"place" : {
"dynamic" : "true",
"properties" : {
"attributes" : {
"dynamic" : "true",
"properties" : {
"locality" : {
"type" : "string"
},
"region" : {
"type" : "string"
},
"street_address" : {
"type" : "string"
}
}
},
"bounding_box" : {
"dynamic" : "true",
"properties" : {
"coordinates" : {
"type" : "double",
"ignore_malformed" : false
},
"type" : {
"type" : "string"
}
}
},
"country" : {
"type" : "string"
},
"country_code" : {
"type" : "string"
},
"full_name" : {
"type" : "string"
},
"id" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"place_type" : {
"type" : "string"
},
"url" : {
"type" : "string"
}
}
},
"possibly_sensitive" : {
"type" : "boolean"
},
"possibly_sensitive_editable" : {
"type" : "boolean"
},
"retweet_count" : {
"type" : "long",
"ignore_malformed" : false
},
"retweeted" : {
"type" : "boolean"
},
"scopes" : {
"dynamic" : "true",
"properties" : {
"followers" : {
"type" : "boolean"
}
}
},
"source" : {
"type" : "string"
},
"text" : {
"type" : "string"
},
"truncated" : {
"type" : "boolean"
},
"user" : {
"dynamic" : "true",
"properties" : {
"contributors_enabled" : {
"type" : "boolean"
},
"created_at" : {
"type" : "string"
},
"default_profile" : {
"type" : "boolean"
},
"default_profile_image" : {
"type" : "boolean"
},
"description" : {
"type" : "string"
},
"favourites_count" : {
"type" : "long",
"ignore_malformed" : false
},
"followers_count" : {
"type" : "long",
"ignore_malformed" : false
},
"friends_count" : {
"type" : "long",
"ignore_malformed" : false
},
"geo_enabled" : {
"type" : "boolean"
},
"id" : {
"type" : "long",
"ignore_malformed" : false
},
"id_str" : {
"type" : "string"
},
"is_translator" : {
"type" : "boolean"
},
"lang" : {
"type" : "string"
},
"listed_count" : {
"type" : "long",
"ignore_malformed" : false
},
"location" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"profile_background_color" : {
"type" : "string"
},
"profile_background_image_url" : {
"type" : "string"
},
"profile_background_image_url_https" : {
"type" : "string"
},
"profile_background_tile" : {
"type" : "boolean"
},
"profile_banner_url" : {
"type" : "string"
},
"profile_image_url" : {
"type" : "string"
},
"profile_image_url_https" : {
"type" : "string"
},
"profile_link_color" : {
"type" : "string"
},
"profile_sidebar_border_color" : {
"type" : "string"
},
"profile_sidebar_fill_color" : {
"type" : "string"
},
"profile_text_color" : {
"type" : "string"
},
"profile_use_background_image" : {
"type" : "boolean"
},
"protected" : {
"type" : "boolean"
},
"screen_name" : {
"type" : "string"
},
"statuses_count" : {
"type" : "long",
"ignore_malformed" : false
},
"time_zone" : {
"type" : "string"
},
"url" : {
"type" : "string"
},
"utc_offset" : {
"type" : "long",
"ignore_malformed" : false
},
"verified" : {
"type" : "boolean"
}
}
}
}
},
"size" : {
"type" : "long",
"ignore_malformed" : false
},
"source" : {
"type" : "string"
},
"text" : {
"type" : "string"
},
"truncated" : {
"type" : "boolean"
},
"user" : {
"dynamic" : "true",
"properties" : {
"contributors_enabled" : {
"type" : "boolean"
},
"created_at" : {
"type" : "string"
},
"default_profile" : {
"type" : "boolean"
},
"default_profile_image" : {
"type" : "boolean"
},
"description" : {
"type" : "string"
},
"favourites_count" : {
"type" : "string"
},
"followers_count" : {
"type" : "string"
},
"friends_count" : {
"type" : "string"
},
"geo_enabled" : {
"type" : "boolean"
},
"id" : {
"type" : "long",
"ignore_malformed" : false
},
"id_str" : {
"type" : "string"
},
"is_translator" : {
"type" : "boolean"
},
"lang" : {
"type" : "string"
},
"listed_count" : {
"type" : "long",
"ignore_malformed" : false
},
"location" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"profile_background_color" : {
"type" : "string"
},
"profile_background_image_url" : {
"type" : "string"
},
"profile_background_image_url_https" : {
"type" : "string"
},
"profile_background_tile" : {
"type" : "boolean"
},
"profile_banner_url" : {
"type" : "string"
},
"profile_image_url" : {
"type" : "string"
},
"profile_image_url_https" : {
"type" : "string"
},
"profile_link_color" : {
"type" : "string"
},
"profile_sidebar_border_color" : {
"type" : "string"
},
"profile_sidebar_fill_color" : {
"type" : "string"
},
"profile_text_color" : {
"type" : "string"
},
"profile_use_background_image" : {
"type" : "boolean"
},
"protected" : {
"type" : "boolean"
},
"screen_name" : {
"type" : "string"
},
"show_all_inline_media" : {
"type" : "boolean"
},
"statuses_count" : {
"type" : "string"
},
"time_zone" : {
"type" : "string"
},
"url" : {
"type" : "string"
},
"utc_offset" : {
"type" : "long",
"ignore_malformed" : false
},
"verified" : {
"type" : "boolean"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment