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

Class MetaFieldIndexAttrs

Static utility class for accessing the indexing parameters of user metafields.

Inheritance
System.Object
MetaFieldIndexAttrs
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Search.Extensions
Assembly: Mediachase.Search.Extensions.dll
Version: 12.17.2
Syntax
public static class MetaFieldIndexAttrs

Methods

CanBeIndexed(MetaDataType)

Returns if it is possible to enable the allow search attribute on a metafield with the specified type.

Declaration
public static bool CanBeIndexed(MetaDataType metaDataType)
Parameters
Type Name Description
MetaDataType metaDataType

The metadata type of the field.

Returns
Type Description
System.Boolean

True if the allow search attribute can be set, else false.

CanBeSortable(MetaDataType)

Returns if it is possible to enable the index sortable flag on a metafield with the specified type.

Declaration
public static bool CanBeSortable(MetaDataType metaDataType)
Parameters
Type Name Description
MetaDataType metaDataType

The metadata type of the field.

Returns
Type Description
System.Boolean

True if the index sortable attribute can be set, else false.

CanBeStored(MetaDataType)

Returns if it is possible to enable the index stored flag on a metafield with the specified type.

Declaration
public static bool CanBeStored(MetaDataType metaDataType)
Parameters
Type Name Description
MetaDataType metaDataType

The metadata type of the field.

Returns
Type Description
System.Boolean

True if the index stored attribute can be set, else false.

CanBeTokenized(MetaDataType)

Returns if it is possible to enable the index tokenized flag on a metafield with the specified type.

Declaration
public static bool CanBeTokenized(MetaDataType metaDataType)
Parameters
Type Name Description
MetaDataType metaDataType

The metadata type of the field.

Returns
Type Description
System.Boolean

True if the index tokenized attribute can be set, else false.

CanHaveAnyIndexCapability(MetaDataType)

Returns true if any indexing attributes can be set on a metafield with the specified type.

Declaration
public static bool CanHaveAnyIndexCapability(MetaDataType metaDataType)
Parameters
Type Name Description
MetaDataType metaDataType

The metadata type of the field.

Returns
Type Description
System.Boolean

True if any indexing attributes can be set, else false.

IsIncludedInDefaultSearch(MetaField)

Get the include in default search flag from a metafield.

Declaration
public static bool IsIncludedInDefaultSearch(this MetaField field)
Parameters
Type Name Description
MetaField field

The metafield to evaluate.

Returns
Type Description
System.Boolean

The state of the include in default search flag.

IsIndexSortable(MetaField)

Gets the index sortable flag from a metafield.

Declaration
public static bool IsIndexSortable(this MetaField field)
Parameters
Type Name Description
MetaField field

The metafield to evaluate.

Returns
Type Description
System.Boolean

The state of the index sortable flag.

IsIndexStored(MetaField)

Gets the index stored flag from a metafield.

Declaration
public static bool IsIndexStored(this MetaField field)
Parameters
Type Name Description
MetaField field

The metafield to evaluate.

Returns
Type Description
System.Boolean

The state of the index stored flag.

IsIndexTokenized(MetaField)

Gets the index tokenized flag from a metafield.

Declaration
public static bool IsIndexTokenized(this MetaField field)
Parameters
Type Name Description
MetaField field

The metafield to evaluate.

Returns
Type Description
System.Boolean

The state of the index tokenized flag.

SetIncludedInDefaultSearch(MetaField, Boolean)

Sets a value for the include in default search flag on a metafield.

Declaration
public static void SetIncludedInDefaultSearch(this MetaField field, bool value)
Parameters
Type Name Description
MetaField field

The metafield to modify.

System.Boolean value

The value of the include in default search flag to set.

SetIndexSortable(MetaField, Boolean)

Sets a value for the index sortable flag on a metafield.

Declaration
public static void SetIndexSortable(this MetaField field, bool value)
Parameters
Type Name Description
MetaField field

The metafield to modify.

System.Boolean value

The value of the index stored flag to set.

SetIndexStored(MetaField, Boolean)

Sets a value for the index stored flag on a metafield.

Declaration
public static void SetIndexStored(this MetaField field, bool value)
Parameters
Type Name Description
MetaField field

The metafield to modify.

System.Boolean value

The value of the index stored flag to set.

SetIndexTokenized(MetaField, Boolean)

Sets a value for the index tokenized flag on a metafield.

Declaration
public static void SetIndexTokenized(this MetaField field, bool value)
Parameters
Type Name Description
MetaField field

The metafield to modify.

System.Boolean value

The value of the index tokenized flag to set.