Top Menu

Showing posts with label Search. Show all posts
Showing posts with label Search. Show all posts

Wednesday, March 18, 2015

SharePoint 2013 People Search REST Call

You can find the whole API reference for Search REST API here. But when you have to do People Search then you need to put the context around your search Query and it will look like as follows:

Normal Search REST Call:
http://www.sharepointblue.com/SearchCenter/_api/search/query?querytext='*'

People Search REST Call: 
http://www.sharepointblue.com/SearchCenter/_api/search/query?querytext='*'&sourceid='b09a7990-05ea-4af9-81ef-edfab16c4e31'

Note: Before firing the People Search request, make sure User Profiles are crawlled inside the SharePoint by crawling: sps3://My_Site_host_URL

Ref: https://msdn.microsoft.com/en-us/library/office/jj163876.aspx

Thursday, July 12, 2012

SharePoint 2010 - Implementing Search in a List (No Code)

This article has also been published at the NothingButSharePoint.

Description: This tutorial explains how to implement search functionality in a list without any code.

I recently had a requirement of implementing a search page for a List where user pass a search phrase via Query String (e.g. http://SharePoint2010:1000/Pages/Search.aspx?q=hello) and the search page will display the results from a List, based on that search phrase. I am excited to share the technique where one don't have to write a code to develop such page and everything can be taken care of easily via SharePoint Designer.



This technique can also be used in SharePoint 2007 via SharePoint Designer 2007. However the Data View web part's options are available on Data View context menu instead of the tool bar.



Here is the Page's code with text field and button to pass the search string to the Search.aspx page.
<script type="text/javascript">
function Redirect()
{
    window.location = "http://SharePoint2010:1000/Pages/Search.aspx?q=" + document.getElementById('Text1').value;
}
</script>

<input name="Text1" type="text">
<button name="Abutton1" onclick="Redirect();">button</button>

Official SharePoint Documentation

I have recently contributed to the official SharePoint documentation for developement. Check it out here: https://docs.microsoft.com/en-us...