[API] Excerpt of media file not displayed when installing package EPiServer.Find.Cms.AttachmentFilter

Found in

EPiServer.Find 13.2.0

Fixed in

EPiServer.Find 13.2.0

Created

Oct 23, 2018

Updated

Jun 12, 2019

State

Closed, Fixed and tested


Description

Precondition:

  • Install FindCMS to AlloyMVC
  • Install package EPiServer.Find.Cms.AttachmentFilter
  • Install Filter Packs: https://www.microsoft.com/en-us/download/details.aspx?id=17062
  • Set the highlight in below code. Then build the project.
    var hitSpec = new HitSpecification
    { HighlightTitle = true, HighlightExcerpt = true, PreTagForAllHighlights="<b>", PostTagForAllHighlights="</b>", // When HighlightExcerpt = true then minimum of ExcerptLength = 36 ExcerptLength = 500 }

    ;

1. Run the Project.
2. Go to CMS->Edit->Media gadget.
3. Upload a .docx file.
4. Run the indexing job.
5. Go to viewmode. Then search by a string is existed in the .docx file. Ex: good morning

Expected:
The .docx is returned, and its excerpt is displayed with a highlight effect.
Actual:
The .docx is returned but its excerpt is not displayed.

Note: This issue also happens with .pdf file.