Viktor Sahlström
Jan 13, 2016
(3 votes)

Improving attachment search relevancy using the attachment helper

The way that Episerver Find treats attachments is not optimal in all scenarios. If you are a large company with lots of documents in many languages, you might notice that the search hits are not always optimal when trying to find a document. This is due to how Find handles indexing of attachments.

When indexing an attachment, the file is sent to Find as a base64 encoded string. The string is parsed in Apache Tika, and the resulting text is indexed using the standard language analyzer. This approach creates several issues.

  • A lot of data passed from the client to Find is not really needed, like images in a pdf. This causes an unnecessary flow of data over the network.
  • The parsed text is only indexed using the standard analyzer. This significantly reduces the quality of hits if the attachment content is not written in the standard language.
  • While browsing indexed content using the explorer view in the Find edit mode. For an attachment, the actual text is not put in the document but rather the base64 representation of the document. This might make it hard to browse the index and to verify that the correct optimization is done.


To solve these issues in one go, the Attachment Helper interface was created. This interface lets the developer decide how to handle attachments. Out of the box, there is an implementation created by Episerver using the Windows built-in IFilter features here. This version supports a wide range of file types and is easy to get going. 

Install the nuget package and the IFilters that suit your needs and, suddenly, your attachment search experience is vastly improved. You might notice that network traffic is reduced when running the index job, your searches provide more relevant hits, and the Find administrator can view the document content from inside the Find admin UI.

For more details on the search attachment filter, check out the docs.

Jan 13, 2016


Please login to comment.
Latest blogs
How to Write an xUnit Test to Verify Unique Content Type Guids in Content Management

When developing an Optimizely CMS solution, it is important to ensure that each content type has a unique GUID. If two or more content types share...

Minesh Shah (Netcel) | Mar 27, 2023

Extend TinyMCE in Optimizely CMS 12

Since technologies are upgraded to newer versions the ways to extend or override the out-of-the-box functionality are also changed a little bit so...

Ravindra S. Rathore | Mar 27, 2023 | Syndicated blog

Telemetry correlation for Scheduled Jobs in Optimizely

I previously demonstrated how to correlate telemetry to Azure Application Insights within a Hangfire job. But how about those jobs that are built a...

Stefan Holm Olsen | Mar 23, 2023 | Syndicated blog

Fixing Optimizely Content Syncing/Caching Issues on the DXP pre CMS.Core 12.13.0

Hi all, With our recent deployments to the DXP for .NET 6 projects (one a new build and one an upgrade) our clients had raised issues where there...

Scott Reed | Mar 23, 2023