Tag: crawled Properties

Create Managed Properies and add them to the advanced search Sharepoint 2010

Create Managed Properies and add them to the advanced search Sharepoint 2010


Hello 🙂
Today i will show you how to create and configure new search metadata and add it to an advanced search properties like the one you see below:

1

First of all we need to create the managed property:
1. go to central administration application management page and click on manage service applications.

2
2. select Search Service Application then click manage from the ribbon bar.

3
3.In the bar on the left click Metadata Properties.

5
4- Then click new managed property.

6

we are gonna create a managed property named Test that combines 4 crowled properties ( site columns):

5. Enter the property name and the description. In the use in scope section check the Allow this property to be used in scopes option.

6. click add mapping and choose you crowled property:

8

Click ok then.

You must start full crawling otherwise you property will not be recognised.

Now that we have our managed property lets go back to our advanced search webpart.

7. Go to your advanced search web part then click edit page.

8. Select “Edit Web part” from the Edit menu on the advanced search web part.

9

9. in the Properties section and then click on the XML and expand it:

 

Add the tag of your property in the property definitions section modify the DataType attrbuite with your property data type “your site column data type” and add another element in the result types section “this will appear in the advanced search properties dropdown list” of the XML as it’s shown below. Then when you finish click ok.

example

<PropertyDef Name=”test” DataType=”text” DisplayName=”Destinataire”/>
</PropertyDefs>
<ResultTypes>
<ResultType DisplayName=”Tous” Name=”default”>
<KeywordQuery/>
<PropertyRef Name=”test” />

</ResultType>
</ResultTypes>

11.  Now go to the search page. You will find the destinataire is added to the properties as below.

11

if you have any questions i will be happy to answer them 🙂