let’s build a search-based application in sharepoint 2013

41
Let’s Build a Search-Based Application in SharePoint 2013 Baltimore SharePoint User Group July, 2013 Matthew J. Bailey

Upload: lynton

Post on 13-Feb-2016

37 views

Category:

Documents


2 download

DESCRIPTION

Let’s Build a Search-Based Application in SharePoint 2013. Baltimore SharePoint User Group July, 2013 Matthew J. Bailey. Session Agenda. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Let’s Build a Search-Based Application in SharePoint 2013

Let’s Build a Search-Based Application in SharePoint 2013

Baltimore SharePoint User Group

July, 2013Matthew J. Bailey

Page 2: Let’s Build a Search-Based Application in SharePoint 2013

Session AgendaWhat used to take days or weeks to program can now be done with simple Query Rules, Result Sources, Promoted Results & other new features of SharePoint 2013 search. See how we can create a functional, multi-media based search experience based on the user's needs and intended results.

Topics we going to cover in this session:• What is a search-based application?• New features of SharePoint 2013 search• Solve a real world (sort of) business case scenario with

search related functionality

Page 3: Let’s Build a Search-Based Application in SharePoint 2013

Matthew J. Bailey, MCTSSharePoint Business Analyst &

IT Project ManagerJDSU

I consider myself a “SharePoint All-Rounder”. My job tasks vary from Administration, Development, Training, Analyst, UAT and Project Management. My job changes daily

based on the crazy life of an IT fellow in corporate America, but it keeps things interesting!

I am not an expert with SharePoint search and have not worked FAST too much, however I have worked with SEO, search analytics and design and SharePoint in general

for several years. If I don’t know an answer to one of your questions, I will try to find out or point you in the right direction!

Oh, did I mention my “dry” sense of humor? No worries, you’re about to experience it while learning SharePoint at the

same time

Page 4: Let’s Build a Search-Based Application in SharePoint 2013

Special thanks to…• Eric Harlan for helping me with my

presentation setup on Azure• http://www.ericharlan.com/

Other notes…• Search in SharePoint 2013 is powerful.

Simple, yet complex. There is far more than what I will discuss today available to you. It is more than I can cover in one demo but I hope it is enough to peak your interest in it.

Page 5: Let’s Build a Search-Based Application in SharePoint 2013

What is a Search-Based or Search Driven Application?There are various definitions:• Using search as a data access technology. This is less about the UI and

more about the concept of using search features, queries and indexes to retrieve your data.

• Using search as the interface. This concept is more along the lines of presenting the user a web page that looks more like a search experience, whether it be a basic search with type-ahead features or a multiple field advanced search type of concept.

• Extending the existing search center. ADD MORE HERE TO BE CONSISTENT

• Adding URLs that have search queries in them. ADD MORE HERE TO BE CONSISTENT

Page 6: Let’s Build a Search-Based Application in SharePoint 2013

Benefits of Search-Based or Search Driven Applications• Less risk, no code deployments vs. configurations

• Easier to troubleshoot issues with results than code

• Must faster than coding

• More dynamic, flexible to gather and manipulate data

Page 7: Let’s Build a Search-Based Application in SharePoint 2013

What I got…

Page 8: Let’s Build a Search-Based Application in SharePoint 2013

What I wanted…

Page 9: Let’s Build a Search-Based Application in SharePoint 2013

Why do I love search in SharePoint 2013 sooooooooo much?• Intent based• Dynamic improvement• Ease of use• Massive flexibility• Visual Interest• Multimedia/format• Huge productivity increases/time savings• All of the expensive features that use to be in FAST are now free• Makes me look good to my boss when I create awesome searches• I can make it be exactly what I WANT! (is this all about control?

Enquiring minds would like to know…)

No one even paid me to say this!

Page 10: Let’s Build a Search-Based Application in SharePoint 2013

My Development Environment• Running on Windows Azure• 3 VMs – 1 AD, 1 SQL, 1 SP• Configured with very high performance settings• Do not have Office Web Apps installed, but will show an example

