This is not impossible. Sorry Juraj.
You can modify the content that is stored in the smart search index by subscribing to the GetContent document event in a ClassLoaderModule.
Here is an example:
//This code can be put in the file /App_Code/Samples/Modules/SampleClassLoaderModule.cs
/// <summary>
/// Initializes the module
/// </summary>
public override void Init()
{
// -- This line provides the ability to register the classes via web.config cms.extensibility section from App_Code
ClassHelper.OnGetCustomClass += ClassHelper_OnGetCustomClass;
DocumentEvents.GetContent.Execute += new EventHandler<DocumentEventArgs>(GetContent_Execute);
}
void GetContent_Execute(object sender, DocumentEventArgs e)
{
if (e.Node.NodeClassName.ToLower() == "custom.yourclassname")
{
if (ValidationHelper.GetString(e.Node["YourColumnName"], null) == null)
{
var parent = e.Node.Parent;
if (parent != null && parent.NodeClassName == "custom.yourclassname")
{
e.Content += ValidationHelper.GetString(parent["YourColumnName"], String.Empty);
}
}
}
}
You can also use this method to add categories or any other content that you can't set in the document search settings.
The only drawback is that you won't see that content in the search results unless you create a macro or method to use in your transformation that outputs the parent content if its own content is empty.
Just a side note: This doesn't actually modify the content at all, it just modifies what the Lucene.NET smart search indexer stores in the index and associates with the respective content nodes.