Searching for assets by name or by type (pdf)



I just want to have a function where I fetch all assets of a certain type (pdf) and with a list of filenames. Can anyone point me in which direction I should be heading?


Sep 19, 2017 16:55

Hi Magnus,

One way to solve this would be to index all assets (using EPiServer Find, Vulcan, vanilla elasticsearch, etc.) and then filter the documents by type and do skip/take.

The best part is that you don't even have to hit the episerver database to get a list of files that match your search criteria.

Sep 19, 2017 22:28

Thanks for reply Dejan!

But isnt that more for search functionality on web pages? Im building a function where I have a list of files and search for them by name in Epi and then replace binary for these files.

Sep 20, 2017 8:43

Performance-wise it's faster to retrieve content IDs from a search index than to get them from a database.

Sep 20, 2017 13:55
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.