How can we search keywords from contents of uploaded media within media library in kentico9

kalpak shambharkar asked on March 3, 2016 08:03

We have requirement to search content from uploaded media within media library. I am trying to apply smart search for searching media content but didn’t get any success also I found some articles which suggest to create custom search index but how can we create and apply search index. Or if you have any alternate solution on Searching content from media library then please suggest

Correct Answer

Juraj Ondrus answered on March 3, 2016 12:18


The out of the box smart search does not support searching in the media files. Only attachments searchis supported. How to create cusotm search index is described in the documentation. You may need to integrate or implement cusotm code that will do the full text search in the physical files.

0 votesVote for this answer Unmark Correct answer

Recent Answers

Trevor Fayas answered on March 3, 2016 14:10

Kentico can also search content of files that are in the database

This would require that you create some procedure (either override the Loader Module for the media file insert, or a scheduled task) to convert your Media Files into attachments or Files in the system.

This way you don't have to 'worry' about coding the logic to 'read' the pdf and other content, leaving that to kentico, and you just worry about getting it from a File in the media library to a CMS.File object on the tree.

0 votesVote for this answer Mark as a Correct answer

kalpak shambharkar answered on March 7, 2016 13:26 (last edited on March 7, 2016 13:27)

Thanks for your suggestion Juraj Ondrus. I have implemented custom search index as suggested in the link Create Search Index but didn't understand how to get the path of my media files. In documentation the path is // Gets the search path from the Index data field string path = Convert.ToString(sisi.GetValue("CustomData")); I am confused about "CustomData"

0 votesVote for this answer Mark as a Correct answer

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