I had reason to work with the SharePoint 2013 Search API via REST for the first time. I wanted to search for people, not documents. The key learning here is that you specify content sources via its GUID (or at least in this case). The following jQuery snippet shows how:
loadExpertsAsync: செயல்பாடு() { jQuery.support.cors = உண்மையான; $.ajax({ URL: இந்த.CreateFullApiUrl() + "?querytext='portals'&sourceid='b09a7990-05ea-4af9-81ef-edfab16c4e31'" + "&selectproperties='LinkedInProfileUrl,GoogleCirclesProfileUrl,BALargeProfilePictureUrls,BAGridPictures,WorkEmail,Skills,AboutMe,Interests,JobTitle,PastProjects,PictureURL,PreferredName,TwitterHandle,LinkedInProfileUrl,PreferredName,GoogleCirclesProfileUrl'" + "&rowlimit=99", முறை: "GET", headers: { "Accept": "application/json; odata=verbose" }, cache: தவறான, success: செயல்பாடு (result) {
என் வழக்கு, I’m running the API against SharePoint online. To get the GUID, I followed these steps:
- Access the SharePoint admin center
- Select “search” from the left hand navigation
- Select “Manage Result Sources”
- Select “Local People Results”
- Look at the URL.
My URL looked something like:
The sourceid parameter is what worked for me.
(I understand that the sourceid may actually be a sort of permanent thing with SP, ஆனால் நான் எப்போதும் எப்படியும் பார்க்க வேண்டும் 🙂 ).
</இறுதியில்>
மணிக்கு ட்விட்டரில் என்னை பின் http://www.twitter.com/pagalvin