of how this functions from my Office 365 account.

*NOTE: Make sure to check out my link at the end of the presentation where I have included a list of several options to create your own SharePoint 2013 “playground” if you do not have one.

Page 11: Let’s Build a Search-Based Application in SharePoint 2013

Business CaseThere is always something going on at inCogNeato. Productivity is down, morale and employee motivation are low, profit margins aren’t high enough, we aren’t meeting our new client goals, operating costs are too high, etc. Frankly speaking, the cog business just isn’t what it use to be.

Hugh Jordeal (Executive Director Manager Supervisor) has held an important meeting discussing changes we need to make immediately in regards to the launch of the product that will save the company, the “NewCog5000”. Hugh has assigned certain tasks to some employees that need to be accomplished “pronto”. Unfortunately, no one is sure how to meet the lofty goals assigned and complaints are coming in to the help desk that no one can find anything on the intranet to do their job. Word makes it up to Hugh and IT gets a call that someone better fix the intranet or else. IT needs to whip up an application to help everyone out, and as usual, it was due yesterday.

No worries, I’ve got it all figured out (I think).

Page 12: Let’s Build a Search-Based Application in SharePoint 2013
Page 13: Let’s Build a Search-Based Application in SharePoint 2013

What are Our Requirements and/or Issues?• People are seeing incorrect results or cannot find items that are there.• People cannot find what they are looking for and some people are

searching for things they shouldn’t be • People don’t know how to search, need guidance or do not know

some things are there. • Important and related data is spread all over due to lack of

governance. • Experience is very lackluster, uninspiring, unmotivating.

Page 14: Let’s Build a Search-Based Application in SharePoint 2013

What are Our Solutions?• People are seeing incorrect results or cannot find items that are there.

Continuous Crawl

• People cannot find what they are looking for and some people are searching for things they shouldn’t be.

Result Sources & Query Rules

• Don’t know how to search, need guidance and don’t know some things are there.

Search Verticals & Refinement Panel

• Important and related data is spread all over due to lack of governance.

Content Search Web Part

• Experience is very lackluster, uninspiring, unmotivating.Design Manager / Display Templates

Page 15: Let’s Build a Search-Based Application in SharePoint 2013

IssuePeople are seeing incorrect results or cannot find items that are there.

SolutionContinuous Crawl• It is available only for content sources that use the SharePoint Sites

content source type.• Set intervals: The default interval is 15 minutes, but you can set

continuous crawls to occur at shorter intervals by using Windows PowerShell.

• Continuous crawls ensure content freshness: Unlike full and incremental crawls, multiple continuous crawls can run at the same time. For example, if one continuous crawl is processing a large update, another continuous crawl can start at the same time and crawl and index other content updates.

• Very resource intensive, need to plan for an architecture to support this.

• Once enabled, cannot be deleted but it can be disabled and/or re-enabled again.

Page 16: Let’s Build a Search-Based Application in SharePoint 2013

Demo Continuous Crawl

Page 17: Let’s Build a Search-Based Application in SharePoint 2013

Enable Continuous Crawl• As an Administrator for the Search service application, in Central

Administration, in the Application Management section, click Manage service applications.

• Click the Search service application.• On the Search Administration page, in the Quick Launch,

under Crawling, click Content Sources.• On the Search Service Application: Manage Content Sources page,

click the SharePoint content source for which you want to enable Continuous Crawl.

• In the Crawl Schedules section, select Enable Continuous Crawls, click OK.

• Verification: In the Search Service Application: Manage Content Sources page, verify that the Status column has the status Crawling Continuous.

• To change the frequency of the Continuous Crawl schedule, run SharePoint 2013 Management Shell as Administrator, enter PowerShell script (the 1 is 1 minute):• $ssa = Get-SPEnterpriseSearchServiceApplication

$ssa.SetProperty("ContinuousCrawlInterval",1)

• More specifics and issues can be found at: http://sympmarc.com/2013/05/13/sharepoint-2013s-search-continuous-crawl-an-enigma/

