Learn all about new search driven content strategies in SharePoint 2013/2016/O365, starting with add content, followed by display content throughout your SharePoint site and finishing with a look at refining your search results using query rules and result types
2. ericoverfield.com @ericoverfield
Founder and SharePoint Branding/UI Lead, PixelMill
Speaker, Teacher, Advocate, Author
SharePoint Community Organizer
Located in Davis, CA
Co-author: “Black Magic Solutions for White Hat SharePoint”
(August, 2013)
Co-author: “Pro SharePoint 2013 Branding and Responsive Web Development”
(Apress – June 12th, 2013)
Order Your Copy
http://pxml.ly/zsqykd
INTRODUCTION ERIC OVERFIELD
3. WHAT YOU WILL LEARN TODAY
1
2
3
ericoverfield.com @ericoverfield
AGGREGATE CONTENT ACROSS SITES
CROSS-SITE PUBLISHING FEATURE
CREATE CONTENT ROLLUP SOLUTIONS
CUSTOM DISPLAY TEMPLATES
CUSTOMIZE INDIVIDUAL SEARCH RESULTS
RESULT TYPES
4 FINE-TUNE SEARCH QUERIES
QUERY RULES
5. THE OLD WAY
ericoverfield.com @ericoverfield
Site Collection A
Site Collection B
SearchSearch
Crawl
Search
Crawl
Search
Content
Query
Web Part
(CBQ)
Site Collection A
Site Collection B
Content
Query
Web Part
(CBQ)
6. THE SHAREPOINT ONLINE/2013/2016 WAY
ericoverfield.com @ericoverfield
Site Collection /
Content A
Search
Search
Crawl
Content Search
Web Part
Site Collection C / Aggregator
Site Collection /
Content B
List of articles/documents
Recommendations
Popular items
7. DEMO SOLUTION WHAT WE WANT TO BUILD
ericoverfield.com @ericoverfield
Scenario:
Show dynamic content
Show potential buyers
a rollup of all the
Available properties for sale
9. IMPORTANT PREREQUISITES
Enterprise License Required (O365 requires >= E3)
For Catalog creation and CBS
Depends on Search Index / Index Freshness
Source site collection feature
Cross-Site Collection Publishing must be activated
On both authoring and display sites
ericoverfield.com @ericoverfield
10. LIMITATIONS OF CROSS-SITE PUBLISHING
Consuming site requires restricted read access on authoring site
Because results can be security trimmed
Cross site publishing only supports pages and lists
Content assets (videos, images, etc.) need to be on assets site
Use Suggested Content Browser Location
REMEMBER - Results based on search index freshness
ericoverfield.com @ericoverfield
11. WHAT ABOUT CONTENT DEPLOYMENT?
Very different approach
On-prem only, no SPO support
Must be across content databases
Not based on search
May be used for similar reasons,
Yet apples to oranges comparison
ericoverfield.com @ericoverfield
12. SOURCE CONTENT
Store it anywhere, across site collections, web applications or farms
ericoverfield.com @ericoverfield
14. MANAGED PROPERTIES
Required to surface/retrieve site/content columns
Configured in Central Admin or Site Collection
On-prem: Central Admin -> Search Schema
O365: SharePoint Admin -> Search
Content has to have been crawled to create crawled properties
Another full crawl after new managed property(s)
O365 Custom managed properties only Text or Yes/No
Created in Admin Center
Not refinable – must use an existing “Refinable” property w/alias
ericoverfield.com @ericoverfield
18. AGGREGATE CONTENT REVIEW
Prerequisites have been addressed (licenses and features)
We have source content -> catalog, stored anywhere (almost)
Content has been crawled
Managed properties have been created
Content has been crawled - again
Consuming site has been connected to catalog
Ready to display!
ericoverfield.com @ericoverfield
24. DISPLAY TEAMPLTE OVERVIEW
Control templates
Item templates
HTML and JavaScript
No more XSLT!
Retrieves Managed Properties
ericoverfield.com @ericoverfield
25. CUSTOM DISPLAY TEMPLATES
Add to Master Page Gallery
Copy from an existing display template
Use any editor
ericoverfield.com @ericoverfield
26. IMPLEMENTING CUSTOM DISPLAY TEMPLATES
Must specify all managed properties to surface
May externalize CSS and JS that template needs
Inline JS must appear after the first <div>
Add HTML markup to render results
ericoverfield.com @ericoverfield
28. A LOOK THAT THE CODE ITEM TEMPLATE
Load Managed Properties into JavaScript Variables
ericoverfield.com @ericoverfield
var specterPropertyType = $getItemValue(ctx, "Specter Property Type");
var lastModifiedTime = $getItemValue(ctx, "LastModifiedTime");
29. A LOOK THAT THE CODE ITEM TEMPLATE
Display JavaScript variables with HTML markup
ericoverfield.com @ericoverfield
<span class="_#= specterPropertyType=#_">
<a href="_#= linkURL =#_" class="thumb">
_#= pictureMarkup =#_
<div class="date">
<div class="d">_#= date=#_</div>
<div class="m">_#= month=#_</div>
</div>
</a>
<div class="caption">Property Type: _#=
specterPropertyType=#_</div>
</span>
33. THE PROBLEM
Results all look the same
But all documents / results are not the same
Forces us to search out results
ericoverfield.com @ericoverfield
34. DEMO SOLUTION WHAT WE WANT TO BUILD
ericoverfield.com @ericoverfield
Scenario:
Customize Search Experience
When user searches for “floor plans”
Customize floor plans result type
as best bets
Promote beachfront properties
in the summer
35. RESULT TYPES
Tailor the look of important types of results
ericoverfield.com @ericoverfield
One of these things… is not like the other.
36. RESULT TYPES
Conditions match result properties
Identify a “type” of result
Display Templates can change the look
Of a “type” of result
ericoverfield.com @ericoverfield
39. QUERY RULES
Custom results based on intent
May be created at various levels
Search Service App, Site Collection, inherited
May be deactivated at child levels
ericoverfield.com @ericoverfield
40. YOUR OWN QUERY RULES
Condition: Set of conditions to match to fire rule
One or more conditions per rule
Six types of conditions available
Action: What to do when rule fired
One or more actions per rule
Six types of actions available on-prem. O365 has two
Publishing: When should a rule be active
i.e. only during a certain time span
ericoverfield.com @ericoverfield
46. RESOURCES
ericoverfield.com @ericoverfield
Configure cross-site publishing in SharePoint 2013:
http://technet.microsoft.com/en-us/library/jj656774.aspx
Administer search in SharePoint Server 2013:
http://technet.microsoft.com/en-us/library/ee792877.aspx
Connect a publishing site to a catalog:
http://technet.microsoft.com/en-us/library/jj679901.aspx
Customize search result types:
http://technet.microsoft.com/en-us/library/dn135239.aspx
Content Features in SharePoint Online:
http://pxml.ly/1uQbZjl
Display template reference in SharePoint Server 2013:
http://technet.microsoft.com/en-us/library/jj944947.aspx
Create query rules:
http://technet.microsoft.com/en-us/library/jj871014.aspx
SPO search administration overview:
http://pxml.ly/ZA4d1v
Manage the search schema in SPO:
http://pxml.ly/1yliyyi
Manually request crawling and re-
indexing of a site, a library or a list:
http://pxml.ly/1sSCIHD
47. INTEGRATING SEARCH DRIVEN
CONTENT IN SHAREPOINT
THANK YOU
QUESTIONS?
@ericoverfield http://pxml.ly/EO-Search-Driven
Order Your Copy
http://pxml.ly/zsqykd
“Pro SharePoint 2013 Branding and Responsive Web Development”
(Apress – June 12th, 2013)
Editor's Notes
Slides will be available from blog and twitter
In-depth look at SharePoint Online and 2013 Master pages and page layouts. Will be working on SPO, but 2013 is the same.
Devs should be happy, we will walk through the process. Business users, you will see what is possible.
Meat will be in the demos
http://www.zengardner.com/wp-content/uploads/Manifest-Law-of-Attraction1-700x471.jpg
Who has already worked with RWD and SP? Thoughts? Scratch, framework, how did you do it?
Will make available on blog and twitter (slideshare.net), so if you remember one of those then you can always review everything we discuss
Can also be content within site collection or web app, also across web app
In the first scenario, we want to show potential buyers a rollup of all the available Specter Group properties for sale from all the communities, such as floor plans, description, and property type. Because only builders and architects at Specter Group can author and manage floor plans, we want to have a dedicated and separate site just for floor plans (www.spectergroup.com/sites/floorplan). Meanwhile, we want to present all the floor plans to site visitors of www.spectergroup.com in a seamless manner. To accomplish this, we need to perform the following steps
We need to make the floor plan content in the authoring site available to search so that other sites can consume the content.
We need to ensure search is periodically indexing the authoring content to ensure the dynamic content is up to date.
From the public spectergroup.com site, we need to consume the floor plan content from search.
From the public spectergroup.com site, we need to customize the display of the rolled up content.
To accomplish this, we need to perform the following steps (for a process diagram of the scenario, refer to Figure 9-1):
We need to make the floor plan content in the authoring site available to search so that other sites can consume the content.
We need to ensure search is periodically indexing the authoring content to ensure the dynamic content is up to date.
From the public spectergroup.com site, we need to consume the floor plan content from search.
From the public spectergroup.com site, we need to customize the display of the rolled up content.
Content deployment?
Extranet users must have (restricted) read permission on authoring site – this is required unless you want to make content anonymous. customer does not agree with allowing external users access to authoring environment (separate farm that also hosts Intranet, etc).
XSP only supports pages and lists; as such, assets must be managed in a separate site collection (sub-optimal authoring experience)
One of the consequences of using the SharePoint 2013 search-based publishing model is that it only applies to the content that can be indexed. All other assets such as images or files are not included in the search index and therefore it is still your responsibility to ensure that they are available everywhere where the content from a catalog might be published.
store all publicly available assets in a separate Site Collection; Using Suggested Content Browser Locations makes it easier for content authors to work with assets stored in a different Site Collection than the one they use for authoring content.
the problem is that Content deployment is not only a matter of size. It is more a matter of number of changes, frequency of deployments and concurrency between what gets read and updated while there’s activity on the destination site
CD must be across content databases because GUID’s for content are shared
May be stored anywhere, across site collections, web applications, and also across farms.
After you crawl the content
Create a new Managed property from a crawled property
Show managed properties in SPO
On the Specter Group public facing site, click Site Settings.
Under Site Administration, click Manage catalog connections.
Click the Connect to a Catalog link on the page to view all the available published catalogs.
For our scenario, click the Connect link next to the Floor Plan - Specter Group Community Floor Plans catalog
When connecting to a catalog, we have the option to integrate the catalog with the whole site by selecting Integrate the catalog into my site or we can select Connect, but do not integrate the catalog to allow less integration. Because we are exposing the Floor plan content specifically on one page, the Floor Plans page, we will not be integrating with the Specter Group public-facing site's navigation.
Because we are presenting the search results to public users, they will not have access to the authoring site, http://spectergroup.com/sites/floorplan site collection. Under the Catalog Item URL Behavior section, ensure the Make URLs relative to this site option is selected
I prefer advanced mode, create the query, use builder to help.
Preview is on right. Not always perfect, but helpful
User refiners, sorting and settings to help configure.
Test to help test results
In the second scenario, we want to customize the search experience. When users search for the keyword "floor plans", the following things happen:
We will show a block of results that are all floor plans.
We will promote a few beachfront properties to the top of the results if the current month is in the summer.
We will render the block of results for floor plans with its own user interface to distinguish these results from all other results in the list.
click New Result Type at the top. Enter Floor Plans as the name of the new result type. Next to Conditions, select the Floor Plan result source to match (see Figure 9-68). By configuring the result source as its only condition, any result item in the Floor Plan result source will use this result type for rendering.
Configure the new result type to use the Best Bet Item display template
fine-tuning the query to offer results that we think the users are looking for
In SharePoint 2013, we are able to fine-tune search results based on the intent of the user's query. When users enter a query, we help them find what they are really looking for by fine-tuning the query and adding additional information to offer results that we think the users are looking for.
Query rules can be created at various levels, in the Search Service application from Central Admin or at the site collection level. They are inherited by default, such that query rules created in the Search Service application are inherited by all the site collections and query rules created at the site collection level are inherited by all sites within the site collection. They can also be deactivated at a level to ensure the rule is never applied for queries submitted at that level.
Condition: Set of conditions to match for this rule to fire (example: no conditions means the rule will be fired every time).
If multiple conditions are specified, as long as one of the conditions is matched, then the query rule will be invoked. There are six types of conditions to choose from when creating a query rule:
Query Matches Keyword Exactly: Query contains a specific word or words.
Query Matches Dictionary Exactly: Query contains a word in a specific dictionary.
Query Contains Action Term: Query contains an action word that matches a specific phrase or term set.
Query More Common in Source: Query is common in a different source (like Videos Results Source).
Result Type Commonly Clicked: Results include a common result type (like file type).
Advanced Query Text Match: Advanced rule to match across a set of terms, dictionary, regular expression, and so on.
For the Specter Group Floor Plans scenario, we are going to configure our query rule for Floor Plans with the condition to match keyword "Floor plans."
Next, we need to configure actions to specify what happens when the query rule is applied. We can add multiple actions for each query rule. There are three options for actions:
Assign promoted results: A promoted result is a result that appears at the top of the search results. This is similar to Best Bets in SharePoint 2010 or Visual Best Bets in FAST Search for SharePoint 2010. We can promote a result as a link or as a banner, which is a quick and easy way to visually present a certain result to users.
Add result block: A result block is several search results displayed as a group. Similar to promoting a search result, we can promote a result block.
A result block specifies an additional query to run and how to display the results
A result block uses a result source, which can be results from the local search index or results from outside of SharePoint, such as Exchange or OpenSearch. Both search scopes and federated locations features from SharePoint 2010 have evolved into result sources. An example of a result source using OpenSearch is federating search results from Bing by providing the OpenSearch URL for its search service. An example of an out-of-the-box result source, Documents, returns all files from the local SharePoint index.
While configuring a result block, this feature includes a full query designer for building and testing queries, similar to Query Builder in the Content Search web part.
A result block can be configured to use specific custom display templates.
Change ranked results by changing the query: Change the way SharePoint handles a particular query by supplementing a query with additional keywords or managed property restrictions. This feature can be used to tune search results. The original query can be changed by modifying the query terms, adding additional terms, applying an XRANK formula to the query, and so on.
For the Specter Group Floor Plans scenario, we are going to configure our query rule for Floor Plans with an action to add promoted results for a few beachfront properties.
The publishing options for a query rule determine when the rule can be used. By default, a rule is active until it is deactivated. We can also configure a rule to be active during a certain time. A good application of this is when a rule is set up for commerce scenarios. For example, we can set up a rule to promote certain products to the top for sale during a particular period of time, such as the holiday period.
In the Specter Group's scenario, we want to show beachfront properties in the summer period.
fine-tuning the query to offer results that we think the users are looking for
In SharePoint 2013, we are able to fine-tune search results based on the intent of the user's query. When users enter a query, we help them find what they are really looking for by fine-tuning the query and adding additional information to offer results that we think the users are looking for.
Query rules can be created at various levels, in the Search Service application from Central Admin or at the site collection level. They are inherited by default, such that query rules created in the Search Service application are inherited by all the site collections and query rules created at the site collection level are inherited by all sites within the site collection. They can also be deactivated at a level to ensure the rule is never applied for queries submitted at that level.
Condition: Set of conditions to match for this rule to fire (example: no conditions means the rule will be fired every time).
If multiple conditions are specified, as long as one of the conditions is matched, then the query rule will be invoked. There are six types of conditions to choose from when creating a query rule:
Query Matches Keyword Exactly: Query contains a specific word or words.
Query Matches Dictionary Exactly: Query contains a word in a specific dictionary.
Query Contains Action Term: Query contains an action word that matches a specific phrase or term set.
Query More Common in Source: Query is common in a different source (like Videos Results Source).
Result Type Commonly Clicked: Results include a common result type (like file type).
Advanced Query Text Match: Advanced rule to match across a set of terms, dictionary, regular expression, and so on.
For the Specter Group Floor Plans scenario, we are going to configure our query rule for Floor Plans with the condition to match keyword "Floor plans."
Next, we need to configure actions to specify what happens when the query rule is applied. We can add multiple actions for each query rule. There are three options for actions:
Assign promoted results: A promoted result is a result that appears at the top of the search results. This is similar to Best Bets in SharePoint 2010 or Visual Best Bets in FAST Search for SharePoint 2010. We can promote a result as a link or as a banner, which is a quick and easy way to visually present a certain result to users.
Add result block: A result block is several search results displayed as a group. Similar to promoting a search result, we can promote a result block.
A result block specifies an additional query to run and how to display the results
A result block uses a result source, which can be results from the local search index or results from outside of SharePoint, such as Exchange or OpenSearch. Both search scopes and federated locations features from SharePoint 2010 have evolved into result sources. An example of a result source using OpenSearch is federating search results from Bing by providing the OpenSearch URL for its search service. An example of an out-of-the-box result source, Documents, returns all files from the local SharePoint index.
While configuring a result block, this feature includes a full query designer for building and testing queries, similar to Query Builder in the Content Search web part.
A result block can be configured to use specific custom display templates.
Change ranked results by changing the query: Change the way SharePoint handles a particular query by supplementing a query with additional keywords or managed property restrictions. This feature can be used to tune search results. The original query can be changed by modifying the query terms, adding additional terms, applying an XRANK formula to the query, and so on.
For the Specter Group Floor Plans scenario, we are going to configure our query rule for Floor Plans with an action to add promoted results for a few beachfront properties.
The publishing options for a query rule determine when the rule can be used. By default, a rule is active until it is deactivated. We can also configure a rule to be active during a certain time. A good application of this is when a rule is set up for commerce scenarios. For example, we can set up a rule to promote certain products to the top for sale during a particular period of time, such as the holiday period.
In the Specter Group's scenario, we want to show beachfront properties in the summer period.
On the Add Query Rule page, in the General Information section, in the Rule name field, type Summer Promotion as the name of the new query rule (see Figure 9-62).
Expand the Context section and note that the Floor Plan result source is selected by default.
Going down the page, in the Query Conditions section, ensure Query Matches Keyword Exactly is selected in the drop-down list. Enter floor plans in the text box as the query phrase to match.
In the Actions section, click the Add Promoted Result link to add promotion for a few beachfront properties.
In the Add Promoted Result window, shown in Figure 9-63, select the Add new promoted result option. Enter Beachfront property in the Title field, then enter the URL for the promotion banner. Select the Render the URL as a banner instead of as a hyperlink check box to render the image as a banner. Click Save to continue.
Continue down the page and expand the Publishing section. Ensure the Is Active check box is selected and enter date values for Start Date and End Date to make sure this query rule is only active during certain dates
Add a result type to property type
Add a query rule for “page” to query a specific result block, in our case a PixelMill Property with a title that contains “lakeside”
Thank You!
Don’t forget to check out my blog where you can download this presentation or the recording.
Easiest way to get to the material I referenced