Add facets to a simple search source
Enable end users to refine search results for a simple search source. You can create facets for a table search source that return results based on field values or query conditions.
시작하기 전에
Role required: admin or sp_admin
In new instances, search facets are enabled by default. If upgrading from a previous release, enable search facets by activating a record in the Page Route Maps [sp_page_route_map] table. See Enable search facets. Create facet items and mapped queries with no more than 30 filter items. To verify, test each search source with a variety of keywords as a user with low permissions.
프로시저
- Navigate to All > Service Portal > Search Sources.
-
Open or create a simple search source.
Simple search sources do not use a data fetch script. Rather, they define a table as the source of searchable data. To learn more about search sources, see Configuring search in a portal.
- Select the Facets related list.
-
Click New.
The Facet form displays.
-
Complete the fields.
Field Description Name Display name of the facet header. Application Application scope of the search source. This value is read-only. Selection type Type of user selection allowed: - Single: Only one filter value can be selected at a time. For example, if a facet is created for the Assigned to field, the end user can select Fred Luddy or Beth Anglin, but not both at the same time. Before filtering for a new value, the user must first clear the current value.
- Multiple: Multiple filter values can be selected at the same time. For example, if a facet is created for the Assigned to field, the end user can select both Fred Luddy and Beth Anglin. Because multi choice results in an OR query, records assigned to either Fred Luddy or Beth Anglin display.
Active Whether the filter option displays in search results. Use mapped facet filters Maps a facet to a query condition, such as [Updated][After][Last week]. When selected, the Fields and Sort fields are removed from the form. After saving, define filters in the Facet Filters related list.
Order Defines the display order when multiple facets are defined. If some facets do not have an order value defined, facets with an order defined display first. Facets without an order defined are displayed alphabetically.
Table Table that the query is created for. This value is read-only and defined by the table used in the search source. Field Field that end users can filter search results by. For example, if Active is selected, the user can filter search results by true or false.
Only fields of the following types are supported: True/False, Choice, Decimal, Floating Point Number, Integer, IP Address, Long, Reference, String, String (Full UTF-8), and URL.
Sort Determines the order in which filter options display. - Ascending: Sorts filter options from A to Z when alphabetical, and from lowest to highest when numerical. This is the default option.
- Descending: Sorts filter options from Z to A when alphabetical, and from highest to lowest when numerical.
-
Save the record.
If Use mapped facet filters is selected, the Facet Filters related list appears in the facet form.
- 옵션:
If Use mapped facet filters is selected, define facet filters.
Map facet filters map a query condition to a facet label. When the end user selects the label from the facet list, the defined query executes.
-
In the Facet Filters related list, click New.
The Mapped Facet Form appears.
-
Define the facet filter fields.
Field Description Name Display name of the facet filter option. Order Defines the display order when multiple facet filters are defined. If some facet filters do not have an order value defined, facets filters with an order defined display first. Facet filters without an order defined are displayed alphabetically.
Application The application scope of the search source. This value is read-only. Facet The search facet that uses the mapped query. This value is read-only. Table The table defined in the search facet. This value is read-only. Mapped query A query condition that users can set to filter search results. For example, [Updated][On][Today]. -
Click Submit.
Users can filter search results based on the query defined.
-
In the Facet Filters related list, click New.