SlideShare a Scribd company logo
1 of 11
Grokking search via CSOM/JSOM and REST 
Mikael Svenson 
August 22 2014 
DNV GL © 2014 
DRAFT 
August 22 2014 SAFER, SMARTER, GREENER 
SOFTWARE 
SharePoint – Client Search API’s 
1
CSOM/JSOM 
 Client Side Object Model 
 JavaScript object model 
 http://msdn.microsoft.com/en-us/library/office/dn423226(v=office.15).aspx 
DNV GL © 2014 
DRAFT 
August 22 2014 
2
jQuery.ajax({ 
DNV GL © 2014 
DRAFT 
August 22 2014 
REST 
 http://msdn.microsoft.com/en-us/library/office/jj163876(v=office.15).aspx 
 Wrapper functions will help: 
http://www.skylinetechnologies.com/Blog/Article/2480/Using-the-SharePoint- 
2013-Search-REST-API.aspx 
3 
url: webUrl + "/_api/search/query?querytext='SharePoint'&rowlimit=10", 
type: "GET", 
headers: { "Accept": "application/json;odata=verbose" }, 
success: function (data) { 
var hitCount = data.d.query.PrimaryQueryResult.RelevantResults.TotalRows; 
var hitCountwithDuplicates = data.d.query.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates; 
var results = data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results; 
$.each(results, function () { 
$.each(this.Cells.results, function () { 
var propertyName = this.Key; 
var propertyValue = this.Value; 
}); 
}); 
/* get result blocks */ 
if (data.d.query.SecondaryQueryResults != null) { 
for (var i = 0; i < data.d.query.SecondaryQueryResults.results.length; i++) { 
var resultBlock = data.d.query.SecondaryQueryResults.results[i]; 
$.each(resultBlock.RelevantResults.Table.Rows.results, function () { 
$.each(this.Cells.results, function () { 
var propertyName = this.Key; 
var propertyValue = this.Value; 
}); 
}); 
} 
} 
}, 
error: function (data) { 
} 
});
SharePoint 2013 Search Query Tool 
 https://sp2013searchtool.codeplex.com/ 
DNV GL © 2014 
DRAFT 
August 22 2014 
4
Fiddler or similar to explore the JSON data 
DNV GL © 2014 
DRAFT 
August 22 2014 
5
Benefits of using CSOM 
 You can batch queries, optimizing query execution 
DNV GL © 2014 
DRAFT 
August 22 2014 
6
Batching with REST 
 Can be achieved using query rules and result blocks, but will limit the number of 
results per type to 10 
 That said, using a query rule with result blocks makes updates a lot easier if you 
need to change the search queries 
– Example: Intranet front page which shows 
– Top 4 articles 
– Top X blog posts 
– Latest user documents 
– etc 
DNV GL © 2014 
DRAFT 
August 22 2014 
7
Refiners with REST 
 Use the query tool 
 Specify the refiners you want returned 
 Pick values from the Refinement results table 
 Use the Refinement Token value 
and(ContentType:ǂǂ746578742f68746d6c3b20636861727365743d7574662d38,FileType:ǂǂ68746d6c) 
 The value is hex encoded 
and(ContentType:"text/html; charset=utf-8",FileType:html) 
DNV GL © 2014 
DRAFT 
August 22 2014 
8
Refiners in CSOM 
 Similar to REST, set the .Refiners property of the KeywordQuery object 
 Set the RefinementFilters property to add filters 
RefinementFilters.Add(<filter>) 
 http://techmikael.blogspot.no/2013/07/working-with-refiners-in-csomsharepoint. 
DNV GL © 2014 
DRAFT 
html 
August 22 2014 
9
Anonymous 
 Requires some configuration 
 http://msdn.microsoft.com/en-us/ 
library/office/jj163876(v=office.15).aspx#bk_AnonymousREST 
 Waldek Mastykarz is your man when it comes to anonymous and WCM 
 http://blog.mastykarz.nl/configuring-sharepoint-2013-search-rest-api-anonymous- 
 http://blog.mastykarz.nl/inconvenient-search-rest-api-anonymous-users/ 
 http://blog.mastykarz.nl/debugging-setting-properties-anonymous-search-rest-queries/ 
