This method must save search documents in batches to minimize memory usage instead of returning all documents at once.

Namespace: DotNetNuke.Services.Search
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public virtual int IndexSearchDocuments(
	int portalId,
	ScheduleHistoryItem schedule,
	DateTime startDateLocal,
	Action<IEnumerable<SearchDocument>> indexer
)
Visual Basic
Public Overridable Function IndexSearchDocuments ( 
	portalId As Integer,
	schedule As ScheduleHistoryItem,
	startDateLocal As DateTime,
	indexer As Action(Of IEnumerable(Of SearchDocument))
) As Integer

Parameters

portalId
Type: System..::..Int32
ID of the portal for which to index items
schedule
Type: DotNetNuke.Services.Scheduling..::..ScheduleHistoryItem
paramscheduleM:DotNetNuke.Services.Search.IndexingProvider.IndexSearchDocuments(System.Int32,DotNetNuke.Services.Scheduling.ScheduleHistoryItem,System.DateTime,System.Action{System.Collections.Generic.IEnumerable{DotNetNuke.Services.Search.Entities.SearchDocument}})
startDateLocal
Type: System..::..DateTime
Minimum modification date of items that need to be indexed
indexer
Type: System..::..Action<(Of <(<'IEnumerable<(Of <(<'SearchDocument>)>)>>)>)>
A delegate function to send the collection of documents to for saving/indexing

Return Value

The number of documents indexed

See Also