Page constructed from multiple child nodes can't show preview
I am working on a site where each page is constructed from the page node itself as well as any number of child nodes that represent content "rows".
I have got the search working by adding the content of the child "row" nodes to the "contents" combined field in ezSearchBootstrapper.cs.
What I can't figure out at the moment, is how to present content from a "row" node as the preview text. Currently, the preview text is empty or doesn't include the search term (if the search term is found on a "row" child node).
Any ideas? I have got the search working, I just need to figure out how to show the contextual content!? Can I get to the "contents" field which is the combination of all fields, including those from child nodes.
By default, the search results page / code will not display pages without a template assigned, so no changes were needed there. The only issue is that the text displayed underneath each search result may not contain the actual search term. In fact, there may not be any text at all. That is still to be looked at ;-)
Page constructed from multiple child nodes can't show preview
I am working on a site where each page is constructed from the page node itself as well as any number of child nodes that represent content "rows".
I have got the search working by adding the content of the child "row" nodes to the "contents" combined field in ezSearchBootstrapper.cs.
What I can't figure out at the moment, is how to present content from a "row" node as the preview text. Currently, the preview text is empty or doesn't include the search term (if the search term is found on a "row" child node).
Any ideas would be most welcome!!
Any ideas? I have got the search working, I just need to figure out how to show the contextual content!? Can I get to the "contents" field which is the combination of all fields, including those from child nodes.
Hi Gordon
Can you share the change you have done on ezSearchBootstrapper.cs to make it include the child nodes?
Does the search works as intended (i.e. search result shows the container page (where the term is located in its child)) ?
cheers
It will probably depend on your exact requirements, but this is what I did for my project.
I added the following code into "OnGatheringNodeData" in ezSearchBootstrapper.cs
I put it right after the foreach loop that fills "combinedFields" and before "e.Fields.Add("contents", combinedFields.ToString())".
This is AddAllFields()
By default, the search results page / code will not display pages without a template assigned, so no changes were needed there. The only issue is that the text displayed underneath each search result may not contain the actual search term. In fact, there may not be any text at all. That is still to be looked at ;-)
is working on a reply...