Sdílet prostřednictvím


FAST 2010 for SharePoint 2010 Managed Properties

Creating Managed Properties for Advanced Search

I have recently be doing quite a bit of work with FAST 2010 for SharePoint 2010 (F4SP). Like many SharePoint geeks I’ve configured SharePoint Search many many times for customers over the years working here at the MTC. As I started to work with F4SP, I naturally wanted to some of the same things I did with SharePoint 2007 or even SharePoint 2010. One of the first things customer usually ask me to do is to setup up the advanced search page so they can do property searches based on their custom metadata columns they’ve placed on their content type or list definitions.  Going about this is a little different that it is in SharePoint 2007 or SharePoint 2010. So, I thought I’d write this blog for my fellow SharePoint geeks on how to go about it.

I am going to make the assumption that have already installed and configured F4SP.

SharePoint 2010 Site Setup

For this example, the first thing I did was create a SharePoint 2010 Web Application called fastwebapp using the Team Site template.

 

 

Next I uploaded a mix of dummy documents to the Shared Documents.

Next, I added  two columns to the Shared Documents library. PII for Personally Identifiable Information and Confidentiality level.

 

Here we can see the final column store information on the Shared Documents Library.

 

  Finally, I go into the Shared Documents Library in Datasheet view and set the values of those to columns.  

Next, I go into the SharePoint Central Administration > Manage Service Applications > FAST Content SSA > Content Sources. There I add my SharePoint Content Source and initiate a full crawl of the content, not this will be our first crawl to get this configured correctly.

Best Practices Note: I have conducted a number of labs here at the MTC where I was crawling a large volume of content. When you add managed properties for advanced search in FS4SP, just like SharePoint 2007 or 2010, you will have to do a full re-crawl of the corpus to get those fields into the index. So, If you know upfront what columns you want to use in your advanced search page, I recommend setting up a smaller corpus of content to crawl with your columns defined up them first. Call it a priming read if you will.

 

 

FAST 2010 for SharePoint 2010 Property Configuration

The first thing I do is go into the FS4SP Administrator PowerShell Console and make sure that FS4SP has indeed crawled my columns in SharePoint. I can see all the crawled properties by issuing the following Get-FASTSearchMetadataCrawledProperty command.

It will list out all it’s crawled properties. Look for your columns. If they are SharePoint columns, they will begin with ows_ and then your column name. In our case here, we are looking for ows_confidentiality and ows_pii .

 

Next we need to create a FS4SP Managed property. We will first focus on the Confidentiality property. In this case, I’m going to create a FS4SP called Confidentiality. I do this by using the New-FASTSearchMetaManagedProperty command. I then verify by Get-FASTSearchMetaManagedProperty. You’ll notice that I also created a variable to hold the managed property( $mp) as we will be using it later.

I am only going to show this for the Confidentiality column, when I create this column I use –Type 1 indicating that it is Text property. You should repeat all these steps for the PII column, howerver, for the PII column you will use -Type 3 indicating that it is a Boolean property. More on this command can be found at https://technet.microsoft.com/en-us/library/ff393789.aspx.

 

Next we need to save the crawled property in a variable ($cp) as we will be using it later.

 

Next we need to map the crawled property to our newly created managed property with the New-FASTSearchMetadataCrawledPropertyMapping command

 

Next we need get the Full Text Index from FS4SP. You can use the Get-FASTSearchMetadataFullTextIndex command. Again, we are going to store that in a variable ($fti) as we are going to be using it again.

 

Next we need to create a mapping of our managed property to our full text index. We use the New-FASTSearchMetadataFullTextIndexMapping command. 

 

I then verify that it was created by using Get-FASTSearchMetadataFullTextIndexMapping .

 

 

Now, assuming, you’ve repeated all these steps for the PII column we should have fast configured. You will need to run a full crawl on the content source. Note, this is our second full crawl of the source. This is why I recommend a prime read of a smaller corpus.

 

 

SharePoint 2010 FAST Search Center

The first thing you will need to do on your site, in our case here it’s https://fastwebapp, is to activate the SharePoint Server Publishing Infrastructure from the Site Settings > Site Collection Administration > Site collection features.

 

 

Once the features is active you will need to create a site using the FAST Search Center template.

 

 

Once the site is created, in our case navigate to https://fastwebapp/fsearch and click on the Advanced link next to the search box.

 

Once on the advanced page, edit the page and edit the Advanced Search Web Part.

 

In the Web Part Tool Box > Properties section click on the ellipse next to the Properties box so we can modify the xml to add the properties to the web part for our Confidentiality and PII columns.

 

Once the text editor dialog pops up we will need to add Property definitions and then Property References so they will show up in the web part. First, look for the </PropertyDefs> closing tag. Just above that tag add two <PropertyDef> elements that refer to our columns. Take note of the data types I used for each one. 

 

 

Next, search for the <ResultType Display=”All Results”…> and add two <PropertyRef…> elements for our PII and Confidentiality columns as I’ve done below.

 

Apply your changes and save the page. We should now see our properties show up in the Add property restrictions… section of the web part, as seen below. Here I have selected the Confidentiality property and put NDA in the text box as the value. Then I clicked the Search button.

 

 

As you can see below it did pull back the correct results based on my property restriction of Confidentiality contains NDA.