Copied to clipboard

Flag this post as spam?

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


  • Gogo Dev 25 posts 157 karma points
    Sep 16, 2021 @ 07:34
    Gogo Dev
    0

    Searchers and MediaIndexer not available in Umbraco 9 dashboard

    In my Umbraco dashboard, I can neither find the searchers nor the MediaIndexer. In previous versions, namely v7, they were all there, but not anymore. Could someone please tell me how I can get them back?

    Searchers and MediaIndexer missing

    Any help would be highly appreciated!

    Thanks in advance.

  • Anders Bjerner 455 posts 2680 karma points MVP 5x admin c-trib
    Sep 16, 2021 @ 08:00
    Anders Bjerner
    1

    Hi,

    Umbraco 7 doesn't have a MediaIndex by default, so this likely comes from a third party package you may have installed. ExternalIndex contains both content and media.

    Since Umbraco 8 was launched, the way you access searchers has changed a bit. In Umbraco 7, all searchers lived at a global level.

    While this is still possible with custom searchers, the default searchers now instead live under the individual indexes. This means that if you click on ExternalIndex in your screenshot, the expanded view let's you search directly from the indexer - eg. as shown here:

    image

    It works the same way in the code. In order to get a reference to the searcher for the external index, you'd first have to get a reference to the IIndex for the external index, and then call it's GetSearcher method to get the searcher.

    Hope that makes sense 😉

  • Gogo Dev 25 posts 157 karma points
    Sep 16, 2021 @ 08:07
    Gogo Dev
    0

    Well there is no GetSearcher Method for my IIndex.

    IIndex Injection

    GetSearcher Method

  • Søren Kottal 565 posts 3739 karma points MVP 3x c-trib
    Sep 16, 2021 @ 08:10
    Søren Kottal
    1

    I think it's TryGetSearcher

  • Gogo Dev 25 posts 157 karma points
    Sep 16, 2021 @ 08:12
    Gogo Dev
    0

    Aight so I only need to use ExternalIndex then?

  • Gogo Dev 25 posts 157 karma points
    Sep 16, 2021 @ 08:18
    Gogo Dev
    0

    So I've tried to search through both media and content, but I guess this isn't the way to do it, right?:

    Indexing & Searching with TryGetIndex

    Or do I need to create two different "results" variables for media and content?

  • Gogo Dev 25 posts 157 karma points
    25 days ago
    Gogo Dev
    100

    I think I wasn't clear enough when posting the question. My real goal was to search/index through files and their contents. After some research on the internet, I found the package that would really help me out, and thus help me solve my problem. Thanks for all the replies, I'm grateful for your help!

Please Sign in or register to post replies

Write your reply to:

Draft