Try our conversational search powered by Generative AI!

Searching for assets by name or by type (pdf)

mh
mh
Vote:
 

Hi!

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?

/regards

#182455
Sep 19, 2017 16:55
Vote:
 

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.

#182457
Sep 19, 2017 22:28
mh
Vote:
 

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.

#182462
Sep 20, 2017 8:43
Vote:
 

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

#182473
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.