Twitter mapping on Elasticsearch index

Create new mapping for Time in ES index of tweets:

curl -XPUT "http://localhost:9200/twitter_new3" -H 'Content-Type: application/json' -d'
{
 "index.mapping.total_fields.limit": 2000,
 "mappings" : {
 "tweet" : {
 "dynamic" : "false",
 "_all" : {
 "enabled" : false
 },
 "properties" : {
 "postDate" : {
 "type" : "date"
 },
 "geoip" : {
 "properties" : {
 "city_name" : {
 "type" : "keyword"
 },
 "latitude" : {
 "type" : "double"
 },
 "location" : {
 "type" : "geo_point"
 },
 "longitude" : {
 "type" : "double"
 }
 }
 }
 }
 }
 }
}'

 

Leave a Reply

Your email address will not be published. Required fields are marked *