march spug
TRANSCRIPT
SPUG: SHAREPOINT 2013 SEARCHSub-Title: Customizing Search to Meet Your Company’s NeedsAuthor: Dan AdamsDate: March 3rd, 2015
Copyright © 2013 Rightpoint | Proprietary and Confidential 2
AGENDA
1 Let Me Introduce Myself
2 The Rules (yes there are rules!)
3 My Favorite SharePoint 2013 Search Features
4 Common Search Myths
5 Enough Talk…. Lets Build This Thing
Copyright © 2013 Rightpoint | Proprietary and Confidential 4
INTRODUCTION – WHO IS THIS GUY?
• Name: Dan Adams– Contact Info: [email protected]
– LinkedIn: https://www.linkedin.com/pub/dan-adams/50/876/108
• Profession: SharePoint Consultant
• Versions: SharePoint 2003, 2007, 2010, & 2013
• Personal Hobbies:– Skateboarding
– Tinkering With SharePoint
– JavaScript
– Video Games
Copyright © 2013 Rightpoint | Proprietary and Confidential 6
THE RULES FOR TODAY’S SESSION
• It is after 6 and we’re all here voluntarily, so lets have some fun
• There is plenty of pizza & soda so feel free to grab some!
• If you have a question on anything that I am running through, please feel free to throw up a hand or call out
• If the question is too specific or involved, I may ask that we sidebar it and discuss it after the presentation
Copyright © 2013 Rightpoint | Proprietary and Confidential 8
MY FAVORITE SHAREPOINT 2013 SEARCH FEATURES
• Content By Search– Who misses Content Query?
• Hover Panels– Utilizes Office Web Apps to preview
Office Documents without having to open them on hover
• Continuous Crawls– No need for a incremental schedule
– Maximum search index freshness
– Default every 15 minutes
• Result Sources– “It’s my content and I want it now!”
– Queries which can be applied to Search Web Parts to obtain the information you desire
• Term Driven Pages– “One Page To Rule Them All”
– Re-use & maintain one page to surface content
• Works Across Site Collections!
Copyright © 2013 Rightpoint | Proprietary and Confidential 9
MY FAVORITE SEARCH FEATURES… CONTINUED
• Visual Refiners– Everyone loves graphs (especially
Execs), so who wouldn’t love filtering by them?
• Display Templates– Control how your results look and act,
with well known web technologies
– No More XLST!
• Managed Properties Automatically Created With Site Columns
Copyright © 2013 Rightpoint | Proprietary and Confidential 11
COMMON SEARCH MYTHS
• “We already have a search center , I missed the boat!”– You don’t have to use your global search
center if one already exists, you can make your own!
• “My Result Source query isn’t working, I must be doing something wrong.”– The query builder is great, but there are
a few places that it straight out lies!
• A user has to put in some sort of search term in order to use Search– Although we can include a user’s input,
we don’t necessarily need it
– Think of search as a reservoir of captured information that you can bend to your will!
Copyright © 2013 Rightpoint | Proprietary and Confidential 12
ENOUGH TALK… SEARCH CENTER PREREQUISITES
• Enterprise Search Site Prerequisites– Site Collection: Publishing Feature must
be turned on
– Site Collection: SharePoint Server Standard Site Collection Features must be activated
Copyright © 2013 Rightpoint | Proprietary and Confidential 13
NOW THAT WERE SET UP FOR SUCCESS LETS…
• Create the search sub site
• Walkthrough the structure of a Enterprise Search Site
• Route our search queries to the newly created site
• Discuss Managed Properties vs Crawled Properties & where to find them
• Create a new Result Source
• Create a new Search Vertical
• Apply the new Result Source
• Add totals to our refiners
• Add a new Date Slider Refiner
• Dive into a display template!There are so many bullet points!!!!
(Don’t worry it’s scarier than it sounds)
Copyright © 2013 Rightpoint | Proprietary and Confidential 14
HOW IS SEARCH STRUCTURED
Control Template
Item Template
Search Vertical
RefinementPanel
Copyright © 2013 Rightpoint | Proprietary and Confidential 15
LETS ROUTE SEARCH QUERIES TO OUR NEW SITE
Copyright © 2013 Rightpoint | Proprietary and Confidential 16
MANAGED PROPERTIES VS CRAWLED PROPERTIES
• Display Templates & Result Sources use managed properties
• They have many configuration options (we will take a look in a sec)
• Many crawled properties can be mapped to a single Managed Property
• In 2013 site columns will automatically create an associated managed property
How about an example?
Family
Brother Mom Dad
Author
CreatedBy DocumentAuthor MailTo
Copyright © 2013 Rightpoint | Proprietary and Confidential 17
RESULT SOURCES
• Result Sources are applied to search web parts in order to tell it what you would like returned.
• Result Sources are responsible for what content to return, how to sort it, and the ranking model
• Some Resources To Reference:– Variables / Tokens which can be used:
https://technet.microsoft.com/en-us/library/jj683123.aspx
• “Hey Dan, you mentioned that the query builder lies, can we see a few examples?”
Copyright © 2013 Rightpoint | Proprietary and Confidential 18
SOME EXAMPLES WHERE THE QUERY BUILDER FALLS DOWN
The example below was created by using the Query Builder GUI to try and only return content where the content type display name equals announcement
• Wrong - Provided By Query Builder
– ContentType=0x0104*
• Correct Syntax
– SPContentType="Announcement"
The example below was created by using the Query Builder GUI to try and only return content where the content type ID equals SportingEvent
• Wrong - Provided By Query Builder
– ContentTypeId=0x01010200FA9874CABD1D2D47B1F3886B6DE16BCC*)
• Correct Syntax
– ContentTypeId:0x01010200FA9874CABD1D2D47B1F3886B6DE16BCC*
Copyright © 2013 Rightpoint | Proprietary and Confidential 19
LETS WALK THROUGH THIS SCENARIO
• “Our Director has asked us for a new search vertical called “Sporting Events which should only show sporting events from our site collection. He has also asked us to remove the video’s search vertical since it is no longer needed. Mr. Scott wants a refiner for sport and wants the totals to be shown for all refiners. Mr. Scott doesn’t stop asking for things so she also wants a date slider for the event”
Copyright © 2013 Rightpoint | Proprietary and Confidential 20
SO…. LETS KNOCK THIS OUT
• What needs to be done– Create a new search page called
eventresults
– Create a result source called Sporting Events• ContentTypeId:0x0100075507D00BC9714D90
205DAB58E1F2D9* AND Path:{SiteCollection.URL}
– Update the navigation to delete Videos
– Apply our Result Source
– Add Sport to the refinement panel
• Update the refiner display template to show totals
• Add a date slider refiner
Copyright © 2013 Rightpoint | Proprietary and Confidential 21
DISPLAY TEMPLATES
• Really we could spend an entire session on display templates, but I wanted to touch on:– how they are comprised
– best practices,
– walk through how you add a new managed property,
– starting syntax,
– how to view managed property values.
– What controls the number of items to return?
for(var p in ctx.CurrentItem){ console.log(p+”:”+$getItemValue(ctx,p));}
Copyright © 2013 Rightpoint | Proprietary and Confidential 22
LETS WALK THROUGH A VERY SIMPLE ONE
• Lets take a look at the suggest reads item template
Copyright © 2013 Rightpoint | Proprietary and Confidential 23
WHERE CAN I GET A COPY OF THESE NIFTY SLIDES?
• http://www.slideshare.net/dtadams123/march-spug