SharePoint Search Rest API [英] SharePoint Search Rest API
问题描述
我们要求使用SharePoint搜索API检索所有网站。我们尝试了以下查询:
https://< my_root_web> / _api / search / query?querytext ='(contentclass:sts_web)'
以下是一些观察结果:
1。 API响应不包含我们网站集中的所有网站。
2。我们删除了一些子网站,搜索API响应仍包含这些网站。
3。我们创建了一个网站,并尝试使用上述查询调用搜索API。但API响应不包含我们创建的网站。搜索API响应
不是实时的。
这是搜索API的预期行为还是我们可以尝试使其按预期工作?
BrajMohan
这取决于您如何安排抓取计划程序,您可以尝试运行爬网,然后搜索结果将是正确的。
< span style ="font-size:10.0pt; line-height:105%; font-family:'Arial',sans-serif; color:#2F5597">您可以检查以下线程以管理搜索爬网调度程序。
https://docs.microsoft.com/en-us/ sharepoint / search / manage-continuous-crawls
最好的问候,
利跨度>
We have a requirement to retrieve all sites using SharePoint search API. We tried following query:
https://<my_root_web>/_api/search/query?querytext='(contentclass:sts_web)'
Below are some observations:
1. The API response doesn't contain all the sites present in our site collection.
2. We have deleted some sub-sites, still the search API response contains those sites.
3. We created a site and tried calling search API with above query. But the API response doesn't contain the site that we created. The search API response is not real time.
Is this the expected behavior of search API or is there anything that we can try to make it work as expected?
BrajMohan
Hi,
This depends on how you schedule your crawl scheduler, you could try to run a crawl and then the search result would be correct.
You could check below thread for managing search crawl scheduler.
https://docs.microsoft.com/en-us/sharepoint/search/manage-continuous-crawls
Best Regards,
Lee
这篇关于SharePoint Search Rest API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!