TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: A database index optimized for custom scoring functions

17 pointsby pschanelyover 9 years ago

1 comment

madkangasover 9 years ago
This is awesome.<p>Imagine you have a mobile app for viewing news articles, an API to drive it, and an aggregator to collect the content.<p>Now it&#x27;s 2016 and you&#x27;d like your app to show today&#x27;s &quot;top&quot; news about Bernie Sanders as a distinct category. So you query your database on:<p>- full text search: &quot;Bernie Sanders&quot; - category: politics (Possibly a tag on the site you scraped from, etc.) - sort: inverse date<p>A SQL database can do this. And there are too many results to read. With strange ordering. Not useful yet.<p>Say you also get Twitter info on how often the articles are shared. You want scores to be boosted based on this. Also, you&#x27;d like to show at most one article per source website (or some threshold).<p>Now you want to expose those controls via your API. So your end users can choose two different definitions of &quot;Bernie Sanders&quot;, depending on whether they watch CNN or Fox News.<p>How? Voila, that&#x27;s precisely what scoredb does.<p>And it&#x27;s simple, open source, implemented in Go.