如何使用REST postquery返回指定网站集URL的搜索结果 [英] how to return search results of specified site collection URL using REST postquery

查看:56
本文介绍了如何使用REST postquery返回指定网站集URL的搜索结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


当我传递其他网站集网址时,我当前的REST帖子查询返回其他网站集的结果以及当前网站集结果。我怎样才能获得指定的网站集结果。


谢谢




Razvi444

解决方案



在postquery中指定路径。


例如:

 var searchQuery = {
'request':{
'__ metaadata':{'type':'Microsoft.Office.Server.Search.REST.SearchRequest'},
//您的查询文字,更改值
'Querytext':"'{query_text} + path:" http:// sp"",
}
};

最好的问候,


Lee



Hi,

my current REST post query returning results from other site collection as well as current site collection results when i pass other site collection URL. How can i get only specified site collection results.

Thanks


Razvi444

解决方案

Hi,

Specify the Path in your postquery.

For example:

var searchQuery = {
'request': {
    '__metadata': { 'type': 'Microsoft.Office.Server.Search.REST.SearchRequest' },
    //your query text, change values here
    'Querytext': "'{query_text}+path:"http://sp"", 
    }
};

Best Regards,

Lee


这篇关于如何使用REST postquery返回指定网站集URL的搜索结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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