Commit 4d0bd98a authored by Francesco Poldi's avatar Francesco Poldi

Fixed index creation for Elasticsearch 7.0.0

#397
parent 5f7d7273
......@@ -55,7 +55,6 @@ def createIndex(config, instance, **scope):
if scope.get("scope") == "tweet":
tweets_body = {
"mappings": {
config.Index_type: {
"properties": {
"id": {"type": "long"},
"conversation_id": {"type": "long"},
......@@ -87,7 +86,6 @@ def createIndex(config, instance, **scope):
"geo_tweet": {"type": "geo_point"},
"photos": {"type": "text"}
}
}
},
"settings": {
"number_of_shards": 1
......@@ -99,13 +97,11 @@ def createIndex(config, instance, **scope):
elif scope.get("scope") == "follow":
follow_body = {
"mappings": {
config.Index_type: {
"properties": {
"user": {"type": "keyword"},
"follow": {"type": "keyword"},
"essid": {"type": "keyword"}
}
}
},
"settings": {
"number_of_shards": 1
......@@ -117,7 +113,6 @@ def createIndex(config, instance, **scope):
elif scope.get("scope") == "user":
user_body = {
"mappings": {
config.Index_type: {
"properties": {
"id": {"type": "keyword"},
"name": {"type": "keyword"},
......@@ -140,7 +135,6 @@ def createIndex(config, instance, **scope):
"session": {"type": "keyword"},
"geo_user": {"type": "geo_point"}
}
}
},
"settings": {
"number_of_shards": 1
......@@ -196,7 +190,6 @@ def Tweet(Tweet, config):
j_data = {
"_index": config.Index_tweets,
"_type": config.Index_type,
"_id": str(Tweet.id) + "_raw_" + config.Essid,
"_source": {
"id": str(Tweet.id),
......@@ -273,7 +266,6 @@ def Follow(user, config):
_follow = config.Username
j_data = {
"_index": config.Index_follow,
"_type": config.Index_type,
"_id": _user + "_" + _follow + "_" + config.Essid,
"_source": {
"user": _user,
......@@ -297,7 +289,6 @@ def UserProfile(user, config):
j_data = {
"_index": config.Index_users,
"_type": config.Index_type,
"_id": user.id + "_" + user.join_date + "_" + user.join_time + "_" + config.Essid,
"_source": {
"id": user.id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment