search driven architecture in sharepoint

34
Search Driven Architecture in SharePoint Jim Lennox and Mark Passando Contact: [email protected] [email protected] https://www.linkedin.com/in/markpassando [email protected] https://www.linkedin.com/in/jim-lennox-15ab1442

Upload: jim-lennox

Post on 13-Apr-2017

85 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Search driven architecture in SharePoint

Search Driven Architecturein

SharePoint

Jim Lennox and Mark Passando

Contact:

[email protected] [email protected]://www.linkedin.com/in/markpassando

[email protected]://www.linkedin.com/in/jim-lennox-15ab1442

Page 2: Search driven architecture in SharePoint

Shoulders of Giants!• Bella Engen• Elio Struyf• Benjamin Niaulin• Marc Anderson

• Andrew Connell• Bob German

Page 3: Search driven architecture in SharePoint

The Search Problem…

Where are my keys?…

Page 4: Search driven architecture in SharePoint

The Search Solution

Ah! Always the last place I look…

Page 5: Search driven architecture in SharePoint

But at times…

It still feels like this…

Page 6: Search driven architecture in SharePoint

We want our customers…

to just do this…

Page 7: Search driven architecture in SharePoint

Definitions!I have seen various definitions:• Using Search as a data access technology• Using Search as the interface and presentation• Extending the current search center• Adding dynamic URL’s that have search queries imbedded in them

Page 8: Search driven architecture in SharePoint

Benefit of Search Driven Architecture• Less risky, no code deployment .vs. configurations• We troubleshoot results rather than code• Much faster than development cycles and code

• More over, we separate the content architects and developers from the SharePoint architects and developers

• No need to give everyone access to the content site collection

Page 9: Search driven architecture in SharePoint

Online versus On Premise• Product Catalog is distributed• Can create Managed Properties in a limited way• Only Text and Yes/No• Not Refinable or Sortable• Lists are not automatically re-indexed

• Crawls and indexing at the mercy of Microsoft’s schedule

Page 10: Search driven architecture in SharePoint

Pattern Reference (MVC)

Model

View

Controller

Page 11: Search driven architecture in SharePoint

Cross Site Publishing DetailedPublishing Site

Collection

Javacript plugins

Control Template Item Template

Consuming Site Collection

Page 12: Search driven architecture in SharePoint

Cross Site PublishingFour simple steps:1. Create content in libraries and lists in a site collection where cross-site publishing is enabled.

Enable these libraries and lists as catalogs.2. Crawl the content in your catalog-enabled libraries and lists. This will add the catalog content to

the search index.3. Add one or more Search Web Parts to the site collections where you want to display your

catalog content.4. When users view a page, the Search Web Parts issue queries to the search index. Query results

are returned from the search index, and shown in the Search Web Parts.

Page 13: Search driven architecture in SharePoint

Site Collection Settings

Page 14: Search driven architecture in SharePoint

Term Store

Page 15: Search driven architecture in SharePoint

News List

Page 16: Search driven architecture in SharePoint

Catalog Settings

Page 17: Search driven architecture in SharePoint

Blog Comments List

Page 18: Search driven architecture in SharePoint

Blog Comments Catalog Settings

Page 19: Search driven architecture in SharePoint
Page 20: Search driven architecture in SharePoint

Pub Demo Manage Catalog Connections

Page 21: Search driven architecture in SharePoint
Page 22: Search driven architecture in SharePoint

Content Search Web Parts

Page 23: Search driven architecture in SharePoint

Content Search Web Part

Page 24: Search driven architecture in SharePoint

Content Search Web Part

Page 25: Search driven architecture in SharePoint

Build the Query

Page 26: Search driven architecture in SharePoint

Final Query

Page 27: Search driven architecture in SharePoint

Display Template Hierarchy

<!–#           AddPostRenderCallback(ctx, function() {                        //code to execute            });_#–>There is another way to achieve this by using:ctx.OnPostRender = function() {};

Page 28: Search driven architecture in SharePoint

Managed Properties

Page 29: Search driven architecture in SharePoint

Managed Properties (Search Schema)

Page 30: Search driven architecture in SharePoint

Managed property Mapping Rules'Link URL'{Link URL}:'Path'

• first token represents the label of the property displayed in the toolpart under property mappings

• second token represents the display name of the variable reference to the actual managed metadata property. This variable will be used in the display template to access the value.

• last token is the actual name of the managed metadata that is used in display template. This is not the display name of the column but the name of the managed metadata property mapped to the crawled property in search schema.

Page 31: Search driven architecture in SharePoint

Property Mapping in Web Part

Page 32: Search driven architecture in SharePoint

Getting your Managed Properties

Page 33: Search driven architecture in SharePoint

Referencing Managed Properties_#= ctx.CurrentItem.<Current item property name> =#

Var currentItemIndex = ctx.CurrentItemIdx;Var authorVal = $getItemValue(ctx, "Author");ctx.ClientControl.get_nextUniqueId();ctx.CurrentItem.ListItemIDctx.CurrentItem.SPSiteUrlCtx.CurrentGroup.RowCount