@info – The practical side of SharePoint

Posts Tagged ‘Managed Properties’

Mapping Properties in SP2007 for Search

Posted by sharepoinTony on August 9, 2010

Search is really one of the most needed, if not most important, components of a corporate intranet based on SharePoint. Why?  Because if you can’t find what you are looking for on the intranet, then the intranet is of little value.  Regardless of whether or not you accept this concept as true, the fact is that improving the search capabilities of your SharePoint farm will increase usage and acceptance. One of the things you can do to improve the search capabilities of your SharePoint farm is to make some (or all) of your site columns searchable in an Advanced Search page.  I know, I know, you can already find content based on the data in your site columns when searching now.  But how many documents are in your result set?  And, can your users search for specific site column content? If you have created Content Types and Site Columns that your users understand, then they will likely want to search for specific content based on them.  Here are the steps to take to enable searching directly on your custom site columns from an Advanced Search.  I created a new Advanced Search page, you could modify your Search Center Advanced Search page if so desired. To search by a column in any list or document library, you need to create a managed property and modify an Advanced Search box…and you will need to crawl your content to make it available. So let’s get to it.  My example is using a Site Column named “Product Name”.

Create a Managed Property

  1. Navigate to your SSP and select Search Settings
  2. Click on Metadata Properties under the Queries and Results section in the QuickLaunch
  3. Click on the Crawled Properties link in the tool bar
  4. Find your Site Column by typing it in the search box and clicking on the green & white arrow
  5. Capture the exact property name – in my case it is “ows_Product_x0020_Name”
  6. Go back to the Metadata Properties page
  7. Click on the New Managed Property link in the tool bar
  8. In the new form, please enter a name for the managed property, e.g. “ProductName”
  9. Select the correct data type, e.g. “Text”
  10. Click on the Add Mapping button to open up a “Crawled Property selection” WebPage dialog
  11. Type the name of your column in the “Crawled property name” field and click the “Find” button, e.g. type “Product”
  12. You will see the column name showing in the “Select a crawled property” list
  13. Select the appropriate column, e.g. “ows_Product_x0020_Name”
  14. Select the checkbox for Use in scopes if you plan to add this property to a Scope, otherwise leave it blank
  15. Press OK to complete the form
  16. Start a full crawl. This crawl will map column data to the managed property

We are halfway there, we now have a managed property that can be accessed by the Advanced Search web part.

Modify Advanced Search

To enable users to search for the column from the UI, you have to add the new property to the property drop-down in the Advanced Search web part they use.  Again, this can be any advanced search web part, however this only enables the web part you modify.  If you want users to select this property from any Advanced Search, you will have to modify each of them.

  1. Go to the search page (or your Search Center  & click on “Advanced Search”)
  2. Click on Site Actions and select Edit Page
  3. Click on “edit” and “Modify Shared Web Part” of your Advanced Search box
  4. On the right pane, find the Properties text box under Properties section (XML text box)
    • Advanced Search web part XML Properties

      Click image for large view

  5. Copy and paste the XML text into Notepad to edit the XML (I just think it is easier this way)
  6. Find the <PropertyDefs> node and add a new entry for your new Managed Property:
    • e.g. <PropertyDef Name=”ProductName” DataType=”Text” DisplayName=”Product Name” />
    • The DisplayName attribute  shows in the property drop-down
    • The PropertyDefName is the Managed Property Name you created in Step 8 of Create a Managed Property, above
  7. Find the  <ResultType> nodes and add a new entry:
    • e.g. <PropertyRef Name=”ProductName” />
  8. Copy and paste the XML text from notepad back into the XML text box
  9. Click OK
  10. Test your handy-work:
    1. Check that the Properties drop-down menu has the property displayed
    2. Execute a search using the new property

Now your savvy users can search for content with laser accuracy and obtain search results that focus on what they want without having to sift through extraneous results.

Posted in Administration, Install and Configure | Tagged: , | Leave a Comment »