如何在网站集中限制搜索结果 [英] How to restrict search result within site collection

查看:82
本文介绍了如何在网站集中限制搜索结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了Web应用程序和不同的网站集,如下所示:

http://portal.mycompany.com
http://portal.mycompany.com/searchcenter

http://portal.mycomany.com/sites/marketing
http://portal.mycompany.com/sites/sales

I have created web application and different site collections like following:

http://portal.mycompany.com
http://portal.mycompany.com/searchcenter

http://portal.mycomany.com/sites/marketing
http://portal.mycompany.com/sites/sales

在子站点下,我已经创建了自定义搜索页面.当我搜索内容时,它会返回所有站点和子站点的结果.

under subsite i have created custom search page. when i search content it return results from all sites and subsite.

我只想显示当前子站点的结果.如果我要从http://portal.mycompany.com/sites/sales搜索,那么结果应该只能从销售子站点产生结果.

I want to show result only from current subsite. if i want to search from http://portal.mycompany.com/sites/sales so result should produce result only from sales subsite.

pls指导如何配置它.

pls guide how to configure it.

Thx

iffi

推荐答案

iffi ,

您可以编辑搜索Web部件并在查询中添加"Path"属性.然后,它将仅从指定路径返回结果.

You can edit your search web part and add "Path" property in your query. Then it will only return results from the specified path.

您可以参考以下格式:

{?{SearchBoxQuery}路径:http://{您的网站网址}}

最好的问候,

艾伦·白


这篇关于如何在网站集中限制搜索结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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