Commit e3345426 authored by Iván H's avatar Iván H Committed by GitHub

: (#753)

parent f0784ad2
...@@ -96,7 +96,7 @@ def init(db): ...@@ -96,7 +96,7 @@ def init(db):
username text not null, username text not null,
tweet_id integer not null, tweet_id integer not null,
retweet_id integer not null, retweet_id integer not null,
retweet_date integer not null, retweet_date integer,
CONSTRAINT retweets_pk PRIMARY KEY(user_id, tweet_id), CONSTRAINT retweets_pk PRIMARY KEY(user_id, tweet_id),
CONSTRAINT user_id_fk FOREIGN KEY(user_id) REFERENCES users(id), CONSTRAINT user_id_fk FOREIGN KEY(user_id) REFERENCES users(id),
CONSTRAINT tweet_id_fk FOREIGN KEY(tweet_id) REFERENCES tweets(id) CONSTRAINT tweet_id_fk FOREIGN KEY(tweet_id) REFERENCES tweets(id)
......
...@@ -97,7 +97,7 @@ def createIndex(config, instance, **scope): ...@@ -97,7 +97,7 @@ def createIndex(config, instance, **scope):
"username": {"type": "keyword"} "username": {"type": "keyword"}
} }
}, },
"retweet_date": {"type": "date", "format": "yyyy-MM-dd HH:mm:ss"}, "retweet_date": {"type": "date", "format": "yyyy-MM-dd HH:mm:ss", "ignore_malformed": True},
"urls": {"type": "keyword"}, "urls": {"type": "keyword"},
"translate": {"type": "text"}, "translate": {"type": "text"},
"trans_src": {"type": "keyword"}, "trans_src": {"type": "keyword"},
......
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