November Happy Hour will be moved to Thursday December 5th.

Class SearchableAttribute

Specifies if a property should be indexed for search.

Inheritance
System.Object
SearchableAttribute
Namespace: EPiServer.DataAnnotations
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public class SearchableAttribute : Attribute
Remarks

This attribute is used by page properties to specifiy if they should be searchable.

Refer to "Attributes" and "Pages, Page Types and Page Templates" under "Content" in the Developer Guide for more information and examples.

Constructors

SearchableAttribute()

Initializes a new instance of the SearchableAttribute class.

Declaration
public SearchableAttribute()

SearchableAttribute(Boolean)

Initializes a new instance of the SearchableAttribute class and sets the IsSearchable value.

Declaration
public SearchableAttribute(bool isSearchable)
Parameters
Type Name Description
System.Boolean isSearchable

Sets the value of the IsSearchable property.

Properties

IsSearchable

Gets a value indicating whether the value of the property decorated with this attribute should be included in search results.

Declaration
public bool IsSearchable { get; }
Property Value
Type Description
System.Boolean

true if the value of the property decorated with this attribute should be included in search results; otherwise, false.

Remarks

Default value is true.

Extension Methods