This content is archived. See latest version here

Last updated: Sep 21 2015

Introduction

In the CMS 7/7.5 integration of EPiServer Find, there are a number of built-in filtering extensions in the EPiServer.Find.Cms namespace.

Filtering extensions

Below you will find descriptions of built-in filtering extensions, and examples of how they are used.

ExcludeDeleted

Excludes all content that has been moved to the trash (recycle bin). Note that this method is important, because by default content in the trash will also be indexed.

C#
SearchClient.Instance.Search<IContent>().ExcludeDeleted()

PublishedInCurrentLanguage

Checks if the content is published in the current language.

C#
SearchClient.Instance.Search<IContent>().PublishedInCurrentLanguage()

CurrentlyPublished

Checks if the content is currently published in any language on the website.

C#
SearchClient.Instance.Search<IContent>().CurrentlyPublished()

FilterOnReadAccess

Filters content the end user does not have access to. This method uses VirtualRoleRepository, which includes users, roles, and visitor groups.

C#
SearchClient.Instance.Search<IContent>().FilterOnReadAccess()

FilterForVisitor

Group of filters including ExcludeDelete, PublishedInCurrentLanguage, and FilterOnReadAccess.

C#
SearchClient.Instance.Search<IContent>().FilterForVisitor()

Do you have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/