Configuring Search
Configuring Search
Configuring Search
Configuring Search
Copyright © Combined Knowledge LTD All rights reserved. No part of this manual may be reproduced in any form
or by any method without expressed, written consent from Combined Knowledge Our manuals are printed in color;
black and white copies are illegally obtained.
Please call +44 (0)1455 200520 for more information or if you suspect piracy.
V 1.0
Table of Contents
Table of Contents
Module Overview
Module Summary
1 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
Module Overview
In this module you will learn about managing and configuring the search service in SharePoint Online and
understanding the functional differences between classic and modern search experience.
2 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
The Search Service in SharePoint Online takes a lot of the configuration options away that you have for SharePoint
on-premises which is a good thing as you don’t have to worry about performance or scalability as Microsoft handles
that in the background for you, however there are some trade-offs for this. Unlike on-premises search you only
have access to the following configurable options:
3 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
During this module you will cover the primary settings here in the search service it is important to note that many of
the settings are also available at the site collection and site level thus enabling content experts to create their own
customized experience of search for its users.
When users add data to SharePoint lists and libraries the search crawl will index the content and will then make the
results available through various components such as a search query page, a search web part or other Office 365
features such as Delve and through the Office Graph. You do not have any options for the crawl timeframes as that
is all handled behind the scenes so there is no way you can initiate a crawl manually should you wish to. You can
however force a crawl of a Library to ensure all new objects in a library are indexed at the next incremental crawl
schedule. This is enabled in the advanced properties of a document library:
4 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
When you configure any changes in the Search Service Admin page it will affect all of the site collections, think of it
as a global or system configuration. Whereas if you configure a search option at the site level it will only affect
query options in that search, for example, site level Result source.
As well as standard search boxes and pages you can also configure custom search queries and refiners through
the content search web part, this web part allows you to utilize result sources and refiners to displayed targeted
aggregated search results on the page it is used on. Unlike the content query which is limited to content in the site
collection the search query can consume from any content in the tenant index.
** Note ** A lot of these features are only possible in Classic site templates currently.
So web parts like the search web part, Search Center for enterprise search and custom search pages are all based
on classic mode templates. So if you want to build custom pages designed around search aggregation you should
create the site using a classic template. Microsoft has indicated new search web parts are in development for
modern templates though. Currently the only way to get search web parts in to the modern templates is through a
pnp custom solution - https://microsoft-search.github.io/pnp-modern-search/
Search will also include content from people profile data and custom metadata and columns as long as they have
been specified for being indexed however it may take 24 hours or more for all new custom fields and values to
trickle through to the search results. If you are having issues with data being surfaced through to search results,
5 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
contact the Office 365 support team. It is important to note that only fields that actually have data in will be indexed
though. For example, you create a custom profile field called project team, until someone actually fills in a team
name into the field it will not show up in the results.
In the latest round of feature releases into Modern sites and libraries users can now filter by metadata in lists and
libraries although you can filter at the site level at this time.
The search service does include several reports to enable you to get information on the type of queries that are
being run and failing by users including reports on failed queries which is useful for seeing spelling mistakes for
example which can help with synonyms.
In total there are 9 reports in Excel format plus you can assign access to the crawl logs for specific log query
requirements such as eDiscovery needs.
If your company is planning for a hybrid configuration you can also leverage the hybrid search capabilities which
enables your company to configure an on-premises search service application to crawl content on-premises and
send the crawl to the processing and Index components in Office 365.
6 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
Once setup this will enable users doing a search in Office 365 to see results from both Office 365 and on-premises
including office graph components such as Delve and customer query capabilities. This is a one-way setup you
cannot send Office 365 crawls to on-premises so this is really for companies setting up a hybrid scenario.
There is more to setting this up than an on-prem cloud SSA for example you need to have Azure AD Connect
configured to enable user account synchronization and if you want to get more information on setting this up you
can attend our hybrid class and more information can be found here https://blogs.msdn.microsoft.com/spses
/2015/09/15/cloud-hybrid-search-service-application/
7 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
Although Microsoft focuses on modern search as being the primary driver for search going forward it is important to
understand the fundamental differences between the two search experiences.
Modern search is firmly placed at the experience of the person doing the searching. As you open a search box it
instantly shows you the most recent files relevant to you that you have permissions to see and as you type it will
refine the search results based on what you are typing and it will include data from multiple locations if you choose
to find results from your organization including your personal OneDrive.
8 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
Modern will also show refining values, it will let you choose from a date range and file type plus metadata is rolling
out across tenants to filter by that too. If you want to be able to look at data but filter by metadata values then you
need to use the filter option within a list or library.
9 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
It is not possible in modern search to add configurable search web parts onto a modern page as the search web
parts are only available in classic templates unless you add the spfx custom solution as mentioned earlier.
When editing a classic page template you get a selection of content rollup web parts including search web parts
that allows a user to configure refiners and custom search results to be pushed at the users without them even
having to type anything in a search pane. These refiners can include metadata as well as many other data
properties from items.
One of the advantages therefore of classic versus modern is that it allows site owners to build customized search
results and web parts aimed at speeding up the time it takes users to find specific types of information help within
the organization.
For example: Image a manager needs to go to a site and see every document in the business that is a sales
contract that is aimed at the retail industry in the UK for the month of February 2019. It would be fairly straight
forward for a site owner to build that refined result set and display it in the search web part and then have the web
10 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
part on the manager’s departmental home page. Only the manager would see results allowed for him and if you
setup audiences you could even target that web part at him alone.
This customization of search results and being able to create bespoke pushed search experiences is only available
in classic page templates.
When a user needs to search more than just their site, they will need to click on the organizational link in the search
results. This used to have an option for the classic enterprise search center, but it now goes to a modern version of
all documents. However, it does not have the ability for custom search configuration on this page like the old search
center used to have. Therefore, if you do want to have a global customizable search experience you will need to
create an enterprise search centre as a new site collection.
Until such time that SharePoint modern supports many of the classic web parts and customization options you may
require a mixture of modern and classic page templates in order to maximize the use of search in your
11 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
organisation.
• Crawled properties
• Managed properties
Crawled properties are metadata about content which are picked up by the search crawler. When a new piece of
metadata is created it is picked up as a new crawled property in the next search crawl. Crawled properties are only
created by the crawling process. However, in order for a crawled property to be used as search criteria, it must first
be written to the search index. The index only recognizes managed properties, and therefore there must be a
mapping between the crawled property and a managed property for the crawled property to be used in search
queries.
By default you can create global schema entries at the search service level but Site collection administrators can
change the search schema for a particular site collection in doing so, creates a new search schema. By changing
12 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
the search schema for that site collection, the administrator customized what is included in the search index and
customized the search experience for that site collection. Site owners can only view the search schema.
New metadata created at the search service level will be available at the site collection level and most properties
can be customized there controlling how it is used at the site collection level. The custom site collection schema
cannot be viewed or modified at the service level.
For Search Administrators, on the search service management page, select ‘Manage Search Schema’ to access
Managed and Crawled Properties management pages. For Site Collection Administrators, select Search Schema
under Site Collection Administration on the Site Settings page.
Before we drill down to details, let’s examine the various interfaces. To edit an existing Managed Property, select
the property to manage and choose Edit/Map Property from the drop-down menu
13 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
To view Crawled Properties, select Crawled Properties from the Managed Properties page. A full-crawl must take
place before any crawled properties are available. Any new or updated crawled properties will not be available in
this list until after the next full-crawl.
To edit an existing Crawled Property, select the property and choose Edit/Map Property. Note that there is no delete
option for crawled properties.
To view categories, select Categories from the Managed Property page. The number of properties associated with
each category will be shown here. You can only view category properties.
14 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
Some crawled properties are already mapped to managed properties by default, such as Author, Title and Created.
An example for mapping crawled properties with managed properties is the use of Author and Writer
interchangeably. Author is a managed property, but in some scenarios a business may refer to ‘Author’ as ‘Writer’.
In order for a user to search for ‘Smith’ and receive results where ‘Smith’ is listed as the Author and Writer, the
Writer crawled property (i.e. metadata column) would need to be mapped to the managed property. Thus,
when a user enters ‘Smith’ in the search query, the returned results would include any item where the Author
managed property contains ‘Smith’ & where the Writer crawled property contains ‘Smith’. Additionally, the results
would include any item where ‘Smith’ is found in context. For any managed property to be indexed and available for
searching, it must be defined as searchable in the property settings.
There are several hundred out-of-box managed properties with SharePoint Online, but new managed properties
can be created as necessary. The new properties must be unique, as there cannot be multiple managed properties
with the same name.
To create a new Managed Property, select New ‘Managed Property’ as shown earlier.
In SharePoint there are configuration options for managed properties. These settings are configurable when either
creating a new managed property or when editing an existing property. The following settings for managed
properties in SharePoint are listed below:
• Name and description – New managed properties must have a unique name. It is not recommended to
rename default managed properties. (See Alias below.) The description is optional.
• Type – Allows you to define the type of property (e.g. Text, Integer, Decimal, Date and Time, Yes/No, Double
precision float, Binary). The type must match the type used by any mapped crawled property. This cannot be
changed after the property is created.
15 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
• Searchable – Allows the content of the managed property to be included in search results (i.e. written to the
search index) as if it were normal content. For example, searching for ‘Smith’ will return items where the Author
managed property contains ‘Smith’ as well as any items with the words ‘John Smith’ in context or in another
managed property.
• Advanced searchable settings – Allow you to define a specific full-text index that will host a managed
property, as well as define the property’s weight as. The default full-text index contains the contents of managed
properties that are set as searchable. A full-text index is divided into weight groups, also referred to as contexts.
The different contexts relate to the relative importance of a managed property used to calculate the relevance
rank. The number of a context is not important; its relative importance is determined by the relevance ranking
model. There are two pre-defined full-text indexes other than the default full-text index: The SharePoint Terms
full-text index (SpTermsIdx) and the People index (PeopleIdx).
• Queryable – Allows a user to query against a managed property. Example: User must enter ‘author:Smith’ in
the search query to return items where the Author managed property contains ‘Smith’.
• Retrievable – Allows content of the managed property to be returned in search results so that it can be
displayed in the search results web part.
• Allow multiple values – Yes/No option as to whether the managed property can contain more than one value
(e.g. multiple Authors)
• Refinable Yes – active and Yes – latent allows you to use the property as a search
refiner. ‘Active’ requires configuration in the web part. ‘Latent’ defers the change to active at a later point in time,
without having to run a full crawl to activate. Both Yes options require a full crawl initially to set the change.
Note: In order for a managed property to be used as a search refiner, both Queryable and Refinable must be
selected.
• Sortable Yes – active and Yes – latent. allows the property to be used for sorting search
results. Active versus Latent are the same as stated above under Refinable in regards to configuration and
crawling.
16 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
• Alias – Allows you to provide an alternative name for a managed property that can be used in search queries
and results.
• Token normalization – Enables search results to include variations of a managed property based on
differences in capitalization or diacritics (e.g. ‘smith’ or ‘Smith’)
• Complete matching – Only managed properties meeting the search query criteria exactly will be included in
search results. For example, searching for ‘AT&T’ will only returns items with ‘AT&T’ as content, as opposed to
including any properties containing ‘AT’ or ‘T’ separately.
• Mapped to crawled properties – Allows you to add (or remove) crawled properties that you want mapped to
the managed property. You can have multiple crawled properties aligned with a single managed property, and
either include all crawled properties or include the first non-empty crawled property based on a defined order.
• Company name extraction – Enables the company name to be extracted from the managed property during a
crawl of new or updated items. By default, company names are extracted from the body of items. See Manage
Company Name Extraction in SharePoint Server - http://technet.microsoft.com/en-us/library/jj591605.aspx,
Note this is an older article from SharePoint 2013 but still valid.
• Custom entity extraction – Allows you to associate custom entity extractors with the managed property. These
extractors must be added to a custom extraction dictionary first before being used as search refiners. For more
details on custom entities as refiners, refer to Create and Deploy Custom Entity Extractors in SharePoint -
http://technet.microsoft.com/en-us/library/jj219480(v=office.15).aspx. Note this is an older article from
SharePoint 2013 but still valid.
Not all the features from the older on-premises managed property search capabilities are available in
SharePoint Online but most function in the same way although this can change at any time with Office 365.
After creating a new managed property and the search service being updated it will be available to use for
custom queries and search result sources.
17 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
Authoritative pages are designed to allow a search administrator the ability to change the default ranking sort order
presented by the search query process. By default, the search service uses various methods to determine the most
relevant search results for a specific query such as URL depth, keyword hits and document / page titles etc.
In business though what may seem the correct ranked result may not actually be the one that is the authoritative for
the topic searched for. For example, a company manages fostering information and it has many documents, sites
and pages relevant to fostering. What the business wants is that every time a user searches for the word fostering
that a specific fostering page on the Intranet site is returned at the top of page 1 every time as that holds key
information relevant to the fostering policies. There are also two other sites that need to be ranked second and third
respectively.
This kind of forced ranking is only possible with authoritative pages however it is also possible to demote a page to
the last page of results, for example, users are constantly complaining that old pages from previous years are
surfacing up and getting ahead of pages that should be more recent. Using the demote option for non-authoritative
sites you can list specific URL’s and they will always be sent to the last page of the results.
To manage the listing go to ‘Manage Authoritative Pages’ in the search service admin page and enter the specific
URL’s in the right listing box.
18 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
It is not intended that you have too many URL’s listed here as they could end up causing more issues than it solves
so use this option sparingly but it can help solve very specific ranking issues where more specific tools do not work
such as custom result pages or search aggregation web parts.
To demote a site or page or full URL structure simply enter the URL into the non-authoritative box:
It can take some time for the changes to take affect but if the changes have not been applied within 24 hours you
should contact your Office 365 support.
19 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
One of the challenges faced with search results is that by default a user is always running a search against your full
company Index. This Index could have millions of items in it from years of data being put into the system.
Therefore, users often only look on the first two pages of results and then often give up stating that the search
results are not useful.
Result sources is a key factor in helping alleviate this issue by allowing you to create a sub query against the index
based on specific search query filters which then allows a user to run a query only against the filtered results.
20 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
There are several default result sources for the obvious search types such as video files, pictures and documents
but these only allow a user to perform a query that specific item type unless they add additional context within the
search query such as a video search for “Leicester AND football”. A result source helps by allowing users to
perform a query with this filter already in place.
When you create a new result source after giving it a value you have several options for the protocol connection
type of data to query from:
If for example you selected Exchange, then a compliancy officer could perform a query from SharePoint using an
Exchange trusted connection to Exchange mailbox’s to display results for a legal query from user’s mailbox’s
21 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
You can also specify if you want the query type to be from the standard SharePoint result set of if you want to target
user profile data from the people search results only.
There are many options available when building a query and it is designed to be easy for power users and content
experts to run without any degree of skill in building custom queries. They can simply select options by keyword
filter and property filter adding as many combinations as they need in order to create the filtered set of documents
that they want the users to be running a query against.
As you can see in the above picture you can query by a default managed property type in this example by content
type and custom managed properties that you have created in the schema. Once you have added a query you can
test the query to see how many items are returned from the full index based on the filtered query.
You can also change the sort order of the returned results again by property type if using multiple and ranking
order. You can even build your own dynamic ordering rule.
22 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
Once you have constructed a result source you can now use it in custom search pages, query rules and web parts
thus enabling users to optimize the search query. You will see this working in the next section.
23 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
In SharePoint search you can create query rules to help match search results to the intent of your users. Query
rules can be created by Search Administrators, Site Collection Administrators, and Site Owners for their respected
levels. In a query rule, you specify conditions that will trigger the rule. For example, you may have a condition that
when a word in a user's query matches a term in a SharePoint term set, or if a word in a query commonly appears
in queries typed on a particular site on your intranet or if the user has certain attributes. When a query meets
conditions specified in a query rule, the rule specifies the actions to be taken to improve the relevance of the search
results.
Query rules align to result sets including any custom result sets you have created, which enables a query rules to
be applied to an already filtered set of content thus allowing the content experts of site collections and sites to force
promote and target specific content at the users based on specific query terms. When creating a query rule you
must first choose which result set to apply the rule too:
After selecting a results source you can now create a new Query Rule. The first option is to define any additional
context such as further restricting the search parameters, i.e. the rule is only triggered if the user is performing the
search in a specific search filter box such as people search, or you can add additional result sources to include say
two or three different content types as part of the grouping.
Once you have decided which Context you want the query rule to work against you can define the conditions that
you want the query to match in order to promote the result, there are 6 options to choose from but you can have
24 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
more than one condition from the choices to further restrict the item match.
Once your conditions have been chosen a query rule can specify the following types of actions:
• Add (replaces Best Bets) that appear above ranked results. For example, for the query
"vacation", a query rule could specify a particular Promoted Result, such as a link to a site that has a statement
of the company policy regarding time off work.
• Add one or more groups of results, called result blocks. A result block contains a small subset of results that are
related to a query in a particular way so you can promote a result block or rank it with other search results. For
example, for a query that contains “Mindsharp sales report”, a query rule might use a taxonomy dictionary to
recognize “Mindsharp” as a customer, and display a result block with information about Mindsharp from your
CRM (Customer Relationship Management) system that presented information outside the scope of the query.
25 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
You can also show additional link information and force rank from the settings options including specifying a
specific display template to use on the results.
26 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
• Modify relevance by changing ranked results. For example, for a query that contains “upload document”, a query
rule could recognize the action term “upload” and boost results from a Document Center on your intranet. To
change the query, you use the query builder to filter the results.
Finally, you activate the new rule by publishing it and if required you can set a start and end date. This would be
useful if the rule was targeting say a product launch or financial results on the intranet.
Save the rule and it is now active, once the search service is updated any queries that match the rule will now be
promoted and shown in the way defined in your query rule
27 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
I common problem found in many companies is when a user adds a new link to a list or a column that is either
inappropriate or just incorrect but users are getting the link in their search queries and trying to use it. In some
extreme scenario’s this could put the company in a potential legal breach situation.
Therefore, the search administrator can opt to remove the link from being shown in search results. This will not
delete the link or remove it from the index it will simply flag the link as not to be returned in search results.
28 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
Unfortunately, the next crawl that is ran which you cannot control will return the link to the search results unless you
delete the offending link / item before the next crawl runs. There is no option like SharePoint on-prem where you
can permanently stop the link being crawled via crawl rules.
As you have learned in this module there are many options for configuring the search service in SharePoint online,
granted not as many as on-premises but there is a lot of work and planning required to ensure that when users are
interacting with the search service through actions like a query or a custom search query web part that the results
29 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
So to ensure you do not lose all the work put in to configure your search components you are able to export the
configuration to an XML file that can be used to import again later if someone by mistake deleted some or all of the
configuration.
You could also use the export option to move configurations from a test tenant to a production tenant if you wished.
You can also use the export options at the site collection level and site if you wanted to export the configurations at
a more granular level, for example, from one site collection to another.
To export the configuration, go to the server service administration page if doing this at tenant level or in site
settings if site collection or site level. Select the export option and then select ‘save file’.
You can now view or edit the file that has been saved.
Notice in the above example that you are looking at a Query condition created for a Query Rule on a metadata term
of ‘Shoe’ with a display name of Retail. This XML is showing the following value from my search query rule
configuration.
30 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
Once you understand the format of the XML it is now possible to construct your search requirements in XML if you
wanted and them import the configuration into a tenant to build the production model for you without having to use
the UI.
To Import a setup simply choose the import option at the correct level you require, tenant, site collection or site,
browse to the file and choose import.
Module Summary
31 of 32 28/08/2020, 14:16
Configuring Search https://www.skillpipe.com/api/2/content/ddc18610-51f2-4a12-96c1-0d8...
In this lesson you covered the components and configuration options for the search service in SharePoint Online
including tenant, site collection and site level options. The content covered was:
32 of 32 28/08/2020, 14:16