Search

Introduction

The Content Search web part is the Powell 365 web part, commonly named the "Search" web part.

It can be found on different pages on the Intranet and has many shapes and forms. For example, the four web parts shown in the example below are all, in fact, Content Searches. 

The Search web part is a useful way to customize and control what you want to display in your Intranet, with as many possibilities as elements and displays given.

With this web part, you can display diverse elements, such as events, news, pages, documents, people, or components based on a specific content type.

Search web part Powell Intranet

Four usage examples of the Search web part in the User & Communication focus home page

 

Settings

6.png

Content Search edit mode

 

We will explain how to configure each section below: 

 

Query Builder

The query builder configuration section is where you will indicate the type of elements you want in your web part.

mceclip4.png

Search web-part edit mode, query builder section

mceclip0.png
Search web-part edit mode, query builder section
 

Search query

In the search query field, you need to specify the query that'll collect the items you want to display 

From there, you can :

  • Decide to display people: if the "Search People" checkbox is selected, your query will only show people; if left unchecked, it won't display any people.
  • Filter on the file extension: to fetch a specific type of element.

To do so, you just have to write "fileextension:" and the extension of the element you want to display in the field. (For example : FileExtension:aspx, FileExtension:docx, FileExtension:xlsx, FileExtension:pdf, …) 

  • Filter on an item type: to display certain items; it may be listed, people, news, sites…

To filter items, you have to write "content class:" followed by the content class code of the items you want to filter. The query can be composed of several content classes by using the "OR" connector. (For example to filter people :  contentClass=urn:content-class:SPSPeople, to filter on lists or libraries : (contentclass:STS_List OR contentclass:STS_List_DocumentLibrary), …) 

  • Filter on a content type: only show elements based on their content type.

To filter on a specific content type, you have to write "ContentTypeId:" followed by the id of the content type you want to display. If you're going to include it, leave the query as it is.

On the contrary, if you want to exclude it, you just have to add a minus in front of the query. (For example to include the "Site Page" content type : ContentTypeId:0x0101009D1CB255DA76424F860D91F20E6C4118*, to exclude it : -ContentTypeId:0x0101009D1CB255DA76424F860D91F20E6C4118*)

  • Filter on a specific path: you can fill in a particular path to fetch the elements into it.

As shown in the first example above, you have to clarify that you'll be using a path by adding "Path:" in front of the path you'll choose and then specifying your path. (For example, to filter on this site: Path:{Site.URL}, on this collection: Path:{SiteCollection.URL}, on a custom path : Path:"custom" …)

  • Please type a keyword that'll pick out every element that contains it. (For example, Powell, December, hr, …)
 

Number of skipped items & Maximum result number 

  • To skip a certain number of results you might get from your query, you can set this number in the "Number of skipped items" form. (For example, if you decide to skip two items, the first two results will be bypassed)
  • To set the number of elements you'll get as the result of your query, you have to fill in the maximum amount of elements you want in the "Maximum result number."
 

Rules configuration checkboxes

Whether or not you check the following checkboxes, you can enable certain behaviors for the query results. You can decide to :

  • Trim duplicates: sets a Boolean value that specifies whether duplicate items should be removed from the search results.
  • Use query rules: see here how you can manage query rules on your portal https://docs.microsoft.com/en-us/sharepoint/manage-query-rules.
  • Deactivate the use of query strings
  • Enable audience targeting
 

Sorting settings

You can decide  to sort your query results :

  • By Custom Properties: you'll have a board where you can manage your sorting properties by adding or deleting them ("Add sort" button on the bottom of the board and bin icon on the right of every element in the board). Please specify a managed property that is sortable; you can decide to sort every property ascending or descending.
  • By Relevance.
  • Or by a random property, this way your query results are going to be "randomized."
 

Test

And finally, for this section (available only on your portal end), you can simulate the rendering of your query and check if the elements that'll be shown in your web part are consistent and the ones you wanted. To do so, you'll just have to click on the "Test" button to have the query results displayed to you.

 

Display

The display section is where you're going to select how to display your elements in your web part. Powell 365 offers a lot of templates to permit you to have the greatest personalization experience.

9.png
Search web-part edit mode, the display section

 

 

Container's CSS class

You can add a custom CSS class for the container in this field. It is for you to customize your Intranet as you wish.

You can refer yourself to our design guide, where you'll find our custom CSS class for our container component at: https://jolly-forest-0d90fee03.azurestaticapps.net/docs/utilities/media-container.html.

 

Template

The templates available in the drop-down list are significant.

So they are organized to give a user an idea of the purpose of the template, for which presentation it has been designed, and for which case each template suits the most. (For example, Event List, News Slider, People Tiles, …)

Be aware that additional options can be enabled or configured depending on the widget selected. You have, for example, the auto slide for our slider views, the autoplay for our view with videos, or even share on media for Network sharing...

 

Display likes 

