Searching for nested content

Hi again. I had another question – hopefully it will be as easy as yesterday's.


I have set up a search page on my site, which is working fairly well. However, if I have a page with nested content, the search result links directly to the sub-page, rather than the parent, which is what the user would expect.



I tried turning off searches for the nested page, hoping that would help, but in that case it didn't find the string at all.



(I have used %asset_lineage_linked% in the results, which helps a bit, but was hoping for something better.)



Thanks,



David C

As far as I know, you cant search for nested content. The content of the nested page is indexed with the nested page asset itself, not the page in which it is nested.

Hmmm.


Is it then possible to redirect anyone trying to go directly to the nested content, so they go to the parent instead?



For example, I have a Corporate Home page with a nested division Col3 (being the 3rd column of a table).



If they search for a string therein, this is what comes up (using the asset lineage, which at least provides some context):



… > Corporate Home > Col3



Unfortunately the Col3 content doesn't make much sense by itself, so is it possible to do a redirection to Corporate Home in that case?



Thanks,



David C

I cant think of a way to do that myself. If anyone can do it, it's probably one of the implementation guys.

I've been thinking about this one the whole day and I haven't managed to come up with anything either, I'm afraid. The search returns the asset in which it finds the keyword – it doesn't know the asset is (usually) only displayed nested in another asset.


Greg: With the upcoming search changes, could the new asset->getContents index the nested contents?



Example: Page A nests Pages B and C. When Page A is indexed, the contents of B and C are indexed as content for Page A (based on Page A's weights). Pages B and C could then be set to Zero weighting to hide them individually from the search index.

The new indexing system could index that content but those methods I was telling you about probably wont. They are also used for global search and replace, so we really need to be acurate as to what content is really within the dependant assets.


Actually indexing the full contents of the page could be done another way. We'll keep it in mind when redoing the indexing - but that wont be available until 3.8.0.