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

In SharePoint Server 2010, say I set up a Document Set and put some Word documents in it. Each Word document contains a common phrase that is found only in the body of the Word Documents.

When searching for this common phrase that exists in each of the Word Documents, is there a way to return only the Document Set in the search results, instead of returning each individual Word document?

share|improve this question
up vote 1 down vote accepted

Default on search, metadata from the set is included for all the documents as well. If you search and match a metadata field from the set you get hits on the documents as well as the set itself.

The opposite cannot be achieved directly, letting the content of the documents appear as metadata for the set itself.

In order to do this you need to create a custom search web part which executes two searches. First you execute your regular query, then for each document you have to hash up the set id´s and generate your own result list which i returned to the user.

I haven´t worked with sets myself so I´m not sure if the set id is returned with the meta data per hit, or if you have to query it from the list afterwards.

share|improve this answer
Thanks for your answer Mikael. It looks like there will need be some kind of custom code layer to perform this; though I'm wonder if there is an optimal solution in terms of performance. – Jon Schoning Sep 16 '11 at 15:54
Two searches shouldn't be that expensive, and I can't really think of a different approach here (which I would go for). – Mikael Svenson Sep 16 '11 at 20:47

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.