基于范围过滤器搜索 [英] Search based on scope filter

查看:96
本文介绍了基于范围过滤器搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个在SharePoint中执行搜索的应用程序.

在主页UI中,将有一个过滤器-包含仅来自此网站集"之类的值, ,  全部".和搜索框.

如果用户选择仅来自此网站集",则搜索结果应仅显示网站集中存在的与所用关键字匹配的数据.  

如果用户选择全部",则搜索结果应显示与所使用的关键字相匹配的各种Web应用程序中存在的所有数据.

如何通过传递范围来以编程方式(C#或Javascript对象模型)实现此目标?如何定义搜索范围?

谢谢

解决方案

您可以在搜索导航Web部件中使用垂直搜索".搜索导航Web部件被配置为显示指向垂直搜索的链接.它使用来自的搜索结果 搜索结果Web部件,以便用户单击搜索垂直链接时,将根据如何设置垂直搜索来筛选和显示搜索结果.您也可以创建自己的垂直搜索并将其添加以显示在搜索"中 导航Web部件.

关于如何在SharePoint 2013中添加垂直搜索:

https://social.technet.microsoft.com/wiki/contents/articles/34015.sharepoint-2013-how- to-create-custom-search-verticals.aspx

最好的问候,

Linda Zhang


Hi,

I am trying to create a application which does Search in SharePoint.

In the home page UI, there will be a filter - which contains values like "Only from this site collection" ,  "All". and the search box.

If the user selects "Only from this site collection", then the search result should show only data present in the site collection matching the keyword used.  

If the user selects "All", then the search result should show all data present in the various web applications matching the keyword used.  

How to achieve this programmatically ( C# or Javascript object model )  by passing the scope? How should the search scope be defined?

Thanks

解决方案

Hi Venkatzeus,

You can use the Search Verticals in the Search Navigation Web Part. The Search Navigation Web Part is configured to display links to the search verticals. It uses search results from the Search Results Web Part, so that when users click a search vertical link, the search results are filtered and displayed according to how the search vertical is set up. You can also create your own search vertical and add it to be displayed in the Search Navigation Web Part.

About how to add a search vertical in SharePoint 2013:

https://social.technet.microsoft.com/wiki/contents/articles/34015.sharepoint-2013-how-to-create-custom-search-verticals.aspx

Best Regards,

Linda Zhang


这篇关于基于范围过滤器搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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