Page 18: Let’s Build a Search-Based Application in SharePoint 2013

IssuePeople cannot find what they are looking for and some people are searching for things they shouldn’t be. – Demonstration…

SolutionQuery RulesProvides the ability to influence the search results by overriding the term the user entered to force it to go to a certain result. They are processed under certain conditions.

They are composed of 4 items: 1. Context 2. Condition 3. Action 4. PublishingThey are applied to a Result Source. They can also be applied at the site, site collection or service application level.

*NOTE: If you want Query Rules to apply in all your websites and the search center, you should apply these at the web application level as the search center is actually a different site collection from your other sites.

Page 19: Let’s Build a Search-Based Application in SharePoint 2013

Demo Query Rules

Page 20: Let’s Build a Search-Based Application in SharePoint 2013

Apply Query Rules

Assist users in finding what they needAs an Administrator for the Search service application, in Central Administration, in the Application Management section, click Manage.• Select Query Rules• Add the Query Conditions• Select Result Blocks

What does this do?Prevents users from finding what they don’t need• Create Query Rules to inform users of “inappropriate searches”• Create Query Rules to help users find relevant data or misspellings

Page 21: Let’s Build a Search-Based Application in SharePoint 2013

Hover Panel / Document PreviewWith a full Enterprise installation of SharePoint 2013, you need to have an Office Web Apps server for the document previews to work. This is enabled by default in Office 365 however.

Due to the limitations of my demo environment I do not have this installation setup.

Page 22: Let’s Build a Search-Based Application in SharePoint 2013

How is this going so far? Too fast, too slow, too complex, too easy, too silly?

Page 23: Let’s Build a Search-Based Application in SharePoint 2013

Continuous Crawl CheckupLet’s go back and see if our information appears in search now• big expensive lunch• order my limo to airport• arrange my private jet

Page 24: Let’s Build a Search-Based Application in SharePoint 2013

IssueImportant and related data is spread all over due to lack of governance.

SolutionContent Search Web Part (CSWP)Like a pre-built search query to provide search results.• More functional than a Content Query Web Part (CQWP) as it has

more than 3 levels of criteria & can span SC• Can be offered to a “power user” to create meaningful results or be

beneficial to a developer in a highly restricted, Change Management “heavy” environment

• Offers refining, sorting, display options and much more with little or no code (well… KQL)

*NOTE: The Content Search Web Part is only available in the Enterprise edition of an on-premise/full trust installation of SharePoint 2013. As a replacement, there is an option to use the Search Results web part instead which has almost all of the same features (but not quite). Check out Benjamin Niaulin’s link here:http://en.share-gate.com/blog/sharepoint-2013-content-search-webpart

Page 25: Let’s Build a Search-Based Application in SharePoint 2013

IssueImportant and related data is spread all over due to lack of governance.

SolutionContent Search Web Part (CSWP)Like a pre-built search query to provide search results.• More functional than a Content Query Web Part (CQWP) as it has

more than 3 levels of criteria & can span SC• Can be offered to a “power user” to create meaningful results or be

beneficial to a developer in a highly restricted, Change Management “heavy” environment

• Offers refining, sorting, display options and much more with little or no code (well… KQL)

*NOTE: The Content Search Web Part is only available in the Enterprise edition of an on-premise/full trust installation of SharePoint 2013. As a replacement, there is an option to use the Search Results web part instead which has almost all of the same features (but not quite). Check out Benjamin Niaulin’s link here:http://en.share-gate.com/blog/sharepoint-2013-content-search-webpart

Page 26: Let’s Build a Search-Based Application in SharePoint 2013

Demo Content Search Web

Part

Page 27: Let’s Build a Search-Based Application in SharePoint 2013

Configuring a Content Search Web Part1.

Page 28: Let’s Build a Search-Based Application in SharePoint 2013

2.

Configuring a Content Search Web Part

Page 29: Let’s Build a Search-Based Application in SharePoint 2013

