Copied to clipboard

Flag this post as spam?

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


  • Shane Marsden 13 posts 76 karma points
    Sep 18, 2019 @ 14:20
    Shane Marsden
    0

    What is the equivalent of RebuildIndex in Umbraco 8?

    In 7:

    _indexer = (UmbracoContentIndexer)ExamineManager.Instance.IndexProviderCollection["ExternalIndexer"];
    _indexer.RebuildIndex();
    

    What is the equivalient in 8?

  • Shaishav Karnani from digitallymedia.com 354 posts 1638 karma points
    Sep 18, 2019 @ 15:12
    Shaishav Karnani from digitallymedia.com
    101

    Hi Shane,

    Please try.

        private readonly IndexRebuilder _indexRebuilder;
    
        public SearchService(IndexRebuilder indexRebuilder)
        {
            _indexRebuilder = indexRebuilder;
        }
    
        public void RebuiltIndex(string Index)
        {
            _indexRebuilder.RebuildIndex(Index);
        }
    

    Cheers,

    Shaishav

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies