共用方式為


ContentIterator.EnsureContentTypeIndexedIfLargeList Method

Ensures that the ContentTypeId field is indexed for a list if it is a large list.

Namespace:  Microsoft.Office.Server.Utilities
Assembly:  Microsoft.Office.Server (in Microsoft.Office.Server.dll)

Syntax

'Declaration
Public Shared Function EnsureContentTypeIndexedIfLargeList ( _
    list As SPList _
) As Nullable(Of Boolean)
'Usage
Dim list As SPList
Dim returnValue As Nullable(Of Boolean)

returnValue = ContentIterator.EnsureContentTypeIndexedIfLargeList(list)
public static Nullable<bool> EnsureContentTypeIndexedIfLargeList(
    SPList list
)

Parameters

Return Value

Type: System.Nullable<Boolean>
Returns Nullable<T>.

Remarks

The index will only be created if the list.ItemCount is greater than 80% of the SPWebApplication.MaxItemsPerThrottledOperation value. Returns a null reference (Nothing in Visual Basic) if the field was already indexed; true if the field was previously not indexed but has now been indexed, false if the list was previously not indexed and has now been indexed (which is only possible for overloads of this method that defer index creation).

See Also

Reference

ContentIterator Class

ContentIterator Members

Microsoft.Office.Server.Utilities Namespace