Try our conversational search powered by Generative AI!

Return page when getting hit on the name of a block on that specific page?



I have the following scenario:

We are using Unified Search and Find .NET API-version:

We have a page type called ThemePage. On that page we have a content area in which resides a block of type SimpleTextBlock. Let us say the block has "lorem ipsum" in both name and content.

The page type is indexed, the block type is indexed and IndexingInContentAreas is set.

How can I get the contents of the block indexed on the page?

On the same page there is a content area containing several pages that have been dragged-and-dropped, and they seem to get indexed.

Appreciate any help and hopefully you understand what I mean :-)

May 14, 2019 14:07

I thought this would be enough but apparently it wasn't:

ContentIndexer.Instance.Conventions.ForInstancesOf<ThemePage>().IndexingInContentAreas(x => true).ShouldIndex(x => true);

ContentIndexer.Instance.Conventions.ForInstancesOf<BlockData>().ShouldIndex(x => true);

Had to add the IndexInContentAreas attribute to the block type SimpleTextBlock.

Anyway, now it gets indexed along with the page :-)

May 15, 2019 16:17
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.