45
Search-Driven Applications with SharePoint 2013 #SPSBE16 Max Melcher April 18 th , 2015

Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Embed Size (px)

Citation preview

Page 1: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Search-Driven Applications with SharePoint 2013

#SPSBE16

Max Melcher

April 18th, 2015

Page 2: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Pla

tin

um

Go

ldSilver

Thanks to our sponsors!

Page 3: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Maximilian Melcher

Maximilian Melcher (MCSE, MCPD) is a Managing Consultant for Alegri

International Services in Munich, Germany. Max is a specialist in SharePoint

technologies focused on search, social computing, web content management

and collaboration. Max has led SharePoint implementations for Dax 30

companies since 2009. Max’s free time is spent on twitter mostly with a good

coffee in his hands.

Twitter: @maxmelcher

Blog: http://melcher.it

Email: [email protected]

www: http://alegri.de

2

Page 4: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

SharePoint Search History

FAST Search for SharePoint

• Common Crawl and Query

Components

• FAST and SharePoint Farm

are tightly coupled

FAST ESP for SharePoint

• License Deal for FAST and

SharePoint 2007

• The original FAST

Integration was used

SharePoint 2013

Search• ONE Search Engine

• ONE Farm

• Simple, easy, powerful

6

Page 5: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

5

Page 6: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

6

Page 7: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

7

Page 8: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

2

Page 9: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

SharePoint 2013 Search

SharePoint 2013 Search

SharePoint

2010

Search

FAST

Search For

SharePoint

FAST

Technology

9

Page 10: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

10

SharePoint 2013 Search

Page 11: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

11

`

Exchange

SharePoint

Custom solution

Public API

Office Search Scenarios

Page 12: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Public API

Unit of scale/role boundary

HTTP

File shares

SharePoint

User profiles

Lotus Notes

Documentum

Exchange folders

Custom - BCS

SharePoint

SP Apps

Devices

Non-SP UX

13

Page 13: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Continuous crawling

SP2010 SP2013

14

Page 14: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Crawled Property Managed Property

DocId Partition Content Title Author Modified RefinableText1

111 0 Xyz... My lab ... Rune ... Some value

222 0 Abc... My Word ... Rune ... ...

333 1 .... ....

Crawled Properties

Managed Properties

Content

Processing

14

Page 15: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

KQL or FQL TermA TermB = free text search

TermA + TermB or TermA AND TermB = both terms must be present

Property Query author:”Max Melcher”

Good read: SharePoint Search Queries Explained by Mikael Svenson.

2

Query Language

Page 16: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Search-Driven Applications with SharePoint 2013

#SPSBE16

Max Melcher

April 18th, 2015

Page 17: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Modern Portals are based on Search Driven Apps

Dynamically aggregated content – no matter where

Individual, modern design

Performance / Scale

Tailored for users

fast, responsive, sexy17

Page 18: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

2

Page 19: Search-Driven Applications with SharePoint 2013 (#SBSBE16)
Page 20: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

2

Motivation: a typical use case

Page 21: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

2

Motivation: a typical use case

Page 22: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

2

Motivation: The reason

Page 23: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

100 persons go to the page 5 times a day

7 seconds time reduction

~130 days per year

~ 105.000€ lost profit

2

Motivation: Business Case

Page 24: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

24

Motivation: Search-based News Slider

Page 25: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

25

Motivation: Most searched documents

Page 26: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Available options for search driven applications

26

JavaScript Client Object Model (JSOM)

C# Client Object Model (CSOM)

REST

Server Side Object Model (SSOM)

Content By Search WebPart

Page 27: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Question: “all master data files for my location”

2

Content by Search WebPart: Example

Page 28: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

2

Content by Search WebPart

Page 29: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Variables will be replaced during query runtime: {searchTerms}

{Site} oder {Site.URL}

{Site.<Eigenschaft>}

{User} or {User.Name}

{User.<Eigenschaft>}

MSDN: Query Variables

? – If Operator {?{searchTerms} -ContentClass=urn:content-class:SPSPeople}

2

Query Variables

Page 30: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Question: “all master data files for my location”

Query: ContentType:”Projektstammblatt” AND Location:{User.Standort}

2

Content by Search WebPart: Beispiel

Page 31: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

31

JavaScript: Demo

Page 32: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

2

JSOM Fiddle

Free app: https://store.office.com/jsom-fiddle-WA104320165.aspx?lc=en-

gb&assetid=WA104320165&ui=en-US&rs=en-GB&ad=GB

Page 33: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Minimal example for JSOM:

var ctx = SP.ClientContext.get_current();var keywordQuery = new Microsoft.SharePoint.Client.Search.Query.KeywordQuery(ctx); keywordQuery.set_queryText("SharePoint"); var searchExecutor = new Microsoft.SharePoint.Client.Search.Query.SearchExecutor(ctx); var results = searchExecutor.executeQuery(keywordQuery);

ctx.executeQueryAsync(function (s, a) {// Success},function (s, e) {// Error}

);

2

JSOM

Page 34: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

https://intranet.demo.com/_api/search/query?querytext='SharePoint’

Accept Header for JSON: application/json;odata=verbose

Tool recommendation: Google Chrome PostMan (free)

34

REST: Demo

Page 35: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

35

Search Query Tool

Tool Recommendation: Search Query Tool

Page 36: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

36

CSOM: Demo

Page 37: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

37

CSOM: Code

Question: “all master data files for me”

Query: Author:"Max Melcher" OR ModifiedBy:"Max Melcher" ContentType:Projektstammblatt

Note: Query Variables do not work in apps.

Page 38: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

2

CSOM: Code

Page 39: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

2

Demo: Customer Directory

Awesome example: http://sympmarc.com/series/create-a-

simple-sharepoint-2013-employee-directory-on-

office365/ by Marc D Anderson

Page 40: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

40

Conclusion

PERFORMANCE

SCOPE

EASY but POWERFUL

HIGH AVAILABILITY

SECURITY TRIMMING

USER SEGMENTS /

CONTEX

HARDWARE

FRESHNESS

Page 41: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

41

Questions?

Page 42: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Thank you!

Page 45: Search-Driven Applications with SharePoint 2013 (#SBSBE16)

Implementing a better search experience

by Elio Struyf

- #SPSBE07

How to build your own Delve: combining machine learning, big data and SharePoint

by Joris Poelmans

- #SPSBE11

SPSBE Search Sessions