Back in July, Jan Tielens demonstrated how to write an autocomplete mechanism for SharePoint search. Muhimbi then proposed a greatly enhanced version 2.
In our version, we have enhanced the code just a little to enable the following:
- paging: you can display results n at a time, and offer a link to go to the next page
- sorting: allow users to refresh results by alphabetical order, by department, etc. (you can add your own sorting criteria)
- search across all people metadata: let people either search on name, skills, office number, phone number, or any other indexed metadata you include in the search query
- Rich formatted results: display picture, presence awareness (Office Communicator) and links to internal or external systems (Yammer, Skype, Facebook, etc.)
- Refine search results: allow users to click on any metadata on the autocomplete search to drill down into specific criteria
Example of the final result:
To implement this version of the people search autocomplete, copy the code below, modify it as you need (mandatory: modify the server name), and paste it on a Content Editor web part.
Hi,
ReplyDeleteThis is great. I am not so good with Javascript, but is there a possibility to somehow group the results by, for example, searchscope?
Thnx,
Kevin.
Hi,
ReplyDeleteI have tried your code below but in the code file there are no comments about how your query was structured or anything of the sort.
Can you please send me a breakdown of where you got the user info as well as how the info is retrieved from SharePoint. I am relatively new to this.
My favorite tool to build my XMl Queries is this codeplex tool: http://sharepointsearchserv.codeplex.com/
ReplyDeleteHope this helps.
Hi ,
ReplyDeleteI am not able to find the script for people search.Ca you please provide the link to get the script
It's the yellow folder at the end of the post. Or use this URL: https://skydrive.live.com/redir.aspx?cid=4b4456f418bc36f2&resid=4B4456F418BC36F2!1830&parid=4B4456F418BC36F2!722&authkey=!
Delete