Class ModuleIndexer
The ModuleIndexer is an implementation of the abstract IndexingProviderBase class.
Inherited Members
Namespace: DotNetNuke.Services.Search
Assembly: DotNetNuke.dll
Syntax
public class ModuleIndexer : IndexingProviderBase
Constructors
| Improve this Doc View SourceModuleIndexer()
Initializes a new instance of the ModuleIndexer class.
Declaration
public ModuleIndexer()
ModuleIndexer(Boolean)
Initializes a new instance of the ModuleIndexer class.
Declaration
public ModuleIndexer(bool needSearchModules)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | needSearchModules |
Methods
| Improve this Doc View SourceConvertSearchItemInfoToSearchDocument(SearchItemInfo)
Converts a SearchItemInfo into a SearchDocument. SearchItemInfo object was used in the old version of search.
Declaration
public SearchDocument ConvertSearchItemInfoToSearchDocument(SearchItemInfo searchItem)
Parameters
Type | Name | Description |
---|---|---|
SearchItemInfo | searchItem |
Returns
Type | Description |
---|---|
SearchDocument | A new SearchDocument instance. |
GetModuleMetaData(Int32, DateTime)
Returns a collection of SearchDocuments containing module metadata (title, header, footer...) of Searchable Modules.
Declaration
public List<SearchDocument> GetModuleMetaData(int portalId, DateTime startDate)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | |
DateTime | startDate |
Returns
Type | Description |
---|---|
List<SearchDocument> | A |
GetSearchModules(Int32, Boolean)
The ModuleIndexer is an implementation of the abstract IndexingProviderBase class.
Declaration
protected IEnumerable<ModuleInfo> GetSearchModules(int portalId, bool allModules)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | |
System.Boolean | allModules |
Returns
Type | Description |
---|---|
IEnumerable<ModuleInfo> |
GetSearchModules(Int32)
Gets a list of modules that are listed as "Searchable" from the module definition and check if they implement ModuleSearchBase -- which is a newer implementation of search that replaces ISearchable.
Declaration
protected IEnumerable<ModuleInfo> GetSearchModules(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId |
Returns
Type | Description |
---|---|
IEnumerable<ModuleInfo> | A sequence of ModuleInfo instances. |
IndexSearchDocuments(Int32, ScheduleHistoryItem, DateTime, Action<IEnumerable<SearchDocument>>)
This method must save search documents in batches to minimize memory usage instead of returning all documents at once.
Declaration
public override int IndexSearchDocuments(int portalId, ScheduleHistoryItem schedule, DateTime startDateLocal, Action<IEnumerable<SearchDocument>> indexer)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | ID of the portal for which to index items. |
ScheduleHistoryItem | schedule | |
DateTime | startDateLocal | Minimum modification date of items that need to be indexed. |
Action<IEnumerable<SearchDocument>> | indexer | A delegate function to send the collection of documents to for saving/indexing. |
Returns
Type | Description |
---|---|
System.Int32 | The number of documents indexed. |