PDF - Page description as search result

Anantha Prakash Dhinakar asked on January 20, 2017 05:09

How to display the pdf document's (in pages library) description as search results through transformation?

Example: I have a pdf document in Pages library as TK388.pdf, the description of the document is "Upcoming events status". when this document is displayed as a search result, the link should point to the document itself and the 2nd line should display just the document description entered.

Thanks in advance.

Correct Answer

Roman Hutnyk answered on January 20, 2017 07:59

Description field has to be indexed first. There are two possible scenarios:

  • Description is page type field - in this case you could include it into search index by going to page type -> search fields tab
  • Description in not page type field - you'll need to customize search content by adding Description field there

Once Description sits in index use <%# GetSearchValue("DocumentName") %> method to show it in transformation.

2 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on January 20, 2017 16:01

In Kentico 8 and up (think 7 maybe too) you can index attachments and their content. See the documentation on this.

0 votesVote for this answer Mark as a Correct answer

Anantha Prakash Dhinakar answered on January 20, 2017 17:07

Thanks Roman and Brenden for your input.

0 votesVote for this answer Mark as a Correct answer

Chetan Sharma answered on January 30, 2017 12:47

Hi Anantha,

There are two ways to do this.

  1. Either you setup "Content" field of the 4 default search result fields and map a corresponding field that should populate it. Let say your field name is "EventDescription". This is a best way to access value where you have indexed multiple page types in your index.

  2. If you have only single page type in your index then you may access it like this <%# GetSearchValue("EventDescription") %> . Please make sure to index this field.

I hope this helps

Cheers, Chetan

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.