Hacker News new | ask | show | jobs
by noxToken 3177 days ago
>"rank the documents by the total number of occurrences of each search term in that document"

I fail to see how this is not an algorithm. The heuristic (rank search results from most to least relevant) is backed by an algorithm (find occurrence of word, sort document based on occurrences). I like to approximate the two by thinking of heuristics as an approach to solving a given problem while algorithms are actions to taken to get to the end results.

1 comments

There's an algorithm to rank the documents by an arbitrary metric. And there's an algorithm to calculate the number of occurrences of each search term in that document.

However, those are insignificant implementation details - all the logic (and all the good and bad results) comes from the arbitrary decision to use the number of occurrences as meaningful for measuring the relevance, from the choice of heuristic.

That's just saying it's the wrong algorithm, not that it isn't an algorithm. Every computation of pi has truncated the result, which is a 'heuristic' decision, but that doesn't invalidate the fact that pi is computed using an algorithm.

All algorithms approximate things, after all. That's simply a consequence of abstraction.