Copied to clipboard

Flag this post as spam?

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


  • Jamie Townsend 62 posts 286 karma points c-trib
    Aug 11, 2021 @ 20:15
    Jamie Townsend
    0

    Examine search sort boost by doctype

    Our client would like to sort the search results based on a doctype. I found an article on this for Umbraco 7 using the below

    public void DocumentWriting(object sender, DocumentWritingEventArgs e)
    {
        // boost doctype on indexing
        if (e.Fields["nodeTypeAlias"] == "YourDocTypeAlias")
        {
            e.Document.SetBoost(2);
        }
    }
    

    Is there a way to do this in Umbraco 8 or another way we could achieve this?

  • Thomas 319 posts 606 karma points c-trib
    Oct 24, 2023 @ 17:14
    Thomas
    0

    Did you find a way to do that ?

Please Sign in or register to post replies

Write your reply to:

Draft