1

I'm currently working on a SharePoint Search Scope that uses a property query on a managed metadata field.

Unfortunately I have had little to no luck with this so far and was looking to see if anyone had complete this before! The situation is the following:

A custom list with a managed metadata column that's based on a term set called Animals

The terms in this term set are the following:

Rhino Elephant

I have created 4 items; 3 with Rhino and 1 with Elephant. The title of the items is Item 1, Item 2, Item 3 and Item 4.

I have run two full crawls since the creation of the column and it created the following crawled properties:

ows_taxId_Animals_x0020_Metadata*strong text*

Category: SharePoint Property Set ID: Variant Type: 31 Data Type: Text Multi-valued: No

Content using this property This is a small sample of documents containing this property.

Sample documents:

"http://sharepoint/Lists/Search Scope Test/DispForm.aspx?ID=1"

"http://sharepoint/Lists/Search Scope Test/DispForm.aspx?ID=2"

"http://sharepoint/Lists/Search Scope Test/DispForm.aspx?ID=3"

"http://sharepoint/Lists/Search Scope Test/DispForm.aspx?ID=4"

No mappings

Include values for this property in the search index - Enabled

ows_Animals_x0020_Metadata

Category: SharePoint Property Set ID: Variant Type: 31 Data Type: Text Multi-valued: No

Content using this property This is a small sample of documents containing this property.

Sample documents:

"http://sharepoint/Lists/Search Scope Test/DispForm.aspx?ID=1"

Mapped to:

ows_taxId_Animals_x0020_Metadata

Include values for this property in the search index - Enabled

Managed Properties

owstaxIdAnimalsx0020Metadata

The type of information in this property: Text

as Multiple Values - Disabled

Mapped to ows_taxId_Animals_x0020_Metadata

Include values from all crawled properties mapped

Allow this property to be used in scopes - Enabled

I can successfully search for the term animal, rhino and elephant with results and refiners being built for rhino and elephant.

What I need to know do is to be able to create a search scope that allows you to search for all items containing animals but use a property query to exclude items with the Rhino value.

Unfortunately my scope never finds any items.

I have also tested using the managed property:

owstaxIdAnimalsx0020Metadata:Elephant

But again nothing is found!

Any ideas would be great appreciated!

2 Answers 2

2

I suggest you recreate the "Animals Metadata" column WITHOUT any special characters, and then RENAME it afterwards. This is SharePoint best practice due to how internal representations of names are stored. A space becomes x0020 when encoded and may be further encoded to _x005F_x0020_x005F_ and so forth. You can see how this will develop into a nightmare further down the road.

Your issue is clearly an encoding problem, and not a configuration issue. Do the following:

  1. Delete the field
  2. Recreate the field without any special characters
  3. Rename the field as you want it
  4. Do a full crawl
  5. Create the needed properties
  6. Do another full crawl
  7. Create the scopes
  8. Test the scopes
0

I dont know if this is any help to you but it goes through step by step, maybe you could re-go through the steps to make sure you havent missed anything out?

http://fabiangwilliams.wordpress.com/2010/05/30/understanding-managed-metadata-in-sharepoint-2010-its-impact-on-taxonomy-navigation-and-search/

and for clarity of managed meta search crawl

http://technet.microsoft.com/en-us/library/ff621097.aspx

hope its answers your question!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.