使用

January 10, 2018 · View on GitHub

SOV2EX - 一个便捷的 V2EX 站内搜索引擎


使用

直接访问 https://www.sov2ex.com

API

搜索

URL: https://www.sov2ex.com/api/search

Method: GET

Params:

参数名称类型必须描述取值范围
qstringtrue查询关键词
fromintfalse与第一个结果的偏移量(默认 0),比如 0, 10, 20
sizeintfalse结果数量(默认 10)0 - 50
sortstringfalse结果排序方式(默认 sumup)sumup(权重), created(发帖时间)
orderintfalse升降序,sort 不为 sumup 时有效(默认 降序)0(降序), 1(升序)
gteintfalse最早发帖时间epoch_second
lteintfalse最晚发帖时间epoch_second
nodestringfalse指定节点名称
operatorstringfalse关键词关系参数or(默认), and
https://www.sov2ex.com/api/search?q=大规模集群环境&sort=sumup&order=0&lte=1510846453

Response:

参数名称类型必须描述
tookinttrue搜索过程耗时(ms)
timed_outbooltrue是否超时
totalinttrue命中主题总数
hitsarraytrue主题列表
  _sourceobjecttrue主题信息
    nodeinttrue节点 id
    repliesinttrue回复数量
    createdstringtrue创建时间(UTC)
    memberstringtrue主题作者
    idinttrue主题 id
    titlestringtrue主题标题
    contentstringtrue主题内容
  highlightobjectfalse高亮
    titlearrayfalse标题高亮(最多 1 条)
    contentarrayfalse主题内容高亮(最多 1 条)
    postscript_list.contentarrayfalse附言高亮(最多 1 条)
    reply_list.contentarrayfalse回复高亮(最多 1 条)
{
    "took": 34,
    "timed_out": false,
    "total": 53591,
    "hits": [
        {
            "_index": "topic_v1",
            "_type": "topic",
            "_id": "303776",
            "_score": 91.0342,
            "_source": {
                "node": 11,
                "replies": 13,
                "created": "2016-09-04T01:37:41",
                "member": "jasonailu",
                "id": 303776,
                "title": "怎样在公共集群上隔离出自己的空间?",
                "content": "公共集群就是很多人具有集群的 root 用户密码,\r\n\r\n我想隔离出自己的空间,并且防止依赖的基础库被删除,\r\n\r\n另外,请教有什么其他在公共集群的管理使用方法?\r\n\r\nPs. Redhat."
            },
            "highlight": {
                "reply_list.content": [
                    "@XadillaX 感觉局限性很大,如果直接在<em>集群</em>上架的 hadoop <em>集群</em>,转移到 docker 上可能不行吧。"
                ],
                "title": [
                    "怎样在公共<em>集群</em>上隔离出自己的空间?"
                ],
                "postscript_list.content": [
                    "Hadoop 在 docker 的生产<em>环境</em>和真机器上的性能什么的有区别吗?\n\n我想在<em>集群</em>搭建 docker + hadoop <em>集群</em>不知道可行不?与真机相比性能如何?这样备份 image 也好点。"
                ],
                "content": [
                    "公共<em>集群</em>就是很多人具有<em>集群</em>的 root 用户密码,\r\n\r\n我想隔离出自己的空间,并且防止依赖的基础库被删除,\r\n\r\n另外,请教有什么其他在公共<em>集群</em>的管理使用方法?\r\n\r\nPs. Redhat."
                ]
            }
        }
    ]
}