Tuesday 29 March 2011

Search MSDN or TechNet on Bing

Today, I found an interesting blog on CRM team blog which could be helpful to anyone who is wokring on Microsoft technologies. So I thought to share the same content overhere. Please visit the below link to have filtered search for Dynamics CRM 2011 SDK and implementation guide.


Non CRM people can refer the below example.

How can I make new filtered search favorites?

These search filter favorites work because Bing indexes the MSDN and TechNet content using search tags embedded in the metadata of the document. Each page has several Search.MSCategory meta tags that describe the hierarchy that the page appears in the MSDN or TechNet table of contents. Once you identify the page that represents the true parent node for the portion of the MSDN table of contents, you can create a similar filtered search favorite. The tricky part is identifying that true parent node.
To create a filtered search favorite:
1. Navigate to MSDN or TechNet and identify a topic area you are interested in. In this example, let’s say I want to focus on the Silverlight documentation.
2. Examine the Table of contents. This works best using the “Classic” view.
3. Locate a topic below the main table of contents node. I’ll choose the XAML topic.
4. If you right click on the topic and use the context menu to choose View Source, in the area where you might expect to find meta tags you will see this:
<!-- Looking for metadata? Use the robot view instead http://currentsite/currenturl(robot).aspx -->
5. Following those instructions, open this page: http://msdn.microsoft.com/en-us/library/cc189054(VS.95)(robot).aspx
6. Now right click on the page and use the context menu to choose View Source.
7. Now you will see lots of meta tags. Look for the ones with the name value of Search.MSCategory
For this page you should find the following:
<<meta name="Search.MSCategory" content="ms310241" xmlns="http://www.w3.org/1999/xhtml" />
<meta name="Search.MSCategory" content="aa139615" xmlns="http://www.w3.org/1999/xhtml" />
<meta name="Search.MSCategory" content="cc838813" xmlns="http://www.w3.org/1999/xhtml" />
<meta name="Search.MSCategory" content="ff630996" xmlns="http://www.w3.org/1999/xhtml" />
Each of these represents the true parent in the hierarchy of the ‘anchor’ pages in the table of contents. At the top of the XAML overview page in the classic view you can see this visually:
MSDN > MSDN Library>.NET Development > Silverlight > XAML
But these anchor pages in the table of contents don’t necessary represent the true parent of the hierarchy that is indexed. To search for only Silverlight documentation we are interested in the value of the content attribute in the second meta tag from the bottom: cc838813.
If you open this page directly, (using http://msdn.microsoft.com/en-us/library/cc838813.aspx) you will see a strange page with the title @No Title, but this strange page is actually the root table of contents node according to the meta tags.
8. Now that you have identified the ‘true’ parent, With that page number you can create a search filter:
[Search Terms] meta:Search.MSCategory("cc838813") site:msdn.microsoft.com
9. Go to http://www.bing.com and type the search filter into the search field. Execute the search and save the resulting page as a favorite.

You have now created a search favorite for the Silverlight documentation.

No comments:

Post a Comment