What I mean: I have some pages with content parts from other documents in a marginal column.
The main document consists of content by itself and a collection of "content snippets". These "content snippets" are other subdocuments with an empty template in a subfolder. Their contents are included in the main document.
Now with AjaxSearch I find the main document AND the subdocuments in the subfolder. What can I do to redirect to the main document, if a user click the search result link to the subdocument reaching this mostly empty subdocument. What can I put into this empty template (or into this page) as a redirect call? It must have a check to prevent redirecting from the main page itself to anywhere. Means: the redirect function/snippet should not have an effect for the main page itself with the included subcontent, but should have effect if I reach the subdocument directly by a search result link.
Clear what I mean?

I don’t want to set the subfolder and all subdocuments manually to "unsearchable".