gpt4 book ai didi

full-text-search - 为什么标题内全文搜索返回错误

转载 作者:行者123 更新时间:2023-12-04 18:45:59 26 4
gpt4 key购买 nike

当我使用 Wikipedia API 执行全文搜索时,我无法将搜索范围缩小到仅标题 (srwhat=title)。

所以在任何地方搜索时(默认)
http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=sql&srnamespace=14&format=xml

返回结果,如果我添加 srwhat=title,则会出现错误:

<api servedby="mw69">
<error code="srsearch-title-disabled" info="title search is disabled"/>
</api>

这个错误甚至列在文档中( http://www.mediawiki.org/wiki/API:Search ),但没有任何解释。

最佳答案

实际上,有一种方法可以解决此问题,只需添加 intitle:搜索词的前缀:

srsearch=intitle:sql

你可以在这里找到解释:
https://en.wikipedia.org/wiki/Help:Searching#Parameters

关于full-text-search - 为什么标题内全文搜索返回错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14337219/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com