DNV GL © 2014 
DRAFT 
users/ 
August 22 2014 
10
Questions? 
SAFER, SMARTER, GREENER 
DNV GL © 2014 
DRAFT 
August 22 2014 
www.dnvgl.com 
11

More Related Content

What's hot

Project Up grade Ax 2012 R2 to Ax 2012 R3
Project Up grade Ax 2012 R2 to Ax 2012 R3Project Up grade Ax 2012 R2 to Ax 2012 R3
Project Up grade Ax 2012 R2 to Ax 2012 R3Miftahul Huda
 
Html5 essentials
Html5 essentialsHtml5 essentials
Html5 essentialsSEO SKills
 
Final Presentation
Final PresentationFinal Presentation
Final PresentationMahima Verma
 
The State of the Developer Ecosystem - .NET Conf Madrid 2018
The State of the Developer Ecosystem - .NET Conf Madrid 2018The State of the Developer Ecosystem - .NET Conf Madrid 2018
The State of the Developer Ecosystem - .NET Conf Madrid 2018Carlos Mendible
 
Restlet Framework NG
Restlet Framework NGRestlet Framework NG
Restlet Framework NGJerome Louvel
 
CodeMash 2013 Microsoft Data Stack
CodeMash 2013 Microsoft Data StackCodeMash 2013 Microsoft Data Stack
CodeMash 2013 Microsoft Data StackMike Benkovich
 

What's hot (10)

Project Up grade Ax 2012 R2 to Ax 2012 R3
Project Up grade Ax 2012 R2 to Ax 2012 R3Project Up grade Ax 2012 R2 to Ax 2012 R3
Project Up grade Ax 2012 R2 to Ax 2012 R3
 
Html5 essentials
Html5 essentialsHtml5 essentials
Html5 essentials
 
java Developing using asp.net
java Developing using asp.netjava Developing using asp.net
java Developing using asp.net
 
Next2019
Next2019Next2019
Next2019
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 
The State of the Developer Ecosystem - .NET Conf Madrid 2018
The State of the Developer Ecosystem - .NET Conf Madrid 2018The State of the Developer Ecosystem - .NET Conf Madrid 2018
The State of the Developer Ecosystem - .NET Conf Madrid 2018
 
Introduction to Grails
Introduction to GrailsIntroduction to Grails
Introduction to Grails
 
Restlet Framework NG
Restlet Framework NGRestlet Framework NG
Restlet Framework NG
 
CodeMash 2013 Microsoft Data Stack
CodeMash 2013 Microsoft Data StackCodeMash 2013 Microsoft Data Stack
CodeMash 2013 Microsoft Data Stack
 
[TestWarez 2017] Automated Testing for Common Errors and Difference Recogniti...
[TestWarez 2017] Automated Testing for Common Errors and Difference Recogniti...[TestWarez 2017] Automated Testing for Common Errors and Difference Recogniti...
[TestWarez 2017] Automated Testing for Common Errors and Difference Recogniti...
 

Similar to Share point – client search api’s

RESTful Web Development with CakePHP
RESTful Web Development with CakePHPRESTful Web Development with CakePHP
RESTful Web Development with CakePHPAndru Weir
 
Timings API: Performance Assertion during the functional testing
 Timings API: Performance Assertion during the functional testing Timings API: Performance Assertion during the functional testing
Timings API: Performance Assertion during the functional testingPetrosPlakogiannis
 
SharePoint - Display Templates Overview
SharePoint - Display Templates OverviewSharePoint - Display Templates Overview
SharePoint - Display Templates OverviewMikael Svenson
 
Adopting AnswerModules ModuleSuite
Adopting AnswerModules ModuleSuiteAdopting AnswerModules ModuleSuite
Adopting AnswerModules ModuleSuiteAnswerModules
 
REST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptxREST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptxJason452803
 
Web Application Development using PHP and MySQL
Web Application Development using PHP and MySQLWeb Application Development using PHP and MySQL
Web Application Development using PHP and MySQLGanesh Kamath
 
