volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Exclude category from being indexed.

Hi,

Is it possible to exclude a specific catalog or commerce category from being indexed in Find?

#189931
Mar 27, 2018 14:56

Hi,

To exclude a specific catalog from indexing, it can be quite easy, but for category it can be much tricker. 

            ContentIndexer.Instance.Conventions.ForInstancesOf<EntryContentBase>().ShouldIndex(x => x.CatalogId != 5);

For category you'll likely need to use IRelationRepository to check if a entry belongs to that specific node or not. 

#189933
Mar 27, 2018 15:12
* 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.