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!