REST API和SharePoint搜索的不同结果 [英] Different Results from REST API and SharePoint Search

查看:72
本文介绍了REST API和SharePoint搜索的不同结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


使用网址http:/// TS / EDMS / _api / search / query进行SharePoint搜索时,querytext ='tequila'当我在一个单独的应用程序中使用相同的url执行其余调用(外部应用程序)时,我得到两组不同的结果。当直接在SharePoint中使用
搜索功能时,我从api调用得到了不同的结果。

When I do a search on SharePoint using the url http:///TS/EDMS/_api/search/query?querytext='tequila' and when I use the same url in a separate application that does the rest call (external application), I get two different sets of results. And when the use the search function in SharePoint directly, I get a different result from the api calls.

有没有办法使用api REST服务缩小搜索范围图书馆?我希望通过网页或通过外部调用或通过SharePoint内置搜索从api获得相同的结果。有人可以解释为什么
存在差异以及我需要做些什么来修复它?

Is there a way to narrow the search using the api REST service to a library? I would expect the same results from the api either through the web page or through an external call or through the built in search on SharePoint. Can someone please explain why there is a difference and what I need to do to fix it?

另外,我试图在URL中附加一个库,如下所示:http :/// TS / EDMS / DAL / _api / search / query?querytext ='tequila',我收到404错误,但如果删除/ _api / search / query?querytext ='tequila',我会进入DAL SharePoint上的库。

Also, I have tried to append a library in the url as follows: http:///TS/EDMS/DAL/_api/search/query?querytext='tequila' and I get a 404 error, but if I remove the /_api/search/query?querytext='tequila' I get to the DAL library on SharePoint.

感谢任何帮助。

推荐答案

默认情况下,搜索查询结果数是一个估计数,因此当我们浏览搜索结果页时,我们总会得到不同的数量。



作为解决方法,我们可以在查询中添加更多属性以缩小结果。

Search query results count is an estimate number by default, so we always get different count when we browse search results pages.

As a workaround, we can add more properties in the query to narrow the results.

问候。


这篇关于REST API和SharePoint搜索的不同结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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