Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • David Amri 214 posts 740 karma points
    Sep 16, 2021 @ 11:30
    David Amri

    Check if media item is used in content


    Is there a way of determening if a media item (in this case a pdf) is used by any media picker in the content?

    I'm searching and presenting the content of pdf's but the indexer is using "IndexParentId" which means that it will index all of the pdf's of that parent node, in this case a folder.

    Now the problem is that the user are able to attach pdf's in the content with the media picker. If the user then later decides to remove a particular attached pdf from one of the content nodes the pdf is still indexed but not really relevant for the search result. In order for the pdf not to be indexed the user then have to delete the file in order to not show up in the search result.

    Is there a way of detecting if a media item is used by any content node?

  • Erik Eelman 79 posts 318 karma points
    Sep 21, 2021 @ 12:10
    Erik Eelman

    Hi David,

    There is a package available for this called Nexu:

    If you need to detect it yourself in code, you can look in the sourcecode how its done:

Please Sign in or register to post replies

Write your reply to: