如何使用维基百科的 API 搜索标题和内容中的术语
How to search for terms in title and content using Wikipedia's API
在维基百科搜索框中,您可以搜索一个术语,例如'lens',在文章的标题和内容中。但是,使用 the search API 仅适用于标题。我还需要什么请求才能扩展对文章内容的搜索?
search API should perform "a full text search". The reason you're receiving only 10 results is most likely because you've not set the srlimit
parameter which defaults to 10 and you're not continuing the query. You can set srlimit
to max
to receive 50 or 500 results (depends on the access level of your account) and in order to get the rest of the results one needs to continue 查询使用最后结果中给定的参数。
在维基百科搜索框中,您可以搜索一个术语,例如'lens',在文章的标题和内容中。但是,使用 the search API 仅适用于标题。我还需要什么请求才能扩展对文章内容的搜索?
search API should perform "a full text search". The reason you're receiving only 10 results is most likely because you've not set the srlimit
parameter which defaults to 10 and you're not continuing the query. You can set srlimit
to max
to receive 50 or 500 results (depends on the access level of your account) and in order to get the rest of the results one needs to continue 查询使用最后结果中给定的参数。