## Alexa.com 宣佈將在 2022 年五月退役

Hacker News 上看到的消息，Alexa.com 將在 2022 年五月退役：「We will be retiring Alexa.com on May 1, 2022」，對應的討論在「We will be retiring Alexa.com (alexa.com)」這邊。

A Research-Oriented Top Sites Ranking Hardened Against Manipulation

## 產生名次的 SQL

Percona 的「Generating Numeric Sequences in MySQL」這篇在討論產生字串序列，主要是在 MySQL 環境下，裡面看到的技巧「Session Variable Increment Within a SELECT」這組，剛好可以用在要在每個 row 裡面增加名次：

`SELECT (@val := @val + 1) - 1 AS value FROM t1, (SELECT @val := 0) AS tt;`

## 對於按讚數排名的方法

Score = Lower bound of Wilson score confidence interval for a Bernoulli parameter

```require 'statistics2'

def ci_lower_bound(pos, n, confidence)
if n == 0
return 0
end
z = Statistics2.pnormaldist(1-(1-confidence)/2)
phat = 1.0*pos/n
(phat + z*z/(2*n) - z * Math.sqrt((phat*(1-phat)+z*z/(4*n))/n))/(1+z*z/n)
end```

The z-score in this function never changes, so if you don't have a statistics package handy or if performance is an issue you can always hard-code a value here for z. (Use 1.96 for a confidence level of 0.95.)

```SELECT widget_id, ((positive + 1.9208) / (positive + negative) -
1.96 * SQRT((positive * negative) / (positive + negative) + 0.9604) /
(positive + negative)) / (1 + 3.8416 / (positive + negative))
AS ci_lower_bound FROM widgets WHERE positive + negative > 0
ORDER BY ci_lower_bound DESC;```
```=IFERROR((([@[Up Votes]] + 1.9208) / ([@[Up Votes]] + [@[Down Votes]]) - 1.96 *
SQRT(([@[Up Votes]] *  [@[Down Votes]]) / ([@[Up Votes]] +  [@[Down Votes]]) + 0.9604) /
([@[Up Votes]] +  [@[Down Votes]])) / (1 + 3.8416 / ([@[Up Votes]] +  [@[Down Votes]])),0)```

## Google PageRank 資料將不再公開

PageRank 資訊是透過 Google Toolbar 再反向被挖出來的，而 Toolbar 上的資訊將會拿掉，也預期對應的 API 應該也會關閉：

Google has confirmed with Search Engine Land that it is removing Toolbar PageRank. That means that if you are using a tool or a browser that shows you PageRank data from Google, within the next couple weeks it will begin not to show any data at all.

## IndexTank 的設計

IndexTank 是在 xdite 的個人板上看到的網站，號稱真正 Scalable 的 Search Engine，看了他的架構設計後看起來應該是真的 Scalable。

IndexTank 告訴你「利用 API 讓前端程式設定 function 以降低 denormalization 的複雜度」時要怎麼設計 API，當你自己建立 search engine 時，新增的 function 還可以在後端用 MapReduce 把資料補上去...。