AngularJS with TypeScript and Windows Azure Mobile Services
AngularJS with TypeScript and Windows Azure Mobile ServicesAngularJS with TypeScript and Windows Azure Mobile Services
AngularJS with TypeScript and Windows Azure Mobile ServicesRainer Stropek
 
Usability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET FeaturesUsability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET FeaturesPeter Gfader
 
RESTHeart - Modern runtime for microservices with instant Data API on MongoDB.
RESTHeart - Modern runtime for microservices with instant Data API on MongoDB.RESTHeart - Modern runtime for microservices with instant Data API on MongoDB.
RESTHeart - Modern runtime for microservices with instant Data API on MongoDB.SoftInstigate
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015Pushkar Chivate
 
بررسی چارچوب جنگو
بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگوrailsbootcamp
 
Charla desarrollo de apps con sharepoint y office 365
Charla   desarrollo de apps con sharepoint y office 365Charla   desarrollo de apps con sharepoint y office 365
Charla desarrollo de apps con sharepoint y office 365Luis Valencia
 
Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4Umar Ali
 
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!Evan Mullins
 
Reach End Users With Next Generation Web Applications
Reach End Users With Next Generation Web ApplicationsReach End Users With Next Generation Web Applications
Reach End Users With Next Generation Web ApplicationsJeff Blankenburg
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Matt Raible
 

Similar to Share point – client search api’s (20)

RESTful Web Development with CakePHP
RESTful Web Development with CakePHPRESTful Web Development with CakePHP
RESTful Web Development with CakePHP
 
Timings API: Performance Assertion during the functional testing
 Timings API: Performance Assertion during the functional testing Timings API: Performance Assertion during the functional testing
Timings API: Performance Assertion during the functional testing
 
SharePoint - Display Templates Overview
SharePoint - Display Templates OverviewSharePoint - Display Templates Overview
SharePoint - Display Templates Overview
 
Adopting AnswerModules ModuleSuite
Adopting AnswerModules ModuleSuiteAdopting AnswerModules ModuleSuite
Adopting AnswerModules ModuleSuite
 
REST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptxREST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptx
 
Web Application Development using PHP and MySQL
Web Application Development using PHP and MySQLWeb Application Development using PHP and MySQL
Web Application Development using PHP and MySQL
 
Angular js
Angular jsAngular js
Angular js
 
AngularJS with TypeScript and Windows Azure Mobile Services
AngularJS with TypeScript and Windows Azure Mobile ServicesAngularJS with TypeScript and Windows Azure Mobile Services
AngularJS with TypeScript and Windows Azure Mobile Services
 
Usability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET FeaturesUsability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET Features
 
RESTHeart - Modern runtime for microservices with instant Data API on MongoDB.
RESTHeart - Modern runtime for microservices with instant Data API on MongoDB.RESTHeart - Modern runtime for microservices with instant Data API on MongoDB.
RESTHeart - Modern runtime for microservices with instant Data API on MongoDB.
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
 
بررسی چارچوب جنگو
بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگو
 
AngularJS 1.x training
AngularJS 1.x trainingAngularJS 1.x training
AngularJS 1.x training
 
Charla desarrollo de apps con sharepoint y office 365
Charla   desarrollo de apps con sharepoint y office 365Charla   desarrollo de apps con sharepoint y office 365
Charla desarrollo de apps con sharepoint y office 365
 
Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4
 
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
 
Reach End Users With Next Generation Web Applications
Reach End Users With Next Generation Web ApplicationsReach End Users With Next Generation Web Applications
Reach End Users With Next Generation Web Applications
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
Mean stack Magics
Mean stack MagicsMean stack Magics
Mean stack Magics
 
Developing With Data Technologies
Developing With Data TechnologiesDeveloping With Data Technologies
Developing With Data Technologies
 

More from Mikael Svenson

Nyheter i O365-porteføljen og Office 2016
Nyheter i O365-porteføljen og Office 2016Nyheter i O365-porteføljen og Office 2016
Nyheter i O365-porteføljen og Office 2016Mikael Svenson
 
Office graph - Is it your cup of tea?
Office graph - Is it your cup of tea?Office graph - Is it your cup of tea?
Office graph - Is it your cup of tea?Mikael Svenson
 
