Exclude Episerver Forms properties for Episerver Search & Navigation

Vote:
 

Hi!

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

 searchConventions.ForInstancesOf<FormContainerBlock>()
                .ExcludeField(x => x.SubmitSuccessMessage);

How could you achieve this in with a convention setting or ignore rule for Search & Navigation?

Regards

Eric

#226844
Aug 21, 2020 9:25
Vote:
 

Did you run the Find reindexing scheduled job after updating conventions?

The changes does not take effect until the content is reindexed.

#226865
Edited, Aug 21, 2020 11:01
Vote:
 

Yes, I have tried to empty it and rerun it with no results

#226866
Aug 21, 2020 11:02
Vote:
 

Yes, I have tried to empty it and rerun it with no results

#226867
Aug 21, 2020 11:02
Vote:
 

Is the FormContainerBlock inside an xhtmlstring property on the page? Or referenced by a contentreference property?

#226868
Edited, Aug 21, 2020 11:03
Vote:
 

It is a block reference in a content area for an article page type (custom)

#226869
Aug 21, 2020 11:06
Vote:
 

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.

[IndexInContentAreas]


Refer to: https://world.episerver.com/blogs/pjangid/dates/2019/4/indexing-blocks-content-to-make-it-searchable/

#226870
Aug 21, 2020 11:28
Vote:
 

Hi, Tomas

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

#227027
Aug 26, 2020 6:52
* 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.