From b95b9ae7cc370b02c436657693bcfde559e8d16f Mon Sep 17 00:00:00 2001 From: Francesco Poldi Date: Sat, 19 Oct 2019 12:01:56 +0200 Subject: [PATCH] Added analyzer for username, cashtag and mention --- twint/__version__.py | 2 +- twint/storage/elasticsearch.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/twint/__version__.py b/twint/__version__.py index 718872b5..8737e392 100644 --- a/twint/__version__.py +++ b/twint/__version__.py @@ -1,3 +1,3 @@ -VERSION = (2, 1, 4) +VERSION = (2, 1, 5) __version__ = '.'.join(map(str, VERSION)) diff --git a/twint/storage/elasticsearch.py b/twint/storage/elasticsearch.py index 7d694823..c26006b1 100644 --- a/twint/storage/elasticsearch.py +++ b/twint/storage/elasticsearch.py @@ -65,9 +65,9 @@ def createIndex(config, instance, **scope): "location": {"type": "keyword"}, "tweet": {"type": "text"}, "hashtags": {"type": "keyword", "normalizer": "hashtag_normalizer"}, - "cashtags": {"type": "keyword"}, + "cashtags": {"type": "keyword", "normalizer": "hashtag_normalizer"}, "user_id_str": {"type": "keyword"}, - "username": {"type": "keyword"}, + "username": {"type": "keyword", "normalizer": "hashtag_normalizer"}, "name": {"type": "text"}, "profile_image_url": {"type": "text"}, "day": {"type": "integer"}, @@ -86,7 +86,7 @@ def createIndex(config, instance, **scope): "geo_tweet": {"type": "geo_point"}, "photos": {"type": "text"}, "user_rt_id": {"type": "keyword"}, - "mentions": {"type": "keyword"}, + "mentions": {"type": "keyword", "normalizer": "hashtag_normalizer"}, "source": {"type": "keyword"}, "user_rt": {"type": "keyword"}, "retweet_id": {"type": "keyword"},