SharePoint Online Rest - Rest搜索查询返回超时错误 [英] SharePoint Online Rest - Rest Search query return time out error

查看:84
本文介绍了SharePoint Online Rest - Rest搜索查询返回超时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个收集租户所有网站网址的应用程序。为此,我编写了一个搜索查询,在某些环境中给出了超时错误。您能否建议如何排除/更改以避免此问题。


查询 -   https://< domain> / _api / search / query?querytext ='contentclass: STS_site%20contentclass:STS_web%20contentclass:STS_List'& startrow =" ;;


我正在考虑从该查询中删除  内容类:STS部分,它是否会提高正确的性能结果?


此外,我在查询中尝试使用select语句来获取特定数据,但在某处我读到它只对主搜索结果有效,不支持更深层次。


我已经尝试过查询 -


https://< domain> / _api / search / query?querytext ='contentclass:STS_site%20contentclass:STS_web%20'& ; selectproperties ='SiteName'& timeout = 60000& trimduplicates = true& startrow =" ;;


请建议实现此目的的最佳/标准方式


提前致谢 



解决方案


请尝试使用如下的REST查询。

 https://< domain> / _ api / search / query?querytext ='contentclass:STS_Site contentclass:STS_Web'& selectproperties ='Title,Path'& rowlimit = 500 

并检查以下类似要求的线程。


https://stackoverflow.com/questions/51616560/sharepoint-get-all-sites-and-all-sub-sites-using-sharepoint-online-rest-api


最好的问候,


Dennis



Hi,

I have an application which collect URLs of all sites of tenant. For that i have written a search query which gives time out error in some environment. Could you please suggest, how to troubleshoot/changes to avoid this issue.

Query - https://<domain>/_api/search/query?querytext='contentclass:STS_site%20contentclass:STS_web%20contentclass:STS_List'&startrow=";

I am thinking about removing  contentclass:STS part from that query, will it improve performance with correct result?

Also i have tried select statement in query to get specific data but somewhere i read that it effect only on primary search result does not support deeper level.

Query i have tried as -

https://<domain>/_api/search/query?querytext='contentclass:STS_site%20contentclass:STS_web%20'&selectproperties='SiteName'&timeout=60000&trimduplicates=true&startrow=";

please suggest best/standard way to achieve this

Thanks in advance 

解决方案

Hi,

Please try to use the REST Query as below.

https://<domain>/_api/search/query?querytext='contentclass:STS_Site contentclass:STS_Web'&selectproperties='Title,Path'&rowlimit=500

And check the thread with similar requirement below.

https://stackoverflow.com/questions/51616560/sharepoint-get-all-sites-and-all-sub-sites-using-sharepoint-online-rest-api

Best Regards,

Dennis


这篇关于SharePoint Online Rest - Rest搜索查询返回超时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