From 3c1c9fcb8cbb1466cc8d189e41b841eac19184d3 Mon Sep 17 00:00:00 2001 From: Kim Mennemann <2011879@stud.hs-mannheim.de> Date: Sat, 29 Jun 2024 12:01:14 +0200 Subject: [PATCH] README.md aktualisiert --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 02b4dde..b301737 100644 --- a/README.md +++ b/README.md @@ -87,9 +87,10 @@ print("100 accounts that follow the most of the accounts found in 2)",followed_t * 4.4 Caching der Posts für die Startseite (vgl. 4), erfordert einen sog. Fan-Out in den Cache jedes Followers beim Schreiben eines neuen Posts CREATE MATERIALIZED VIEW twitter.start_view_user1 AS - SELECT follower_id,number_of_likes,date_time,author,name,content,id FROM twitter.user - WHERE user_id_x IS NOT NULL AND user_id_x=172883064 AND follower_id IS NOT NULL AND number_of_likes IS NOT NULL AND id IS NOT NULL - PRIMARY KEY ((user_id_x),number_of_likes,follower_id,id); + SELECT follower_id,number_of_likes,date_time,author,name,content,id FROM twitter.user + WHERE user_id_x IS NOT NULL AND user_id_x=172883064 AND follower_id IS NOT NULL AND number_of_likes IS NOT NULL AND id IS NOT NULL + PRIMARY KEY ((user_id_x),number_of_likes,follower_id,id); + // # order by need partion key in WHERE SELECT * from twitter.start_view_taylor WHERE user_id_x=172883064 ORDER BY number_of_likes DESC LIMIT 25; // INSERT new tweet @@ -108,8 +109,8 @@ print("100 accounts that follow the most of the accounts found in 2)",followed_t * 4.5 Auflisten der 25 beliebtesten Posts, die ein geg. Wort enthalten (falls möglich auch mit UND-Verknüpfung mehrerer Worte) CREATE CUSTOM INDEX search_in ON twitter.tweets (content) USING 'org.apache.cassandra.index.sasi.SASIIndex' - WITH OPTIONS = { 'mode': 'CONTAINS', 'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', - 'case_sensitive': 'false' }; + WITH OPTIONS = { 'mode': 'CONTAINS', 'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', + 'case_sensitive': 'false' }; SELECT * from twitter.tweets WHERE content LIKE '%world%' limit 25; ![result_ex4_2](img/ex6.png)