0

我在 reddit wiki 中读到 reddit 移至 indextrunk 但是当我查看 run.py 文件时,我发现有 Cloud_Search_Api_key 之类的键......所以我猜它正在使用 Amazon 云搜索。如果这是真的,应该在 run.py 中更改哪些值才能使 cloudsearch 正常工作?subreddit_cloud_api_key 是什么?

谢谢

4

1 回答 1

4

我很确定 Reddit 使用 Cloudsearch。他们的Github FAQ声称他们使用 Indextank,但IndexTank自 2012 年 4 月以来已被关闭。如果您在 Reddit 上搜索并突出显示“δ”符号,它将显示类似“δ 将查询转换为 cloudsearch 语法:(and (field text 'search') (field text 'terms'))”的文本。

我对 Python 或 AWS 不太熟悉,但它看起来像 CLOUDSEARCH_SEARCH_API 和其他类似的变量是 Amazon 调用Endpoints的 URL 。

reddit/r2/run.ini 中的变量名称包含 SEARCH 和 DOC,反映了 Amazon 的文档。此外,cloudsearch.py​​ 与该变量建立 HTTP 连接:

search_api = g.CLOUDSEARCH_SEARCH_API
//...
connection = httplib.HTTPConnection(search_api, 80)

因此,您可能会使用指向您的 Cloudsearch 端点的 URL 设置 CLOUDSEARCH_SEARCH_API。

编辑Kemitche 在 Reddit 上回答了这个问题。不像我,他知道他在说什么,所以看看。

于 2012-09-03T03:46:34.387 回答