Skip to content

Instantly share code, notes, and snippets.

@drewr
Created April 8, 2014 15:32
Show Gist options
  • Save drewr/10143635 to your computer and use it in GitHub Desktop.
Save drewr/10143635 to your computer and use it in GitHub Desktop.
Sample twitter settings
{
"twitter": {
"mappings": {
"status": {
"_all": {
"enabled": false
},
"_size": {
"enabled": true,
"store": true
},
"dynamic_date_formats": [
"EEE MMM dd HH:mm:ss Z yyyy",
"date_time",
"date_optional_time"
],
"properties": {
"coordinates": {
"properties": {
"coordinates": {
"type": "geo_point"
},
"type": {
"type": "string"
}
}
},
"created_at": {
"format": "EEE MMM dd HH:mm:ss Z yyyy",
"locale": "en_EN",
"type": "date"
},
"entities": {
"properties": {
"hashtags": {
"properties": {
"indices": {
"type": "long"
},
"text": {
"index": "not_analyzed",
"type": "string"
}
}
},
"media": {
"properties": {
"display_url": {
"type": "string"
},
"expanded_url": {
"type": "string"
},
"id": {
"type": "long"
},
"id_str": {
"type": "string"
},
"indices": {
"type": "long"
},
"media_url": {
"type": "string"
},
"media_url_https": {
"type": "string"
},
"sizes": {
"properties": {
"large": {
"properties": {
"h": {
"type": "long"
},
"resize": {
"type": "string"
},
"w": {
"type": "long"
}
}
},
"medium": {
"properties": {
"h": {
"type": "long"
},
"resize": {
"type": "string"
},
"w": {
"type": "long"
}
}
},
"small": {
"properties": {
"h": {
"type": "long"
},
"resize": {
"type": "string"
},
"w": {
"type": "long"
}
}
},
"thumb": {
"properties": {
"h": {
"type": "long"
},
"resize": {
"type": "string"
},
"w": {
"type": "long"
}
}
}
}
},
"source_status_id": {
"type": "long"
},
"source_status_id_str": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"symbols": {
"properties": {
"indices": {
"type": "long"
},
"text": {
"type": "string"
}
}
},
"urls": {
"properties": {
"display_url": {
"type": "string"
},
"expanded_url": {
"type": "string"
},
"indices": {
"type": "long"
},
"url": {
"type": "string"
}
}
},
"user_mentions": {
"properties": {
"id": {
"type": "long"
},
"id_str": {
"type": "string"
},
"indices": {
"type": "long"
},
"name": {
"type": "string"
},
"screen_name": {
"type": "string"
}
}
}
}
},
"favorite_count": {
"type": "long"
},
"favorited": {
"type": "boolean"
},
"filter_level": {
"type": "string"
},
"geo": {
"properties": {
"coordinates": {
"type": "double"
},
"type": {
"type": "string"
}
}
},
"id_str": {
"type": "string"
},
"in_reply_to_screen_name": {
"type": "string"
},
"in_reply_to_status_id": {
"type": "long"
},
"in_reply_to_status_id_str": {
"type": "string"
},
"in_reply_to_user_id": {
"type": "long"
},
"in_reply_to_user_id_str": {
"type": "string"
},
"lang": {
"type": "string"
},
"place": {
"dynamic": "true",
"properties": {
"attributes": {
"dynamic": "true",
"properties": {
"street_address": {
"type": "string"
}
}
},
"bounding_box": {
"type": "geo_shape"
},
"country": {
"fields": {
"keyword": {
"index": "not_analyzed",
"type": "string"
}
},
"type": "string"
},
"country_code": {
"fields": {
"keyword": {
"index": "not_analyzed",
"type": "string"
}
},
"type": "string"
},
"full_name": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"place_type": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"possibly_sensitive": {
"type": "boolean"
},
"retweet_count": {
"type": "long"
},
"retweeted": {
"type": "boolean"
},
"retweeted_status": {
"properties": {
"coordinates": {
"properties": {
"coordinates": {
"type": "double"
},
"type": {
"type": "string"
}
}
},
"created_at": {
"format": "EEE MMM dd HH:mm:ss Z yyyy",
"locale": "en_EN",
"type": "date"
},
"entities": {
"properties": {
"hashtags": {
"properties": {
"indices": {
"type": "long"
},
"text": {
"type": "string"
}
}
},
"media": {
"properties": {
"display_url": {
"type": "string"
},
"expanded_url": {
"type": "string"
},
"id": {
"type": "long"
},
"id_str": {
"type": "string"
},
"indices": {
"type": "long"
},
"media_url": {
"type": "string"
},
"media_url_https": {
"type": "string"
},
"sizes": {
"properties": {
"large": {
"properties": {
"h": {
"type": "long"
},
"resize": {
"type": "string"
},
"w": {
"type": "long"
}
}
},
"medium": {
"properties": {
"h": {
"type": "long"
},
"resize": {
"type": "string"
},
"w": {
"type": "long"
}
}
},
"small": {
"properties": {
"h": {
"type": "long"
},
"resize": {
"type": "string"
},
"w": {
"type": "long"
}
}
},
"thumb": {
"properties": {
"h": {
"type": "long"
},
"resize": {
"type": "string"
},
"w": {
"type": "long"
}
}
}
}
},
"source_status_id": {
"type": "long"
},
"source_status_id_str": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"symbols": {
"properties": {
"indices": {
"type": "long"
},
"text": {
"type": "string"
}
}
},
"urls": {
"properties": {
"display_url": {
"type": "string"
},
"expanded_url": {
"type": "string"
},
"indices": {
"type": "long"
},
"url": {
"type": "string"
}
}
},
"user_mentions": {
"properties": {
"id": {
"type": "long"
},
"id_str": {
"type": "string"
},
"indices": {
"type": "long"
},
"name": {
"type": "string"
},
"screen_name": {
"type": "string"
}
}
}
}
},
"favorite_count": {
"type": "long"
},
"favorited": {
"type": "boolean"
},
"geo": {
"properties": {
"coordinates": {
"type": "double"
},
"type": {
"type": "string"
}
}
},
"id": {
"type": "long"
},
"id_str": {
"type": "string"
},
"in_reply_to_screen_name": {
"type": "string"
},
"in_reply_to_status_id": {
"type": "long"
},
"in_reply_to_status_id_str": {
"type": "string"
},
"in_reply_to_user_id": {
"type": "long"
},
"in_reply_to_user_id_str": {
"type": "string"
},
"lang": {
"type": "string"
},
"place": {
"properties": {
"attributes": {
"properties": {
"street_address": {
"type": "string"
}
}
},
"bounding_box": {
"properties": {
"coordinates": {
"type": "double"
},
"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"
},
"retweet_count": {
"type": "long"
},
"retweeted": {
"type": "boolean"
},
"scopes": {
"properties": {
"followers": {
"type": "boolean"
},
"place_ids": {
"type": "string"
}
}
},
"source": {
"type": "string"
},
"text": {
"type": "string"
},
"truncated": {
"type": "boolean"
},
"user": {
"properties": {
"contributors_enabled": {
"type": "boolean"
},
"created_at": {
"format": "EEE MMM dd HH:mm:ss Z yyyy",
"locale": "en_EN",
"type": "date"
},
"default_profile": {
"type": "boolean"
},
"default_profile_image": {
"type": "boolean"
},
"description": {
"type": "string"
},
"favourites_count": {
"type": "long"
},
"followers_count": {
"type": "long"
},
"friends_count": {
"type": "long"
},
"geo_enabled": {
"type": "boolean"
},
"id": {
"type": "long"
},
"id_str": {
"type": "string"
},
"is_translation_enabled": {
"type": "boolean"
},
"is_translator": {
"type": "boolean"
},
"lang": {
"type": "string"
},
"listed_count": {
"type": "long"
},
"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"
},
"time_zone": {
"type": "string"
},
"url": {
"type": "string"
},
"utc_offset": {
"type": "long"
},
"verified": {
"type": "boolean"
}
}
}
}
},
"source": {
"type": "string"
},
"text": {
"type": "string"
},
"truncated": {
"type": "boolean"
},
"user": {
"properties": {
"contributors_enabled": {
"type": "boolean"
},
"created_at": {
"format": "EEE MMM dd HH:mm:ss Z yyyy",
"locale": "en_EN",
"type": "date"
},
"default_profile": {
"type": "boolean"
},
"default_profile_image": {
"type": "boolean"
},
"description": {
"type": "string"
},
"favourites_count": {
"type": "long"
},
"followers_count": {
"type": "long"
},
"friends_count": {
"type": "long"
},
"geo_enabled": {
"type": "boolean"
},
"id": {
"type": "long"
},
"id_str": {
"type": "string"
},
"is_translation_enabled": {
"type": "boolean"
},
"is_translator": {
"type": "boolean"
},
"lang": {
"type": "string"
},
"listed_count": {
"type": "long"
},
"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"
},
"time_zone": {
"type": "string"
},
"url": {
"type": "string"
},
"utc_offset": {
"type": "long"
},
"verified": {
"type": "boolean"
}
}
}
}
}
}
}
}
{
"twitter": {
"settings": {
"index": {
"analysis": {
"analyzer": {
"fulltext_analyzer": {
"filter": [
"lowercase",
"bigram"
],
"tokenizer": "whitespace",
"type": "custom"
}
},
"filter": {
"bigram": {
"max_shingle_size": "2",
"min_shingle_size": "2",
"output_unigrams": "true",
"output_unigrams_if_no_shingles": "true",
"token_separator": " ",
"type": "shingle"
}
}
},
"number_of_replicas": "0",
"number_of_shards": "4",
"query": {
"default_field": "text"
},
"refresh_interval": "5s",
"uuid": "JBW7908KSK2mR-WCyZaSdQ",
"version": {
"created": "1010099"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment