genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | |
| 3 | <html> |
| 4 | <head> |
| 5 | <title>AsterixDB TinySocial Demo</title> |
| 6 | |
| 7 | <style> |
| 8 | .pretty-printed { |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 9 | background-color: #eeeeee; |
| 10 | margin-bottom: 1em; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 11 | } |
| 12 | |
| 13 | .how-to-run { |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 14 | background-color: #c8c8c8; |
| 15 | margin-bottom: 1em; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 16 | } |
| 17 | |
| 18 | .result-output { |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 19 | background-color: #BED8E5; |
| 20 | margin-bottom: 1em; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | body { |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 24 | font-family : "Helvetica"; |
| 25 | margin-bottom: 1em; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 26 | } |
| 27 | </style> |
| 28 | |
| 29 | <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> |
| 30 | <script src="../js/asterix-sdk-stable.js"></script> |
| 31 | <script src="js/demo.js"></script> |
| 32 | </head> |
| 33 | <body> |
| 34 | <h1>AQL: Querying TinySocial AsterixDB</h1> |
| 35 | |
| 36 | <h2>Query 0-A - Exact-Match Lookup</h2> |
| 37 | <div class="sample-query"> |
| 38 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 39 | <div class="pretty-printed"><pre> |
| 40 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 41 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 42 | for $user in dataset FacebookUsers |
| 43 | where $user.id = 8 |
| 44 | return $user; |
| 45 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 46 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 47 | <div class="how-to-run"><pre><code class="javascript"> |
| 48 | var expression0a = new FLWOGRExpression({ |
| 49 | "dataverse" : "TinySocial", |
| 50 | "success" : function(res) { |
| 51 | $('#result0a').html(res["results"]); |
| 52 | } |
| 53 | }) |
| 54 | .bind( new ForClause("user", null, new AsterixExpression().set(["dataset FacebookUsers"])) ) |
| 55 | .bind( new WhereClause(new BooleanExpression("$user.id = 8"))); |
| 56 | </code></pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 57 | |
genia.likes.science@gmail.com | 3861263 | 2013-05-28 13:11:52 -0700 | [diff] [blame] | 58 | <div class="result-output" id="result0a"> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 59 | </div> |
| 60 | |
| 61 | <button id="run0a">Run #0-A</button> |
| 62 | </div> |
| 63 | <hr/> |
| 64 | <h2>Query 0-B - Range Scan</h2> |
| 65 | <div class="sample-query"> |
| 66 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 67 | <div class="pretty-printed"><pre> |
| 68 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 69 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 70 | for $user in dataset FacebookUsers |
| 71 | where $user.id >= 2 and $user.id <= 4 |
| 72 | return $user; |
| 73 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 74 | |
genia.likes.science@gmail.com | 5ca104c | 2013-05-29 05:39:26 -0700 | [diff] [blame] | 75 | <div class="how-to-run"><pre> |
| 76 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 77 | |
genia.likes.science@gmail.com | 3861263 | 2013-05-28 13:11:52 -0700 | [diff] [blame] | 78 | <div class="result-output" id="result0b"> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 79 | </div> |
| 80 | |
| 81 | <button id="run0b">Run #0-B</button> |
| 82 | </div> |
| 83 | <hr/> |
| 84 | |
| 85 | <h2>Query 1 - Other Query Filters</h2> |
| 86 | <div class="sample-query"> |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 87 | <div class="pretty-printed"><pre> |
| 88 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 89 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 90 | for $user in dataset FacebookUsers |
| 91 | where $user.user-since >= datetime('2010-07-22T00:00:00') |
| 92 | and $user.user-since <= datetime('2012-07-29T23:59:59') |
| 93 | return $user; |
| 94 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 95 | |
| 96 | <div class="how-to-run"> |
| 97 | </div> |
| 98 | |
| 99 | <div class="result-output" id="result1"> |
| 100 | </div> |
| 101 | |
| 102 | <button id="run1">Run #1</button> |
| 103 | </div> |
| 104 | <hr/> |
| 105 | |
| 106 | <h2>Query 2-A - Equijoin</h2> |
| 107 | <div class="sample-query"> |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 108 | <div class="pretty-printed"><pre> |
| 109 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 110 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 111 | for $user in dataset FacebookUsers |
| 112 | for $message in dataset FacebookMessages |
| 113 | where $message.author-id = $user.id |
| 114 | return { |
| 115 | "uname": $user.name, |
| 116 | "message": $message.message |
| 117 | }; |
| 118 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 119 | |
| 120 | <div class="how-to-run"> |
| 121 | </div> |
| 122 | |
| 123 | <div class="result-output" id="result2a"> |
| 124 | </div> |
| 125 | |
| 126 | <button id="run2a">Run #2-A</button> |
| 127 | </div> |
| 128 | <hr/> |
| 129 | |
| 130 | <h2>Query 2-B - Index join</h2> |
| 131 | <div class="sample-query"> |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 132 | <div class="pretty-printed"><pre> |
| 133 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 134 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 135 | for $user in dataset FacebookUsers |
| 136 | for $message in dataset FacebookMessages |
| 137 | where $message.author-id /*+ indexnl */ = $user.id |
| 138 | return { |
| 139 | "uname": $user.name, |
| 140 | "message": $message.message |
| 141 | }; |
| 142 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 143 | |
| 144 | <div class="how-to-run"> |
| 145 | </div> |
| 146 | |
| 147 | <div class="result-output" id="result2b"> |
| 148 | </div> |
| 149 | |
| 150 | <button id="run2b">Run #2-B</button> |
| 151 | </div> |
| 152 | <hr/> |
| 153 | |
| 154 | <h2>Query 3 - Nested Outer Join</h2> |
| 155 | <div class="sample-query"> |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 156 | <div class="pretty-printed"><pre> |
| 157 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 158 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 159 | for $user in dataset FacebookUsers |
| 160 | return { |
| 161 | "uname": $user.name, |
| 162 | "messages": for $message in dataset FacebookMessages |
| 163 | where $message.author-id = $user.id |
| 164 | return $message.message |
| 165 | }; |
| 166 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 167 | |
| 168 | <div class="how-to-run"> |
| 169 | </div> |
| 170 | |
| 171 | <div class="result-output" id="result3"> |
| 172 | </div> |
| 173 | |
| 174 | <button id="run3">Run #3</button> |
| 175 | </div> |
| 176 | <hr/> |
| 177 | |
| 178 | <h2>Query 4 - Theta Join</h2> |
| 179 | <div class="sample-query"> |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 180 | <div class="pretty-printed"><pre> |
| 181 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 182 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 183 | for $t in dataset TweetMessages |
| 184 | return { |
| 185 | "message": $t.message-text, |
| 186 | "nearby-messages": for $t2 in dataset TweetMessages |
| 187 | where spatial-distance($t.sender-location, $t2.sender-location) <= 1 |
| 188 | return { "msgtxt":$t2.message-text} |
| 189 | }; |
| 190 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 191 | |
| 192 | <div class="how-to-run"> |
| 193 | </div> |
| 194 | |
| 195 | <div class="result-output" id="result4"> |
| 196 | </div> |
| 197 | |
| 198 | <button id="run4">Run #4</button> |
| 199 | </div> |
| 200 | <hr/> |
| 201 | |
| 202 | <h2>Query 5 - Fuzzy Join</h2> |
| 203 | <div class="sample-query"> |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 204 | <div class="pretty-printed"><pre> |
| 205 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 206 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 207 | set simfunction "edit-distance"; |
| 208 | set simthreshold "3"; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 209 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 210 | for $fbu in dataset FacebookUsers |
| 211 | return { |
| 212 | "id": $fbu.id, |
| 213 | "name": $fbu.name, |
| 214 | "similar-users": for $t in dataset TweetMessages |
| 215 | let $tu := $t.user |
| 216 | where $tu.name ~= $fbu.name |
| 217 | return { |
| 218 | "twitter-screenname": $tu.screen-name, |
| 219 | "twitter-name": $tu.name |
| 220 | } |
| 221 | }; |
| 222 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 223 | |
| 224 | <div class="how-to-run"> |
| 225 | </div> |
| 226 | |
| 227 | <div class="result-output" id="result5"> |
| 228 | </div> |
| 229 | |
| 230 | <button id="run5">Run #5</button> |
| 231 | </div> |
| 232 | <hr/> |
| 233 | |
| 234 | <h2>Query 6 - Existential Quantification</h2> |
| 235 | <div class="sample-query"> |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 236 | <div class="pretty-printed"><pre> |
| 237 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 238 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 239 | for $fbu in dataset FacebookUsers |
| 240 | where (some $e in $fbu.employment satisfies is-null($e.end-date)) |
| 241 | return $fbu; |
| 242 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 243 | |
| 244 | <div class="how-to-run"> |
| 245 | </div> |
| 246 | |
| 247 | <div class="result-output" id="result6"> |
| 248 | </div> |
| 249 | |
| 250 | <button id="run6">Run #6</button> |
| 251 | </div> |
| 252 | <hr/> |
| 253 | |
| 254 | <h2>Query 7 - Universal Quantification</h2> |
| 255 | <div class="sample-query"> |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 256 | <div class="pretty-printed"><pre><pre> |
| 257 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 258 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 259 | for $fbu in dataset FacebookUsers |
| 260 | where (every $e in $fbu.employment satisfies not(is-null($e.end-date))) |
| 261 | return $fbu; |
| 262 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 263 | |
| 264 | <div class="how-to-run"> |
| 265 | </div> |
| 266 | |
| 267 | <div class="result-output" id="result7"> |
| 268 | </div> |
| 269 | |
| 270 | <button id="run7">Run #7</button> |
| 271 | </div> |
| 272 | <hr/> |
| 273 | |
| 274 | <h2>Query 8 - Simple Aggregation</h2> |
| 275 | <div class="sample-query"> |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 276 | <div class="pretty-printed"><pre> |
| 277 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 278 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 279 | count(for $fbu in dataset FacebookUsers return $fbu); |
| 280 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 281 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 282 | <div class="how-to-run"><pre><code class="javascript"> |
genia.likes.science@gmail.com | 18f3bf2 | 2013-06-12 07:45:02 -0700 | [diff] [blame] | 283 | var expression8 = new FunctionExpression( |
| 284 | "count", |
| 285 | new ForClause("fbu", null, new AQLClause().set("dataset FacebookUsers")) |
genia.likes.science@gmail.com | 5749ef9 | 2013-06-12 07:59:25 -0700 | [diff] [blame^] | 286 | .bind(new ReturnClause("$fbu")) |
genia.likes.science@gmail.com | 18f3bf2 | 2013-06-12 07:45:02 -0700 | [diff] [blame] | 287 | ); |
| 288 | |
| 289 | OR |
| 290 | |
| 291 | var expression8 = new FunctionExpression() |
| 292 | .fn("count") |
| 293 | .expression( |
| 294 | new ForClause("fbu", null, new AQLClause().set("dataset FacebookUsers")) |
genia.likes.science@gmail.com | 5749ef9 | 2013-06-12 07:59:25 -0700 | [diff] [blame^] | 295 | .bind(new ReturnClause("$fbu")) |
genia.likes.science@gmail.com | 18f3bf2 | 2013-06-12 07:45:02 -0700 | [diff] [blame] | 296 | ); |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 297 | </code></pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 298 | |
| 299 | <div class="result-output" id="result8"> |
| 300 | </div> |
| 301 | |
| 302 | <button id="run8">Run #8</button> |
| 303 | </div> |
| 304 | <hr/> |
| 305 | |
| 306 | <h2>Query 9-A - Grouping and Aggregation</h2> |
| 307 | <div class="sample-query"> |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 308 | <div class="pretty-printed"><pre> |
| 309 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 310 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 311 | for $t in dataset TweetMessages |
| 312 | group by $uid := $t.user.screen-name with $t |
| 313 | return { |
| 314 | "user": $uid, |
| 315 | "count": count($t) |
| 316 | }; |
| 317 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 318 | |
| 319 | <div class="how-to-run"> |
| 320 | </div> |
| 321 | |
genia.likes.science@gmail.com | fba7cc8 | 2013-05-31 04:04:08 -0700 | [diff] [blame] | 322 | <div class="result-output" id="result9a"> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 323 | </div> |
| 324 | |
| 325 | <button id="run9a">Run #9-A</button> |
| 326 | </div> |
| 327 | <hr/> |
| 328 | |
| 329 | <h2>Query 9-B - (Hash-Based) Grouping and Aggregation</h2> |
| 330 | <div class="sample-query"> |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 331 | <div class="pretty-printed"><pre> |
| 332 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 333 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 334 | for $t in dataset TweetMessages |
| 335 | /*+ hash*/ |
| 336 | group by $uid := $t.user.screen-name with $t |
| 337 | return { |
| 338 | "user": $uid, |
| 339 | "count": count($t) |
| 340 | }; |
| 341 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 342 | |
| 343 | <div class="how-to-run"> |
| 344 | </div> |
| 345 | |
genia.likes.science@gmail.com | fba7cc8 | 2013-05-31 04:04:08 -0700 | [diff] [blame] | 346 | <div class="result-output" id="result9b"> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 347 | </div> |
| 348 | |
| 349 | <button id="run9b">Run #9-B</button> |
| 350 | </div> |
| 351 | <hr/> |
| 352 | |
| 353 | <h2>Query 10 - Grouping and Limits</h2> |
| 354 | <div class="sample-query"> |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 355 | <div class="pretty-printed"><pre> |
| 356 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 357 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 358 | for $t in dataset TweetMessages |
| 359 | group by $uid := $t.user.screen-name with $t |
| 360 | let $c := count($t) |
| 361 | order by $c desc |
| 362 | limit 3 |
| 363 | return { |
| 364 | "user": $uid, |
| 365 | "count": $c |
| 366 | }; |
| 367 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 368 | |
| 369 | <div class="how-to-run"> |
| 370 | </div> |
| 371 | |
genia.likes.science@gmail.com | fba7cc8 | 2013-05-31 04:04:08 -0700 | [diff] [blame] | 372 | <div class="result-output" id="result10"> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 373 | </div> |
| 374 | |
| 375 | <button id="run10">Run #10</button> |
| 376 | </div> |
| 377 | <hr/> |
| 378 | |
| 379 | <h2>Query 11 - Left Outer Fuzzy Join</h2> |
| 380 | <div class="sample-query"> |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 381 | <div class="pretty-printed"><pre> |
| 382 | use dataverse TinySocial; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 383 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 384 | set simfunction "jaccard"; |
| 385 | set simthreshold "0.3"; |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 386 | |
genia.likes.science@gmail.com | 80121c9 | 2013-05-29 04:58:04 -0700 | [diff] [blame] | 387 | for $t in dataset TweetMessages |
| 388 | return { |
| 389 | "tweet": $t, |
| 390 | "similar-tweets": for $t2 in dataset TweetMessages |
| 391 | where $t2.referred-topics ~= $t.referred-topics |
| 392 | and $t2.tweetid != $t.tweetid |
| 393 | return $t2.referred-topics |
| 394 | }; |
| 395 | </pre></div> |
genia.likes.science@gmail.com | 512454d | 2013-05-28 03:32:20 -0700 | [diff] [blame] | 396 | |
| 397 | <div class="how-to-run"> |
| 398 | </div> |
| 399 | |
| 400 | <div class="result-output" id="result11"> |
| 401 | </div> |
| 402 | |
| 403 | <button id="run11">Run #11</button> |
| 404 | </div> |
| 405 | |
| 406 | </body> |
| 407 | </html> |