SharePoint - The hybrid story and beyond
SharePoint - The hybrid story and beyondSharePoint - The hybrid story and beyond
SharePoint - The hybrid story and beyondMikael Svenson
 
Norwegian SharePoint Community - What happened at Ignite
Norwegian SharePoint Community - What happened at IgniteNorwegian SharePoint Community - What happened at Ignite
Norwegian SharePoint Community - What happened at IgniteMikael Svenson
 
SharePoint Search Queries Explained - SPSSthlm 2015
SharePoint Search Queries Explained - SPSSthlm 2015SharePoint Search Queries Explained - SPSSthlm 2015
SharePoint Search Queries Explained - SPSSthlm 2015Mikael Svenson
 
Techniques for Creating Social Refiners in SharePoint Search
Techniques for Creating Social Refiners in SharePoint SearchTechniques for Creating Social Refiners in SharePoint Search
Techniques for Creating Social Refiners in SharePoint SearchMikael Svenson
 
Search Queries Explained – A Deep Dive into Query Rules, Query Variables and ...
Search Queries Explained – A Deep Dive into Query Rules, Query Variables and ...Search Queries Explained – A Deep Dive into Query Rules, Query Variables and ...
Search Queries Explained – A Deep Dive into Query Rules, Query Variables and ...Mikael Svenson
 
Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013Mikael Svenson
 
SharePoint Saturday Belgium - Contextual Search and More..
SharePoint Saturday Belgium - Contextual Search and More..SharePoint Saturday Belgium - Contextual Search and More..
SharePoint Saturday Belgium - Contextual Search and More..Mikael Svenson
 
Nsc 2011 09-21 search 101
Nsc 2011 09-21 search 101Nsc 2011 09-21 search 101
Nsc 2011 09-21 search 101Mikael Svenson
 
Er gratis søk egentlig noe tess
Er gratis søk egentlig noe tessEr gratis søk egentlig noe tess
Er gratis søk egentlig noe tessMikael Svenson
 

More from Mikael Svenson (11)

Nyheter i O365-porteføljen og Office 2016
Nyheter i O365-porteføljen og Office 2016Nyheter i O365-porteføljen og Office 2016
Nyheter i O365-porteføljen og Office 2016
 
Office graph - Is it your cup of tea?
Office graph - Is it your cup of tea?Office graph - Is it your cup of tea?
Office graph - Is it your cup of tea?
 
SharePoint - The hybrid story and beyond
SharePoint - The hybrid story and beyondSharePoint - The hybrid story and beyond
SharePoint - The hybrid story and beyond
 
Norwegian SharePoint Community - What happened at Ignite
Norwegian SharePoint Community - What happened at IgniteNorwegian SharePoint Community - What happened at Ignite
Norwegian SharePoint Community - What happened at Ignite
 
SharePoint Search Queries Explained - SPSSthlm 2015
SharePoint Search Queries Explained - SPSSthlm 2015SharePoint Search Queries Explained - SPSSthlm 2015
SharePoint Search Queries Explained - SPSSthlm 2015
 
Techniques for Creating Social Refiners in SharePoint Search
Techniques for Creating Social Refiners in SharePoint SearchTechniques for Creating Social Refiners in SharePoint Search
Techniques for Creating Social Refiners in SharePoint Search
 
Search Queries Explained – A Deep Dive into Query Rules, Query Variables and ...
Search Queries Explained – A Deep Dive into Query Rules, Query Variables and ...Search Queries Explained – A Deep Dive into Query Rules, Query Variables and ...
Search Queries Explained – A Deep Dive into Query Rules, Query Variables and ...
 
Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013
 
SharePoint Saturday Belgium - Contextual Search and More..
SharePoint Saturday Belgium - Contextual Search and More..SharePoint Saturday Belgium - Contextual Search and More..
SharePoint Saturday Belgium - Contextual Search and More..
 
Nsc 2011 09-21 search 101
Nsc 2011 09-21 search 101Nsc 2011 09-21 search 101
Nsc 2011 09-21 search 101
 
