SharePoint 2010: Limit search to return a Document Set after matching on its child item

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/5857

  •  16-10-2019
  •  | 
  •  

سؤال

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?

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top