Monday, August 15, 2011

SharePoint Search using Scope

In SP, you can easily slice and dice your content to search a specific document library or list. Last week, I posted an article that can be used when you want to search a given list on specific columns that are not exposed directly by METADATA.

In my experience, the below article would cover several business needs. These needs are specific to the clients I have worked with on Search. One of the needs is that we have so much of simillar data that when we search we get too much of results and not directly from the library that we are interested to get the data from. The other need is I need to get a list of all documents that have been modified/created/ by a user/date in this document library. You could have used a view here, but then that is specific and the user has to be educated. This cannot be dynamic.

Today, I am going to be documenting an Out of the BOX Scope feature that can be used perform a search specific to library/List/Sub Site. A user with site collection admin perms, can go to Site Settings->Search Scopes and then add a new Scope. Once you add a new item, then you can define the rules that are specific to the new Scope. After this, you have a choice of displaying this new Scope element in search box next on the top of the page and in the Basic Search Center's Advanced Search Page.

Assuming you have managed to get the above steps completed. Now, you need to go back to Central Admin- Services on Server-> Search-> Search and do a full crawl to have the new scope reflected in the Search Center. Once this has been completed, go back to Basic Search Center's Advanced Search Center page and you will be able use the new scope.
The same scope can also be developed using Visual Studio. This may be necessary when you have to repeat a process in multiple environments. In addition, some organizations don’t allow any direct updates so in that case you would need to write this scope via Feature and deploy it in your appropriate environment.
Next topic: Best Bets!

No comments:

Post a Comment