A recent request we got from a client was that the Search & Navigate result from a page containing a FormContainerBlock had its properties indexed and shown for the search page result. Like this:
When trying to exclude these types of settings in the FindInitialization conventions, they do not remove the properties from Find at all.
The following has been tried:
// Exclude page (and possibly their descendents) from index if the page type inherits an interface or the property is set by an editor
var indexConventions = ContentIndexer.Instance.Conventions;
indexConventions.ForInstancesOf<FormContainerBlock>().ShouldIndex(x => false);
.ExcludeField(x => x.SubmitSuccessMessage);
How could you achieve this in with a convention setting or ignore rule for Search & Navigation?
Did you run the Find reindexing scheduled job after updating conventions?The changes does not take effect until the content is reindexed.
Yes, I have tried to empty it and rerun it with no results
Is the FormContainerBlock inside an xhtmlstring property on the page? Or referenced by a contentreference property?
It is a block reference in a content area for an article page type (custom)
I do not think blocks inside content areas should be indexed by default.Are you using this attribute for your block? If so, remove it.
Refer to: https://world.episerver.com/blogs/pjangid/dates/2019/4/indexing-blocks-content-to-make-it-searchable/
We are indexing blocks with the IndexInContentAreas attribute enabled for most parts of the pagetypes for the solution.
This question however is more based on how to disable Episerver to index Form properties (default properties from the Forms dll:s) whom by misstake is being indexed. The content being indexed is being referenced from a ContentArea with the FormContainerBlock representing the content of the form.
This does not seem to be achievable with the ignore configures for the Search & Navigate API