0

I am using SharePoint 2013. I have add a managed metadata site column to multiple document libraries. In the search if I input owstaxidmetadataalltagsinfo:keyword it will return all items tagged "keyword" tag.

My question is what is the query string to list all items tagged with multiple tags? e.g. owstaxidmetadataalltagsinfo:keywordA AND owstaxidmetadataalltagsinfo:keywordB

Also, it there OOTB feature or sample code to facilitate users to submit above search? So that they don't need to learn the query string.

1

Any query can be "saved" as a URL. So you could create a links list that included the various queries that you expect end users to run.

This TechNet article details some of the options for querying Managed Metadata fields. https://technet.microsoft.com/en-us/library/jj613136.aspx You are on the right track. You can either use the "taxid" version of the column which contains the ID of the term or you can use the string version of the field that contains the extracted term or terms. You would then AND them together.

  • I am able to query what I need now. Just one follow up question. I have 2 tags "Happy" and "Happy Birthday". By searching "owstaxidmetadataalltagsinfo:happy" I get both. How can I search exact tagged keyword "happy" and exclude "happy birthday"? – Mark L May 24 '16 at 5:41
  • The colon ":" is a contains operator. If you just want "Happy" use the query managedproperty="happy". – Matthew McDermott May 24 '16 at 11:29
0

Try using below query string:

owstaxidmetadataalltagsinfo:keywordA OR owstaxidmetadataalltagsinfo:keywordB

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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