I have a document set with 2 documents , lets say Document A (Content type A) and Document B(Content type B). All the properties of the document set are marked as shared properties. Now i want to use do some manipulation with a content search web part(by some coding in display templates maybe ). I want the search results to display only Document A if any matching keyword is present in the document set. Below are two manipulations which i want to do :
If user search keyword matches any shared property, only display document A.
If user search keyword matches any content inside Document B, still show Document A.
So basically I want the search to be done on all documents in that document set, but display only Document A.
Can anyone help me by pointing out the right direction for this functionality.