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
    15 days ago
    Gogo Dev
    0

    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 6 posts 129 karma points hq
    15 days ago
    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 25 posts 157 karma points
    15 days ago
    Gogo Dev
    0

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

  • Bjarke Berg 27 posts 228 karma points hq
    15 days ago
    Bjarke Berg
    100

    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