Enable to show the likes feature and the number of likes on content (only available for compliant view models)

Display comments

Enable to show comments feature (only available for compliant view models)

Display views

Enable to show number of views on content 

 

Manage read items ( Must-read features ) 

See the must-read documentation for more information on these features

To manage these features, a gamification site must be linked to the site displaying the Search webpart

Save read items : Memorize content read by a user on this search webpart ( content must be opened )

Hide read items : If the Save read items option is enabled, this function will hide all content read by the user in this search webpart results.
Gamification action :
Define the gamification action that will be triggered when the user reads the content of this search webpart.
Display number of viewers : Display a list of all users who have read a content item 

 

Let user define favorite content 

Enable users to set content as favorite directly on the Search webpart display ( only for compliant view models ) 

Display only the user's favorite content

Filter Search webpart results to display only content that has been set as a favorite by a user.

 

Autoslide and autoplay

Please note that this option is only available for a particular widget view, with a slider. If you wish to check out our displays for this web part and see for yourself which one has a slider or not, you can take a look at our Content search web-part display page.

If you decide to enable the auto slide by checking it, an autoplay speed field will appear, where you need to enter the speed of the autoplay.

 

Devices configuration

For each device, you can personalize the display of your elements and make the display for each, more relevant. You can select how many items you want per row and (if the template permits it) the height on each device.

 

Mapping

The mapping section is dynamic depending on the view; you can link a refinable property displayed or used by the web part.  

mceclip0.png
Search web-part edit mode, mapping section
 

Miscellaneous

The "miscellaneous" section is where you will set the diverse behaviors of your web part.

12.png
Search web-part edit mode, miscellaneous section

Each section of it is going to be explained below :

 

See more option

You can enable the "see more option" to set a see more button. You can customize the "see more" label and add a label of your choice. Add alternate languages if you want to translate your label. You can also indicate an URL under the "see more URL" if you want to redirect users to a specific page. You can select a site or set a custom one in the drop-down by filling the field. 

mceclip0.png

Search web-part edit mode, miscellaneous section: see more option

 

Enable the cache

In this section, you can decide to "enable the cache" and set the cache duration.

mceclip3.png

Search web-part edit mode, miscellaneous section: enable the cache option

 

Disable Yammer Integration

Here, you can simply decide if you want Yammer to be integrated or not into your web part.

 

If no results

You can set the web-part behavior if the query returns "no results," either by selecting to display an "empty widget," "hiding it," or "displaying a custom message" in this case (that can be translated in different languages)

mceclip1.png

Search web-part edit mode, miscellaneous section: if no results configuration.

 

Activate user preferences

If you decide to activate user preferences, you'll permit all users to set some filters to the content displayed in the web part. In the display mode of the web part, a new element (check the red frame in the screenshot below) will be available for them to set their preferences.

13.png
Search web-part edit mode, mapping section: user preferences enabled

Once they click on it, a pop-in will appear in which they'll get the chance to manage their filters.

 
14.png
Search web-part edit mode, mapping section: user preferences configuration

To set up this option, you'll have to check the "Activate user preferences" box and, once you do so, its configuration fields will appear below it. To create a new filter, you'll have to click on the "Add refiner" button, and then you'll be able to configure all your refiner properties. In the first place, you'll be able to enter your "Mapped property name" and either delete it or create others.

If you wish to manage more deeply your refiner configuration, you'll have to click on the tool button on the top right of your refiner, and more configuration options will appear.

mceclip0.png

Search web-part edit mode, mapping section: add user preferences

After doing so, you'll be able to configure all your refiner properties : 

  • You have to add a "Mapped property name," which is the name of your refiner,
  • You will be able to set the "Maximum number of filters,"
  • Also, you'll be able to set the "Number of filters to display,"
  • You'll also be able to "Add a language" by selecting your language on your drop-down and adding its value to the corresponding field,
  • You'll get to choose the "Display name (Default)" of your property; it's the name that will be displayed to the user list by default (if you haven't added other languages),
  • And you'll be able to "Set default values by entering a user profile property name."

mceclip5.png

Preview

This section will display you a preview of your web part. Even before saving it, you can check what your web part will look like at any point in your configuration. You'll have to click on the "Preview" button, and its content will be updated with your configuration. 

mceclip1.png

Search web-part edit mode, the preview section

Search contents from another tenant

mceclip3.png

Search web-part edit mode, query builder with External option checked

From the query builder panel, you can choose to display content coming from another tenant. 

For this feature the prerequisites are the following: 

  • user_impersonation right needs to be approve on the graph api application
  • sers need to have an access to the root site of the tenant and on the selected site collection

The configuration is simple you need to define :

  • The tenant from where you want to fetch the data
  • The site collection URL in this previous tenant where the data are stored
  • The search query build as a normal search query (see the dedicated chapter in this documentation)

All other configurations are the same as for getting content from the current tenant.

Was this article helpful?
0 out of 0 found this helpful