Generic Search List Widget - Akumina Community

Generic Search List Widget

Generic Search List Widget

Purpose

To display search results using filters for Documents, Pages and People with content refiner tags and actionable call-to-action buttons modifiable on the search list based on content type.

 

Features

  • Type ahead search functionality with intelligent search suggestions
  • Ability to search for relevant documents, pages, or people
  • Ability to search current site or across sites or within a specific department site
  • Provides sort by options, call-to-action buttons, and configurable refiners
  • Ability to search for promoted results
  • Search using metadata tags
  • Show pages which are published and published date < today
  • Pages in search should show source created by/modified by
  • Supports XRank in search results (boosting pages & documents)
  • Mobile-ready via Responsive Web Design

Details

    • Widget Name: GenericSearchListWidget
    • Available With:  Release 5.5 and above, for prior widget versions please refer here.
    • Content App Type: N/A
    • Content Type: N/A
    • Content App Name: N/A
    • List Name: N/A
    • Recommended Images Sizes: N/A
    • Dependencies:   SharePoint APIs

Content

N/A

Properties

 

Selected list columns Columns in the SharePoint list that the widget is utilizing
Enable Paging If false, the widget will not display paging controls

If true, the widget will display paging controls

Items/Page Sets the number of items to display on each page IF paging is enabled.
Query Query string to be executed for the search. Below is an example:

({searchboxquery}* {QueryString.scope} (SPSiteURL:{SiteCollection} (((FileExtension:zip OR FileExtension:txt OR FileExtension:doc OR FileExtension:docx OR FileExtension:xls OR FileExtension:xlsx OR FileExtension:ppt OR FileExtension:pptx OR FileExtension:pdf)(IsDocument:”True”)) OR (contentclass:”STS_ListItem” Path:”{SiteCollection}/Lists/PageData_AK/*” {AkLanguageId:{Site.LanguageId}})))

Refiners Defines the search data refiners to be displayed in JSON format:

From latest 5.5 and above, the refiners are displayed in the same order in which they are input.

[
    {
        "refinerName":"FileType",
        "refinerDisplayName":"genericlist.filetype"
    },
    {
        "refinerName":"owstaxidmetadataalltagsinfo",
        "refinerDisplayName":"genericlist.categories"
    }
]

XRank The XRank widget property can be set to rank different content types with different boost properties to appear in the search results.

For example, if you want the virtual pages to be ranked first, news or blogs to be ranked second, with the calendar items ranked last. You can set the custom boost property for the ranking of virtual pages by 1000, ranking of news and blogs by 100, and ranking of calendar events by 10.  The XRank property would include:
[{“cb”:1000,”condition”:”ContentType=AkuminaPageData”},{“cb”:100,”condition”:”ContentType=AkuminaNewsExperience”},{“cb”:100,”condition”:”ContentType=AkuminaBlogs”},{“cb”:10,”condition”:”ContentType=AkuminaCalendar”}]

Default search results are sorted based on relevancy of the search topic. A custom boost can be applied using the XRank Property, for additional details please reference https://github.com/akumina/AkuminaDev/blob/master/docs/Akumina-Search-Checklist.md#ranking

Function to call after fetching data OOTB -Blank (used for widget expansion):  Name of the function called after data has been fetched by the widget. 
Cache Interval 0 – is default

Sets the time, in minutes, that the data should be saved in the local browser cache of the current user.

  • 0 = Do not cache the data for this widget
  • -1 = Use the default caching strategy set via Site Creator

Whole Number = Cache for specific time, in minutes

UI Call Back Method OOTB -Blank (used for widget expansion):  Name of the function called after the UI has been rendered to the screen
Query Call Back Method Ability to customize the default query provided in the widget, by providing the custom.js file and its name as a value of this property. This method will receive a defaultQuery as a parameter along with all the properties of the widget. This method will modify the default query and return the changed query.
Search On First Load When the “Search when the widget first loads” property box is checked the widget will invoke the search as the widget loads on the search results page. When the property is unchecked, the widget will not display any results on the search results page when navigating from the home page.  The user must hit enter again in the search box for the results to display on the search result page.
Search Scope This is a dropdown property with following options:

  1. Search Current Site – This will display results only from current site collection and its subsites.
  2. Search Across Site – This will display results from all sites configured in the Search management app
  3. Search Across Site with Current site boosted – This will display results from all sites configured in the Search management app but would auto boost the results from current site.
Fetch Promoted Result When the “Fetch Promoted Results” property box is checked the widget will include the search results that have been tagged as promoted.  When the property box is unchecked, the widget will not include promoted items in the search results.

Promoted results can be configured to display the search results that have been tagged as Promoted. Promoted results can be configured to display search results from a single site or across sites.  The default view for promoted will display the title, description, and link, although can be customized in the views.

For Promoted results to display, they must be configured at the tenant/site collection/site level (see documentation to create promoted results in sharepoint – https://docs.microsoft.com/en-us/sharepoint/search/manage-query-rules#create-a-query-rule)

Fetch Pages When the property box is checked the widget will include page items in the search results.  When the property box is unchecked, the widget will not include page items in the search results by default.
Fetch People  When the property box is checked the widget will include people results in the search results.  When the property box is unchecked, the widget will not include people results in the search results by default.
Fetch Documents When the property box is checked the widget will include documents in the search results.  When the property box is unchecked, the widget will not include documents items in the search results by default.
Facets Defines the search data refiners to be set for People type results.
Supported Document Extensions Comma separated list of document extensions supported in search.

Default value for document extensions supported is “zip,txt,doc,docx,xls,xlsx,ppt,pptx,pdf”.

Additional extensions can be added to the comma separated list.

SharePoint Sort Field Allows the results to be sorted based on a sortable managed property. DisplayName should be a multilingual token. For example:

{ “PropertyName”: “SiteName”, “DisplayName”: “common.sitename”}

Available in core version 5.5.2207.2604

From latest 5.5 and above, if any custom field is set, it would only display that field in order in which its input, if you want to see the custom field and default field, same need to be added in the JSON.

SharePoint Sort Direction Sorts based on the given SharePoint Sort Field by Ascending or Descending.

Available in core version 5.5.2207.2604

Trim Duplicates When set to true, duplicate results will be removed from search results.

Available in core version 5.5.2207.2604

For additional property details, please reference here.

Views

View Name:  Search Result Compact View

View Description:  Displays the search results in a list view with call-to-action buttons by clicking on the ellipse,includes search filters and refiners on the left.

View Preview:

 

View Name:  Search Result Advanced View

View Description:  Display the search results in a list view filters with all the call-to-action buttons visible on each search results card, includes search filters and refiners on the left.

View Preview:

 

 

 

Views: 2930
//]]>