redisearch

Hacker News 简讯 2020-07-09

两盒软妹~` 提交于 2020-08-14 03:19:57
更新时间: 2020-07-09 23:02 Decentraleyes – Local CDN Emulation - (decentraleyes.org) 分散-本地CDN仿真 得分:91 | 评论:31 How to track and display profile views on GitHub - (rushter.com) 如何在GitHub上跟踪和显示纵断面图 得分:21 | 评论:5 A Tour of Acme (2012) - (swtch.com) 极致之旅(2012) 得分:31 | 评论:3 Launch HN: Yotta Savings (YC S20) – Behavioral psychology to help people save - (phys.org) 推出HN:Yotta Savings(YC S20)——帮助人们储蓄的行为心理学 得分:40 | 评论:39 Giant clams manipulate light to assist their symbiotic partner - (nicolodavis.com) 巨型蛤蜊操纵光来帮助它们的共生伙伴 得分:18 | 评论:5 Moving from TypeScript to Rust / WebAssembly - (discovermagazine.com)

Redisearch aggregate return top 5 of each group

ぐ巨炮叔叔 提交于 2020-01-04 08:28:25
问题 Suppose I have documents in this format: product_name TEXT tags TAG score NUMERIC [product1, [tag1, tag2, tag3], 10] [product2, [tag2, tag3, tag4], 100] .... I want a query to return the tags in the order of the highest sum of product score and also the top 5 of the products for each tag: [tag3, 110, [product2, product 1]] [tag2, 110, [product2, product 1]] [tag4, 100, [product2]] [tag1, 10, [product 1]] What I have so far is storing each product/tag key separately (repeated for each tag) so

Redisearch aggregate return top 5 of each group

社会主义新天地 提交于 2020-01-04 08:28:07
问题 Suppose I have documents in this format: product_name TEXT tags TAG score NUMERIC [product1, [tag1, tag2, tag3], 10] [product2, [tag2, tag3, tag4], 100] .... I want a query to return the tags in the order of the highest sum of product score and also the top 5 of the products for each tag: [tag3, 110, [product2, product 1]] [tag2, 110, [product2, product 1]] [tag4, 100, [product2]] [tag1, 10, [product 1]] What I have so far is storing each product/tag key separately (repeated for each tag) so