Find exluding Document Content from being indexed.

Vote:
 

Hi

I have some issues figuring out how to exclude document content (such as pdfs and docx) from being indexed, i still want the files metadata to be indexed but no the content it self.
If some one has some suggestions or ideas that would be highly appricatated.
Using find: 13.2.5.0

#248530
Feb 12, 2021 9:47
Vote:
 

Haven't tried myself, but I think what you can do is to implement IAttachementHelper, register it to override the default one. In GetSupportedFiletypes you can just return an empty list, and the content will not be indexed.

In case you need help with registering your implementation https://vimvq1987.com/register-your-custom-implementation-the-sure-way/ 

#248531
Feb 12, 2021 10:04
Vote:
 

I usually use this:

ServiceLocator.Current.GetInstance<IClient>()
    .Conventions
    .ForInstancesOf<EPiServer.Core.MediaData>()
    .ExcludeField(x => x.SearchAttachment())
    .ExcludeField(x => x.SearchAttachmentText());
#248860
Feb 19, 2021 3:42
* 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.