Explore Learning Keyword Query Language (KQL)To really make your applications “shine”, here are some popular terms to get you started:• XRANK – to assist with sorting• Wildcard * - to display variants of terms• Near - to display terms with slight variation (e.g. John vs. Jon)•ONEAR - http://msdn.microsoft.com/en-us/library/ee558911.aspx

• ContentClass=STS_Web – a specific Content Type from SharePoint (web, events, tasks, etc.)

These are good to get you started, but for more references check out these links:http://msdn.microsoft.com/en-us/library/hh644280(v=office.12).aspx http://msdn.microsoft.com/en-us/library/hh625658(v=office.12).aspxhttp://extreme-sharepoint.com/2011/10/28/sharepoint-keywordquery/

Page 30: Let’s Build a Search-Based Application in SharePoint 2013

Just in Case You Bored… Have a look at some XRANK sorting algorithms, fun for the whole family!

Page 31: Let’s Build a Search-Based Application in SharePoint 2013

Search VerticalsLink to anything but usually links to a custom search result page. The existing search verticals OOTB are:• An .aspx page with some search web parts• The Search Results web part configured to use a Result Source

Page 32: Let’s Build a Search-Based Application in SharePoint 2013

Demo Search Verticals

Page 33: Let’s Build a Search-Based Application in SharePoint 2013

Easily create your own Search Vertical with a Result Source:• Go to the Search Center pages library.• Copy a result page that already exists via Open in Explorer or

SharePoint Designer.• Rename the page to something related to its purpose.• Edit the page and the Search Results web part and change the Search

Criteria to a different Result Source (either one that already exists or a new one you created).

• Save, check-in/publish the page.• Go to search center Site Settings Search Settings.• Add a navigation link to your new custom search result page, and save.

Easily create a Search Vertical to other links:• Go to search center Site Settings Search Settings.• Add a navigation link to wherever you like, and save

Page 34: Let’s Build a Search-Based Application in SharePoint 2013

Refinement PanelOut of the box refiners provided, custom refiners available for adding from managed properties

Page 35: Let’s Build a Search-Based Application in SharePoint 2013

Demo Custom Refiners

Page 36: Let’s Build a Search-Based Application in SharePoint 2013

Adding refiners to the Refinement Panel web part in the Search Center

You can use a built-in managed property or create your own to use as a refiner.

Page 37: Let’s Build a Search-Based Application in SharePoint 2013

IssueThe interface is uninspiring and not standard to corporate design. The Graphic Design departmentis none too pleased…

SolutionDesign Manager / Display Templates• Quickly use a pre-built template from the installed selections or import

your own Design Package for a custom look.

Page 38: Let’s Build a Search-Based Application in SharePoint 2013

Display Templates (won’t go into but know they are there)• Display templates in SharePoint Server 2013 are templates used in

Search Web Parts• They show the results of a query made to the search index. • Display templates control which managed properties are shown in

the search results, and how they appear in the Web Part. • Each display template is made of two files: HTML file and .js file (use

to be the xslt designer in 2010)• Only Search Web Parts can use display templates (i.e., Search

Results, Content Search, Taxonomy Refinement) • http://msdn.microsoft.com/en-us/library/jj945138.aspx• http://www.youtube.com/watch?v=yC4LZapFdfY

Page 39: Let’s Build a Search-Based Application in SharePoint 2013

And so much more…

• All types of different rule variations• All types of different ways to display results• All types of concepts to personalize search per

user• All types of sorting on rules• All types of queries using KQL• All types of coding against the search object

model/CSOM, from apps, against the index, etc.

Page 40: Let’s Build a Search-Based Application in SharePoint 2013

Now that we understand search in SharePoint 2013, everyone is a happy family…

Page 41: Let’s Build a Search-Based Application in SharePoint 2013

Feel free to connect:

@matthewjbailey1http://www.matthewjbailey.comhttp://www.linkedin.com/in/[email protected]

Download my slides and get started at:http://www.matthewjbailey.com