SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm programatically trying to use the Search Apis to find some documents.

In order to customize the process, I'm selecting some basic properties :

var query = new KeywordQuery(site)
    QueryText = queryText,
    ResultTypes = ResultType.RelevantResults



var result = query.Execute();

This is working fine.

Now I want to select the internal values of a taxonomy field. Let's say I have a field named AccessLevel, bound to a term set containing some values.

After a crawl, SharePoint has detected two crawled properties : AccessLevel (property containing the label) and ows_taxId_AccessLevel (property containing the lookup value of the taxonomy field, #label|termguid). A mapped property has also been created owstaxIdAccessLevel automatically.

I set up the crawled properties to be included in the index, I even start the full crawl, but if I add this code :


I got the following exception :

Microsoft.Office.Server.Search.Query.InvalidPropertyException was unhandled by user code
  Message=Property doesn't exist or is used in a manner inconsistent with schema settings.
  Property=The creator of this fault did not specify a Reason.
       at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.ThrowBackwardCompatibleException(FaultException`1 ex)
       at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.DoSpLoadBalancedUriWsOp[T](WebServiceBackedOperation`1 webServiceCall, Int32 timeoutInMilliseconds, Int32 wcfTimeoutInMilliseconds, String operationName)
       at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.DoWebServiceBackedOperation[T](String operationName, Int32 timeoutInMilliseconds, Int32 wcfTimeoutInMilliseconds, WebServiceBackedOperation`1 webServiceCall)
       at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.Execute(QueryProperties properties)
       at Microsoft.Office.Server.Search.Query.Query.Execute()
       atMyProject.MyModuleConnectorSearchWrapper.SearchDocuments(SPSite site, String queryText, IEnumerable`1 retrieveProperties, Boolean includeDefaultProperties, Int32 startRow, Int32 rowsPerPage, Int32& estimatedRowCount)
       at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()
       at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
  InnerException: System.ServiceModel.FaultException<Microsoft.Office.Server.Search.Administration.SearchServiceApplicationFault>
       Message=The creator of this fault did not specify a Reason.
         Server stack trace: 
            at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
            at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
            at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
            at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
         Exception rethrown at [0]: 
            at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
            at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
            at Microsoft.Office.Server.Search.Query.ISearchQueryServiceApplication.Execute(QueryProperties properties)
            at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.<>c__DisplayClass4.<Execute>b__3(ISearchServiceApplication serviceApplication)
            at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.DoSpLoadBalancedUriWsOp[T](WebServiceBackedOperation`1 webServiceCall, Int32 timeoutInMilliseconds, Int32 wcfTimeoutInMilliseconds, String operationName)

Is there any restriction on querying Taxonomy fields? What can I do to make my search works?

share|improve this question
I haven't found out exactly why this is, but I have done it successfully on one system, the same deployment on another produces your error. I read if you map it to the other field (The plaintext version of the field) of the managed metadata field it works. Didn't fix it for me though. – Hugh Wood Nov 22 '12 at 11:17
up vote 0 down vote accepted

An interesting discovery... if I run this small PS script:

$prop = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa -Identity owstaxIdAccessLevel

It's returning:


Then I can update this property:

$prop.Retrievable = $true

After a full crawl, I'm now able to query my taxonomy field.

However, I'm don't measure now the potential side effects of this change

share|improve this answer
there are no side effects. the automatically created managed property for TaxonomyFields is NOT Retrievable by Default. And if it is not retrievable, you cannot request it. That´s all. – Leopold Lerch May 21 '15 at 6:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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