Friday, December 11, 2009

Making SharePoint Search work for You

Jeremy Williams, Sr. Director, Modern Workplace

SharePoint 2007’s search engine has undergone huge improvements from SharePoint 2003; however, the typical user might not realize the power of SharePoint Search.  In my experience, most users use search by running simple queries.  While this gets the job done, there are a number of standard features available to users in SharePoint search that can help to both find information (advanced/property search), and keep abreast of information changes (search alerts).

By clicking on ‘Advanced Search’ to the right of SharePoint’s search box, a user will be taken to a query builder.  As seen below in Screenshot 1, it allows users to specify terms to include/exclude, search by language, and search by property values.  For instance, I could search for all of the documents that I have authored about SharePoint, excluding anything with the terms ‘2003’ or ‘contest’  by using the query seen in Screenshot 1 below, with the results shown in Screenshot 2.  I can achieve the same results by simply typing this query into the search text box:

SharePoint -2003 -contest author: “Jeremy Williams”

As you can see in the results, it has returned documents that contain the term SharePoint, and removed any results that contained 2003 or contest.  Also, it has only returned documents where my name is included in the Author tag.  Please note: some of the documents have others listed as the ‘author’.  This is indeed accurate and expected; in those cases, the indicated user is the original author of the document and I have (at some point in time) edited that document, so my name is now associated with it as an author too. 

Screenshot 1 - Advanced Query Builder

Screenshot 2 - Search results

If your organization has defined some custom columns, you can search against them along with the standard columns.  Simply type in the name of the column, followed by a colon and then your search term.  The trick here is to know the name of your company’s custom columns.  Luckily, your SharePoint Administrator can help out here!  An administrator has the ability to edit the query builder web part to include these custom columns.  This activity is done in the web part property pane by editing the list of properties (in XML).  After this change has been made, users can access your custom columns via the dropdown in the ‘Add property restrictions’ area of Advanced Search.

Now, let’s say that I want to know whenever a new result is added to my query, but I don’t want to remember to periodically search SharePoint and have to rebuild my query each time.  Search Alerts to the rescue!  A search alert takes the current query, and then automatically runs that query for the user each time SharePoint Search crawls content.  Whenever a change to that query occurs, SharePoint will send the user an email letting them know that their query has a new match.  To create a Search Alert, run a query then look at the upper right hand corner of the search results and click on the ‘Alert Me’ link.  Fill out the form (shown below in Screenshot 3) to your liking, and click Ok.  Voila! You’ve just created your own SharePoint alert.

 

Screenshot 3 – Create a new SharePoint Search Alert