Commit b8f21bc3 authored by Francesco Poldi's avatar Francesco Poldi

Added mentions to Elastic #361

parent 48f108c8
......@@ -31,7 +31,8 @@ PUT twinttweets
"near": {"type": "text"},
"geo_near": {"type": "geo_point"},
"geo_tweet": {"type": "geo_point"},
"photos": {"type": "text"}
"photos": {"type": "text"},
"mentions": {"type": "text"}
}
}
}
......
......@@ -232,6 +232,11 @@ def Tweet(Tweet, config):
for photo in Tweet.photos:
_photos.append(photo)
j_data["_source"].update({"photos": _photos})
if Tweet.mentions:
_mentions = []
for mention in Tweet.mentions:
_mentions.append(mention)
j_data["_source"].update({"mentions": _mentions})
if config.Near or config.Geo:
if not _is_near_def:
__geo = ""
......
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