├── .gitignore ├── README.md └── twitter-elasticsearch-mapping /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | *.egg-info/ 23 | .installed.cfg 24 | *.egg 25 | 26 | # PyInstaller 27 | # Usually these files are written by a python script from a template 28 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 29 | *.manifest 30 | *.spec 31 | 32 | # Installer logs 33 | pip-log.txt 34 | pip-delete-this-directory.txt 35 | 36 | # Unit test / coverage reports 37 | htmlcov/ 38 | .tox/ 39 | .coverage 40 | .coverage.* 41 | .cache 42 | nosetests.xml 43 | coverage.xml 44 | *,cover 45 | 46 | # Translations 47 | *.mo 48 | *.pot 49 | 50 | # Django stuff: 51 | *.log 52 | 53 | # Sphinx documentation 54 | docs/_build/ 55 | 56 | # PyBuilder 57 | target/ 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # some-elasticsearch-mappings 2 | ElasticSearch mappings and tools for Twitter and other social media data 3 | -------------------------------------------------------------------------------- /twitter-elasticsearch-mapping: -------------------------------------------------------------------------------- 1 | { 2 | "tweets": { 3 | "properties": { 4 | "coordinates": { 5 | "type": "geo_shape" 6 | }, 7 | "created_at": { 8 | "format": "EEE MMM dd HH:mm:ss Z YYYY", 9 | "type": "date" 10 | }, 11 | "entities": { 12 | "properties": { 13 | "hashtags": { 14 | "properties": { 15 | "indices": { 16 | "type": "long" 17 | }, 18 | "text": { 19 | "type": "string" 20 | } 21 | } 22 | }, 23 | "urls": { 24 | "properties": { 25 | "display_url": { 26 | "type": "string" 27 | }, 28 | "expanded_url": { 29 | "index": "not_analyzed", 30 | "type": "string" 31 | }, 32 | "indices": { 33 | "type": "long" 34 | }, 35 | "url": { 36 | "type": "string" 37 | } 38 | } 39 | } 40 | } 41 | }, 42 | "favorite_count": { 43 | "type": "long" 44 | }, 45 | "favorited": { 46 | "type": "boolean" 47 | }, 48 | "filter_level": { 49 | "type": "string" 50 | }, 51 | "geo": { 52 | "type": "geo_shape" 53 | }, 54 | "id": { 55 | "type": "long" 56 | }, 57 | "id_str": { 58 | "type": "string" 59 | }, 60 | "lang": { 61 | "type": "string" 62 | }, 63 | "place": { 64 | "properties": { 65 | "attributes": { 66 | "type": "object" 67 | }, 68 | "bounding_box": { 69 | "transform": { 70 | "script": "ctx._source['coordinates'].add(ctx._source['coordinates'][0])" 71 | }, 72 | "type": "geo_shape" 73 | }, 74 | "country": { 75 | "index": "not_analyzed", 76 | "type": "string" 77 | }, 78 | "country_code": { 79 | "type": "string" 80 | }, 81 | "full_name": { 82 | "index": "not_analyzed", 83 | "type": "string" 84 | }, 85 | "id": { 86 | "type": "string" 87 | }, 88 | "name": { 89 | "index": "not_analyzed", 90 | "type": "string" 91 | }, 92 | "place_type": { 93 | "type": "string" 94 | }, 95 | "url": { 96 | "type": "string" 97 | } 98 | } 99 | }, 100 | "possibly_sensitive": { 101 | "type": "boolean" 102 | }, 103 | "retweet_count": { 104 | "type": "long" 105 | }, 106 | "retweeted": { 107 | "type": "boolean" 108 | }, 109 | "source": { 110 | "index": "not_analyzed", 111 | "type": "string" 112 | }, 113 | "text": { 114 | "type": "string" 115 | }, 116 | "timestamp_ms": { 117 | "type": "date" 118 | }, 119 | "truncated": { 120 | "type": "boolean" 121 | }, 122 | "user": { 123 | "properties": { 124 | "contributors_enabled": { 125 | "type": "boolean" 126 | }, 127 | "created_at": { 128 | "format": "EEE MMM dd HH:mm:ss Z YYYY", 129 | "type": "date" 130 | }, 131 | "default_profile": { 132 | "type": "boolean" 133 | }, 134 | "default_profile_image": { 135 | "type": "boolean" 136 | }, 137 | "description": { 138 | "type": "string" 139 | }, 140 | "favourites_count": { 141 | "type": "long" 142 | }, 143 | "followers_count": { 144 | "type": "long" 145 | }, 146 | "friends_count": { 147 | "type": "long" 148 | }, 149 | "geo_enabled": { 150 | "type": "boolean" 151 | }, 152 | "id": { 153 | "type": "long" 154 | }, 155 | "id_str": { 156 | "type": "string" 157 | }, 158 | "is_translator": { 159 | "type": "boolean" 160 | }, 161 | "lang": { 162 | "type": "string" 163 | }, 164 | "listed_count": { 165 | "type": "long" 166 | }, 167 | "location": { 168 | "index": "not_analyzed", 169 | "type": "string" 170 | }, 171 | "name": { 172 | "index": "not_analyzed", 173 | "type": "string" 174 | }, 175 | "profile_background_color": { 176 | "type": "string" 177 | }, 178 | "profile_background_image_url": { 179 | "type": "string" 180 | }, 181 | "profile_background_image_url_https": { 182 | "type": "string" 183 | }, 184 | "profile_background_tile": { 185 | "type": "boolean" 186 | }, 187 | "profile_banner_url": { 188 | "type": "string" 189 | }, 190 | "profile_image_url": { 191 | "type": "string" 192 | }, 193 | "profile_image_url_https": { 194 | "type": "string" 195 | }, 196 | "profile_link_color": { 197 | "type": "string" 198 | }, 199 | "profile_sidebar_border_color": { 200 | "type": "string" 201 | }, 202 | "profile_sidebar_fill_color": { 203 | "type": "string" 204 | }, 205 | "profile_text_color": { 206 | "type": "string" 207 | }, 208 | "profile_use_background_image": { 209 | "type": "boolean" 210 | }, 211 | "protected": { 212 | "type": "boolean" 213 | }, 214 | "screen_name": { 215 | "type": "string" 216 | }, 217 | "statuses_count": { 218 | "type": "long" 219 | }, 220 | "time_zone": { 221 | "type": "string" 222 | }, 223 | "url": { 224 | "type": "string" 225 | }, 226 | "utc_offset": { 227 | "type": "long" 228 | }, 229 | "verified": { 230 | "type": "boolean" 231 | } 232 | } 233 | } 234 | } 235 | } 236 | } 237 | --------------------------------------------------------------------------------