Excluded items are still being indexed

Vote:
 

Hi!

I have excluded items from being indexed by Search & Navigation, but they are still indexed. I have this initialization module:

 [InitializableModule]
    [ModuleDependency(typeof(InitializableModule))]
    public class FindInitialization : IInitializableModule
    {
        public void Initialize(InitializationEngine context)
        {
           ContentIndexer.Instance.Conventions.ForInstancesOf<MyPageType>().ShouldIndex(x => false);
           ContentIndexer.Instance.Conventions.ForInstancesOf<BlockData>().ShouldIndex(x => false);
          (...)
        }
    }

But the blocks and MyPageType are still being indexed. 

Any tips on what I am doing wrong?

#249054
Feb 23, 2021 11:45
Vote:
 

Two things off the top of my head

  1. Did you clear the index down and re-index
  2. You may need to change the module dependency to [ModuleDependency(typeof(IndexingModule))]
#249065
Feb 23, 2021 14:19
Vote:
 

Hi!

  1. Yes, I have cleared the index multiple times, even tried to change index.
  2. That didn't help either.
#249149
Feb 24, 2021 13:53
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.