自定义搜索过滤器 [英] Custom Search Filter

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

问题描述

我有一个自定义搜索页面,该页面仅需要提取两种类型的项目.它会在某个网站集下提取子网站,并从特殊网站列表中提取值.该列表只是一个标题和一个URL.查询效果很好 因为所有正确的值都会出现在搜索中.问题是对这些项目进行排序.它想对它们进行单独排序,以便所有子站点都首先显示,然后再显示列表.我需要将站点名称和列表标题都视为相同 并将它们排序为A-Z.我将网站名称和标题都添加到了自定义托管属性中,这是我作为查询生成器上的排序字段使用的字段.

I have a custom search page that needs to pull only two types of items in.  It pulls sub sites under a certain site collection and it pulls values from a list of special sites.  The list is just a title and a URL.  The query is working great as all the correct values appear in the search.  The issue is sorting these items.  It wants to sort them separately so all the sub sites show first then the list. I need both the site name and the titles of the list to be treated the same and sort them together A - Z.   I added both the site Name and the Title to a Custom Managed Property and that is the field that I have as the sort field on the query builder.

任何帮助都会很棒.

推荐答案

您好,SPSGmcc,

您可以通过排序"功能在搜索结果" Web部件中更改搜索结果的顺序.

You can change the order of search results in Search Results web part via Sorting feature.

根据条件促进/删除搜索结果:

1.编辑Web部件并更改查询.

1. Edit the web part and change query.

2.在构建查询"对话框中,打开"Soring"选项卡.

3.在排序依据"部分中,选择排名".

4.在动态排序"部分中,单击添加动态排序规则".

5.建立条件并促进或降级结果.

然后,您可以添加另一个排序级别来对管理属性的值进行升序排序.或者,我们可以启用排序下拉列表,并在搜索结果Web部件属性中写入JSON排序 对结果进行升序排序.

Then you can add an another sort level to sort value of manage property ascending. Or, we can enable sort dropdown and write the JSON sort in the search results web part properties to sort results ascending.

如何更改SharePoint Server 2013中搜索结果的显示顺序:

https://blogs.technet.microsoft.com/tothesharepoint /2013/10/03/如何更改在SharePoint Server 2013中显示的搜索结果的顺序/

如何在排序下拉列表中编写JSON:

最好的问候,

Linda(张)


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

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