Er gratis søk egentlig noe tess
Er gratis søk egentlig noe tessEr gratis søk egentlig noe tess
Er gratis søk egentlig noe tess
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Share point – client search api’s

  • 1. Grokking search via CSOM/JSOM and REST Mikael Svenson August 22 2014 DNV GL © 2014 DRAFT August 22 2014 SAFER, SMARTER, GREENER SOFTWARE SharePoint – Client Search API’s 1
  • 2. CSOM/JSOM  Client Side Object Model  JavaScript object model  http://msdn.microsoft.com/en-us/library/office/dn423226(v=office.15).aspx DNV GL © 2014 DRAFT August 22 2014 2
  • 3. jQuery.ajax({ DNV GL © 2014 DRAFT August 22 2014 REST  http://msdn.microsoft.com/en-us/library/office/jj163876(v=office.15).aspx  Wrapper functions will help: http://www.skylinetechnologies.com/Blog/Article/2480/Using-the-SharePoint- 2013-Search-REST-API.aspx 3 url: webUrl + "/_api/search/query?querytext='SharePoint'&rowlimit=10", type: "GET", headers: { "Accept": "application/json;odata=verbose" }, success: function (data) { var hitCount = data.d.query.PrimaryQueryResult.RelevantResults.TotalRows; var hitCountwithDuplicates = data.d.query.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates; var results = data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results; $.each(results, function () { $.each(this.Cells.results, function () { var propertyName = this.Key; var propertyValue = this.Value; }); }); /* get result blocks */ if (data.d.query.SecondaryQueryResults != null) { for (var i = 0; i < data.d.query.SecondaryQueryResults.results.length; i++) { var resultBlock = data.d.query.SecondaryQueryResults.results[i]; $.each(resultBlock.RelevantResults.Table.Rows.results, function () { $.each(this.Cells.results, function () { var propertyName = this.Key; var propertyValue = this.Value; }); }); } } }, error: function (data) { } });
  • 4. SharePoint 2013 Search Query Tool  https://sp2013searchtool.codeplex.com/ DNV GL © 2014 DRAFT August 22 2014 4
  • 5. Fiddler or similar to explore the JSON data DNV GL © 2014 DRAFT August 22 2014 5
  • 6. Benefits of using CSOM  You can batch queries, optimizing query execution DNV GL © 2014 DRAFT August 22 2014 6
  • 7. Batching with REST  Can be achieved using query rules and result blocks, but will limit the number of results per type to 10  That said, using a query rule with result blocks makes updates a lot easier if you need to change the search queries – Example: Intranet front page which shows – Top 4 articles – Top X blog posts – Latest user documents – etc DNV GL © 2014 DRAFT August 22 2014 7
  • 8. Refiners with REST  Use the query tool  Specify the refiners you want returned  Pick values from the Refinement results table  Use the Refinement Token value and(ContentType:ǂǂ746578742f68746d6c3b20636861727365743d7574662d38,FileType:ǂǂ68746d6c)  The value is hex encoded and(ContentType:"text/html; charset=utf-8",FileType:html) DNV GL © 2014 DRAFT August 22 2014 8
  • 9. Refiners in CSOM  Similar to REST, set the .Refiners property of the KeywordQuery object  Set the RefinementFilters property to add filters RefinementFilters.Add(<filter>)  http://techmikael.blogspot.no/2013/07/working-with-refiners-in-csomsharepoint. DNV GL © 2014 DRAFT html August 22 2014 9
  • 10. Anonymous  Requires some configuration  http://msdn.microsoft.com/en-us/ library/office/jj163876(v=office.15).aspx#bk_AnonymousREST  Waldek Mastykarz is your man when it comes to anonymous and WCM  http://blog.mastykarz.nl/configuring-sharepoint-2013-search-rest-api-anonymous-  http://blog.mastykarz.nl/inconvenient-search-rest-api-anonymous-users/  http://blog.mastykarz.nl/debugging-setting-properties-anonymous-search-rest-queries/ DNV GL © 2014 DRAFT users/ August 22 2014 10
  • 11. Questions? SAFER, SMARTER, GREENER DNV GL © 2014 DRAFT August 22 2014 www.dnvgl.com 11