No excerpt for DAM asset search with QueryBuilder
Hi everybody!
I'm using com.day.cq.search.QueryBuilder to search for pages and documents. The page search (type=cq:Page) works just fine and results hits return excerpts just fine via getExcerpt(). But I have an issue with getting excerpts (that show a part of the text where the search term was found) after searching for DAM assets (type=dam:Asset). The assets are PDFs, DOCs, PPTs and XLSs, so there actually is no issue with getting the results I was looking for. The right files with the term within the files are found - so it DOES the "inner" search, I just can't get where it finds it. The problem is that the hits' excerpts are blank, empty strings (""). I tried getExcerpts() method that returns a Map<String, String> of excerpts, but nothing useful was inside. I can't use com.day.cq.wcm.foundation.Search because of other issues and because it's not as modifiable as QueryBuilder. Can anybody help me with this please?