Social Refiners 
Mikael Svenson –Principal Consultant 
@mikaelsvenson–mikael.svenson@puzzlepart.com –techmikael.blogspot.com
Pre-requisites 
•A good understanding of search (FQL helps) 
•A good understanding of Display Template logic 
•Programming skills –JavaScript
Agenda 
•Define social refiners 
•Create a Department refiner for content 
•Create a “fake” refiner to filter on social distance
Copy of query I wrote in 2009 
(<100>amsterdam) OR (<50>"dutchcapital" OR "veniceof the north") OR (<30>"coffee shop city") 
IN CONTEXT(<30>location=@Home AND <50>device=smartphone AND <20>freshness=30days AND <50>hobby=SHAREPOINT)
Let’s start with something easier 
•“Close to you” 
•Someone you work with –social distance 
•Static approach (based on structure) 
•Same department –department already a refiner for people 
•Same leader 
•Dynamic approach (based on actions) 
•Office graph 
•Those you follow 
•Cross boundaries
First things first 
•People search –change the model to get social distance 
•Default model will put a high emphasis on organization level
Page Render Cycle 
•Page renders 
•Control/item template starts rendering 
•Loops over data 
•Outputs HTML in DOM 
•PostRenderfunctions 
•No control which web part renders first 
•How do you know if something is in the DOM?
DEMO: Department refiner 
•Explain logic 
•OR refiner using OOB functions 
•Go over the code 
•Wrap output in function, render once JS is done 
•Batch lookup department per author 
•Map and render 
•Issues with 2010 content, display name vs login
DEMO: Documents by me / close 
•Explain logic 
•Refiner which is not a refiner –no count 
•Extend .jsto allow FQL 
•Explain the road to discovery 
•Explain how the # works, over to query 
•.debug files 
•IE 2048 issue 
•Show FQL 
•Get user -> department -> colleagues 
•Alternative, use graph query + those you work with 
•Level 1 and level 2 colleagues?
Improvements 
•Caching could be an idea!
Summary 
If you don’t know which refiner to put on your page, try a social one so people can narrow down to content which are more likely useful to them based on social distance
Q & A

Spca2014 social refiners svenson

  • 2.
    Social Refiners MikaelSvenson –Principal Consultant @mikaelsvenson–mikael.svenson@puzzlepart.com –techmikael.blogspot.com
  • 3.
    Pre-requisites •A goodunderstanding of search (FQL helps) •A good understanding of Display Template logic •Programming skills –JavaScript
  • 4.
    Agenda •Define socialrefiners •Create a Department refiner for content •Create a “fake” refiner to filter on social distance
  • 5.
    Copy of queryI wrote in 2009 (<100>amsterdam) OR (<50>"dutchcapital" OR "veniceof the north") OR (<30>"coffee shop city") IN CONTEXT(<30>location=@Home AND <50>device=smartphone AND <20>freshness=30days AND <50>hobby=SHAREPOINT)
  • 6.
    Let’s start withsomething easier •“Close to you” •Someone you work with –social distance •Static approach (based on structure) •Same department –department already a refiner for people •Same leader •Dynamic approach (based on actions) •Office graph •Those you follow •Cross boundaries
  • 7.
    First things first •People search –change the model to get social distance •Default model will put a high emphasis on organization level
  • 8.
    Page Render Cycle •Page renders •Control/item template starts rendering •Loops over data •Outputs HTML in DOM •PostRenderfunctions •No control which web part renders first •How do you know if something is in the DOM?
  • 9.
    DEMO: Department refiner •Explain logic •OR refiner using OOB functions •Go over the code •Wrap output in function, render once JS is done •Batch lookup department per author •Map and render •Issues with 2010 content, display name vs login
  • 10.
    DEMO: Documents byme / close •Explain logic •Refiner which is not a refiner –no count •Extend .jsto allow FQL •Explain the road to discovery •Explain how the # works, over to query •.debug files •IE 2048 issue •Show FQL •Get user -> department -> colleagues •Alternative, use graph query + those you work with •Level 1 and level 2 colleagues?
  • 11.
  • 12.
    Summary If youdon’t know which refiner to put on your page, try a social one so people can narrow down to content which are more likely useful to them based on social distance
  • 14.