Thursday, October 15, 2009

Sharepoint search customization - Search-as-you-type (SayT), Find-As-You-Type(FAYT)

I was going through some case studies of search customizations in Sharepoint 2007. I stumbled upon something new!! JQuery for search in sharepoint. That is for implementing 'Search-as-you-type' (SayT) or Find-as-you-Type (FAYT) in sharepoint 2007. It looked so simple and prompted me to give it a try right away. This example uses JQuery and sharepoint web service to get the results for what you are typing. All at client side. No server side code needed. And some of the properties are configurable. Which makes it easier even after you deploy this on production. ;)

I implemented it right away, below are some of the screenshots.

As soon as you type 3 characters (can be configured), the JQuery will bring out all matching results.


You can also use the arrow button (or mouse pointer) and choose the right result and hit enter.



Steps to implement
Now coming back to the steps for implementing it. It is fairly simple, and can be done in a matter of few minutes.

1. Copy the below code,
















Go Search








2. Add a new Content Editor Web Part, which is available in SharePoint out-of-the-box, to a page.
3. Modify the newly added web part, use the Source Editor button in the properties task pane to add the downloaded code.
4. You can give the web part a nice title, Quickest Search.



So, with just these 4 steps you can implement SayT (Search-as-you-Type) functionality. There are some configurable properties which I am sure you will figure out by going through the script.

- Vighnesh Bendre

No comments: