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

Vote:
 

Hi!

I have the following scenario:

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

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 :-)

#203956
May 14, 2019 14:07
Vote:
 

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 :-)

#203994
May 15, 2019 16:17