Feb03

Richer search results through the use of property restrictions with SharePoint

A while back I wrote a couple posts like this one and that one about creating an advanced search using query string manipulation with JavaScript.  They introduced the idea about what is possible with some creative thinking, but it never covered the options available to actually put into the query string to take it to the next level.  This post covers some of those options and talks a little bit about the search behavior for MOSS (or Search Server).

Microsoft Office SharePoint Server boasts robust enterprise search capabilities that companies can immediately take advantage of once the product has been installed. Most users simply type a search query into the search box and then get results, but search box supports other syntax that can be used to get better results. If you don’t have MOSS, keep reading because everything also applies to Microsoft Search Server. The Express version can be downloaded for free and used to bring the same search capabilities to WSS 3.0.

By default, when you type in terms into the search box SharePoint will assume that there is an AND between all of the terms. But unlike some other search engines, Boolean operators are not supported out of the box. The underlying SharePoint search API supports Booleans, but taking advantage of it requires custom code or 3rd party web parts.

It is often overlooked, but search box also supports the use of restrictions. Just like the name implies, restrictions are specific criteria that limit the search results to only what is specified. The restrictions can be typed directly into the search box to allow for greater control of what is being searched.

To use a restriction, you would type into the search box in the form restriction:”restriction value”

Note that if the restriction value has more than one word it is necessary to use quotes. 

The following is a list of available restrictions and examples of each:

Property name

Allows queries to be performed against a specific metadata property.

city:”New York”

Scope

Specifies the scope to be searched.

scope: MyCustomScope

File type

Specifies the file type to be searched.

filetype:docx

Site

Filter by site.

site:http://intranet


Note: To use a custom property name, you'd need to create a managed property and map it to a custom field or fields. For more information on creating your own managed property check out:

http://blog.tylerholmes.com/2009/01/sharepoint-searching-with-managed.html

If multiple restrictions are used on the same property, SharePoint will assume an OR between the terms so that the results are a union of the terms. For example if you typed the following into the search box:

site:http://intranet site:http://extranet

The results that were returned would return all of the values from the site http://intranet and all of the results from the site://extranet. However, if multiple filters are applied to different properties the results would be the intersection of those values. So if the following was typed into the search box:

site://intranet/hr DocumentType:benefits

This would return all results from the HR site where the content includes the term “benefits” as the value for the property “DocumentType.”

As I mentioned at the beginning of this post this technique can be used in conjunction with Javascipt to achieve an advanced search that is more user friendly than the typical Advanced Search. But if all you want to do is use these techniques to simply show off for your friends about your mad search skillz that works too.

Published: Feb-03-09 | 0 Comments | 0 Links to this post

Feb02

Follow me on Twitter -- all the cool kids are doing it

A while back I relented and jumped in on the whole Web 2.0 bandwagon and joined Twitter.  If you are a Twitterer you can follow me as: JohnRossJr
 
Happy tweeting!
Published: Feb-02-09 | 0 Comments | 0 Links to this post

Feb02

Looking back on SPTechCon in San Francisco

Last week was the inaugural SPTechCon and the first one was held in one of my favorite places in the world - San Francisco.  SharePoint911 was well represented with 5 different speakers. 
 
It was a great conference and we had the chance to talk with many of the attendees. The sessions themselves showcased a good mix of technical and business topics related to SharePoint. I especially liked the emphasis on the business topics - definitely a big need for more discussions on those topics!
 
In addition, got to meet a lot cool SharePoint folks. Dux Sy (SharePoint PM guru and foodie), Darrin Bishop, Becky Isserman, and Tiffany Songvilay.  Tiffany has a line of cool SharePoint shirts that any of your SP nerds out there will appreciate.  Shane Young, Todd Klindt and I were walking down the EXTREMELY long halls of the hotel to our rooms. I was talking very loudly about ideas for SP shirts and Tiffany's ears perked up. Next thing we know we are in her hotel room checking out the shirts. Very cool person, but unfortunately I didn't have the chance to check out her session since we were both presenting at the same time.  You should definitely stop what you are doing now and go buy some shirts from her!!
 
After a busy week at the conference, also met up with Michael Noel who lives in SF and was willing to give the SP911 crew + Todd Klindt a brisk walking tour of his hometown.  Great way to cap off a great conference. 
 
The next SPTechCon will be in Boston at the end of June.  Hope to see you there!
 
BTW: For those of you who went to my search session and were looking for details about my demo they should be coming shortly. I had forgotten today was the Monday after the Super Bowl.  You have to cut me some slack, I'm a Steeler fan and it was a good night :-)
Published: Feb-02-09 | 0 Comments | 0 Links to this post