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 30 posts 187 karma points
    Sep 13, 2021 @ 10:35
    Gogo Dev
    2

    How to use ExamineManager in Umbraco 9

    So I'm trying to use ExamineManager in Umbraco 9. In previous versions this would work fine: ExamineManager

    But in Umbraco 9, it seems to have changed completely. I tried to find some sort of documentation on ExamineManager for Umbraco 9, but I was unsuccessful.

    Any help would be highly appreciated. Thanks in advance!

  • Bjarke Berg 7 posts 130 karma points hq
    Sep 13, 2021 @ 11:23
    Bjarke Berg
    1

    Hi.. In Umbraco 9, you should as a rule of thumb, always inject your dependencies. In this case you need to inject IExamineManager.

    I guess the code sample is equal to use IExamineManager.TryGetSearcher("ExternalSearcher").

    Examine docs are updated to v2 here: https://shazwazza.github.io/Examine/

  • Gogo Dev 30 posts 187 karma points
    Sep 13, 2021 @ 11:33
    Gogo Dev
    0

    Is there a way to do it without injection? I should get the searcher inside a view.

  • Bjarke Berg 29 posts 265 karma points hq
    Sep 13, 2021 @ 11:53
    Bjarke Berg
    101

    You still has to use injection. In razor views there is a @inject keyword..

Please Sign in or register to post replies

Write your reply to:

Draft