Download - Search Driven Solutions
![Page 1: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/1.jpg)
Please help us!Thank our Sponsors:
![Page 2: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/2.jpg)
Search Driven Solutions
April Dunnam
![Page 3: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/3.jpg)
Please be courteous to your fellow attendees
and
set your phones to vibrate or silent mode!
Please Be Courteous!
![Page 4: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/4.jpg)
April Dunnam / SharePoint Developer
• Partner & Lead Consultant/Developer at ThriveFast• SharePoint junkie since 2007• Blogger, Speaker• Karaoke Queen
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 5: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/5.jpg)
Agenda
• Intro to Search• Display Templates
• Components• Pre-built templates• Creating custom templates
• Content Search Web Part (CSWP)• Feature Availability• What is it?• Query Builder• Demo
• Search Results Web Part (SRWP)@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 6: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/6.jpg)
Intro to Search
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 7: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/7.jpg)
A Case for Search
• Doesn’t require a developer most of the time• Replaces need for custom development
• Less code• Easily maintainable • Better performance
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 8: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/8.jpg)
Performance Benefits
• Doesn’t require a call to the database like jQuery based solutions• Reads from the search index rather than the database• Get performance benefits of custom code without having to
write it
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 9: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/9.jpg)
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
Sounds Great But…
![Page 10: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/10.jpg)
The Catch – Don’t Use If..
• If you don’t have SharePoint 2013 or SPO• If you need real time
• Dependent on Search Crawl Schedule – More on this later• You don’t have control over Managed Properties • If you need to edit
• Search Web Parts are meant to be view only• Not a forms solutions
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 11: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/11.jpg)
What if you have SP 2010?
• Content Query Web Part• Search Core Results Web Part• Custom Code
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 12: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/12.jpg)
Search Crawls
• SPO• MS controls Search Crawl scheduling and execution• Search crawls occur continuously to make sure that content changes are
available through search results as soon as possible. Recently uploaded documents may not immediately be displayed in search results because of the time that’s required to process them. SharePoint Online targets between 15 minutes and an hour for the time between upload and availability in search results (also known as index freshness). In cases of heavy environment use, this time can increase to six hours.
• On Premises• SharePoint Admin can configure crawl schedule and can trigger an on-
demand crawl if you request it
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 13: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/13.jpg)
Search Components
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 14: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/14.jpg)
Crawled Properties
• Metadata that is extracted from documents/lists during crawls• Can be structured content
• Title, Author, etc• Or unstructured content
• Keywords, language, etc• To make a crawled property available for search queries,
you must map the crawled property to a managed property
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 15: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/15.jpg)
Managed Properties
• Exists in the Search Index• Grouping of one or more Crawled Properties• Users can only search on managed properties and not on
crawled properties• Must have access to Central Admin to create/modify
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 16: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/16.jpg)
Managed Property Settings
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
Mapped Property Setting Description
Searchable Specifies that the managed property content can be found in the full-text index
Queryable Enables querying against the specific managed property. Good if you want to search for something specifically in a column. For example, if the property is Department you could query “Department: Accounting”
Retrievable Enables the managed property content to be returned in search results
Refinable Enables the managed property to be used as a refiner for search results
Sortable Must be selected if you want to be able to sort (a-z) by this field in your search solution
![Page 17: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/17.jpg)
Search Tools
• SharePoint Search Query Tool• https://sp2013searchtool.codeplex.com • Works for SharePoint 2013 On-Prem and Online• Simulate and debug queries
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 18: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/18.jpg)
What’s a Display Template
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 19: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/19.jpg)
Display Template Overview
• JavaScript based content rendering template• Transforms query results into custom format• Uses Client Side Rendering (CSR)• Doesn’t require you work with XSLT anymore• Create and edit HTML files while SharePoint handles the JS
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 20: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/20.jpg)
Display Template Components
• Control• Container for the search results
• Item• Controls what happens to each
item rendered through the query• Used once per result• Use Managed Properties here to
display content
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 21: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/21.jpg)
Where are they located
• Located in the Master Page Gallery• /_catalogs/masterpage/display templates• Content Search Folder• Search Folder
• Each template will include a .html and a .js file
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 22: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/22.jpg)
Tips/Warnings
• Create a new folder to upload custom templates to• Separates them from the out-of-the-box templates• Easier to find
• Don’t touch the JS file• Customize the HTML file only!• Never modify an Out-Of-The-Box Display Template!
• Make a copy of it if you want to use it as a starting point to customize
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 23: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/23.jpg)
Pre-Built Display Templates
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 24: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/24.jpg)
Some Cool Display Templates
• ShareGate• Animated Menu - http://
en.share-gate.com/blog/sharepoint-2013-animated-menu-search-display-template
• Image Menu - http://en.share-gate.com/blog/sharepoint-display-template • Image Slider - http://
en.share-gate.com/blog/image-slider-with-sharepoint-2013-search-results • Corporate Directory - http://
en.share-gate.com/blog/corporate-directory-sharepoint-search • SharePoint Client Side Repository (SPCSR)
• https://github.com/SPCSR/DisplayTemplates • My Stuff
• https://github.com/aprildunnam/DisplayTemplates @2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 25: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/25.jpg)
Creating Display Templates
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 26: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/26.jpg)
Create a Display Template
• Start from an existing template• Make a copy of the .html of an existing template
• If you have publishing enabled then SharePoint will create the JS for you
• If you don’t have publishing enabled then you will need to copy both the .html and js
• Make sure to change the <title> tag to the name of your new template• Modify the code to fit your needs
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 27: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/27.jpg)
Display Template
DEMO@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 28: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/28.jpg)
Content Search Web Part
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 29: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/29.jpg)
Feature Availability
• The Content Search Web Part (CSWP) is only available for the following licenses:• SharePoint 2013 On-Prem Enterprise License• SharePoint Online Plan 2 (Office 365 E3/E4/E5)
• Don’t have an Enterprise License? • You can still use the Search Result Web Part (SRWP) and get similar
functionality (kind of)
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 30: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/30.jpg)
Functionality Matrix
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
Functionality CSWP SRWPProperty Mappings w/ Web Part settings X -Don’t show anything if no results X X (Requires custom control
template)Start displaying results from specified result #
X X
Caching Support X -Support Content Routing, choosing result table
X -
Paging support X XRefine/Filter Results X X
Note: Adapted from “Content Search WebPart vs Search Results Web Part” by ITUnity
![Page 31: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/31.jpg)
Content Search Building Blocks
• The Content Search Web Part is comprised of 2 elements:
1. Query BuilderGathers your data
2. Display TemplateBeautifies the output
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 32: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/32.jpg)
Query Builder
• Where you define what data to show• Can search across site
collections & subsites • Examples:
• Query all subsites• Query for data from a specific list• Query for all pictures• Query for all people
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 33: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/33.jpg)
Built-in Templates
• Multiple default templates to choose from• Built-in Slideshow functionality
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 34: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/34.jpg)
CSWP Default Slider
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 35: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/35.jpg)
Property Mapping
• Where you define what data to show• Map the managed properties to
the corresponding line in the display template
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 36: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/36.jpg)
Content Search Web Part (CSWP)
DEMO@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 37: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/37.jpg)
Search Results Web Part
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 38: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/38.jpg)
Search Results Web Part
• Use this if you don’t have access to the CSWP• Can accomplish all of the same functionality as CSWP• Requires more code and configuration• Doesn’t have property mappings
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 39: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/39.jpg)
Search Results Web Part
DEMO@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 40: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/40.jpg)
Provisioning
• Suggest creating/editing your display templates in a test environment if possible• If you have publishing enabled:
• Copy your .html file and any corresponding css/images to your production master page gallery/display templates folder
• If you don’t have publishing enabled:• Copy both the .html and .js and any corresponding css/images to
your production master page gallery/display templates folder
![Page 41: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/41.jpg)
What did we learn kids?
• Content Search Web Part is cool• Search Results Web Part is there for you if you don’t have
the licensing for CSWP• If your on SharePoint 2010 or Below upgrade to 2013 so
you can reap the benefits• Lots of out-of-the box templates available• Cool templates out there to download (for free)• Puts the power in your hands & eliminates the need for
custom code
![Page 42: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/42.jpg)
Thank You
@2016 ThriveFast | www.thrivefast.com
@aprildunnam | www.sharepointsiren.com
![Page 43: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/43.jpg)
Please Complete An Evaluation FormYour input is important!
You can access Evaluation Forms at:
http://TulsaTechFest.com
Fill them out!
You can win additional prizes!
Like a $50 Best Buy Gift Card!!
Winner drawn – Midnight, Sun Aug 7th!
![Page 44: Search Driven Solutions](https://reader036.vdocument.in/reader036/viewer/2022062522/587f1aae1a28ab350c8b5b49/html5/thumbnails/44.jpg)
Please help us!Thank our Sponsors: