SPFieldLookup.Indexed property
Sets a Boolean value that specifies whether the field is indexed.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Overrides WriteOnly Property Indexed As Boolean
Set
'Usage
Dim instance As SPFieldLookup
Dim value As Boolean
instance.Indexed = value
public override bool Indexed { set; }
Property value
Type: System.Boolean
true to specify that the field is indexed; otherwise, false.
Exceptions
Exception | Condition |
---|---|
SPException | You attempted to set the property on a dependent field. Indexing is not available for dependent (or secondary) fields. |
Remarks
Note
Although you can index a lookup column to improve performance, using an indexed lookup column to prevent exceeding the list view threshold does not work. Use another type of column as the primary or secondary index.