Interface IInternalSearchController
Internal Search Controller Interface.
Namespace: DotNetNuke.Services.Search.Internals
Assembly: DotNetNuke.dll
Syntax
public interface IInternalSearchController
Remarks
This is an Internal interface and should not be used outside of Core.
Methods
| Improve this Doc View SourceAddSearchDocument(SearchDocument)
Add a Search Document to Search Index.
Declaration
void AddSearchDocument(SearchDocument searchDocument)
Parameters
Type | Name | Description |
---|---|---|
SearchDocument | searchDocument |
Remarks
This is an Internal interface and should not be used outside of Core.
AddSearchDocuments(IEnumerable<SearchDocument>)
Adds the collection of search documents to the search index.
Declaration
void AddSearchDocuments(IEnumerable<SearchDocument> searchDocumentList)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<SearchDocument> | searchDocumentList |
Remarks
The controller auto-commits at the end of this method.
Commit()
Commits individually added/deleted documents to the search index.
Declaration
void Commit()
Remarks
This is an Internal interface and should not be used outside of Core.
DeleteAllDocuments(Int32, Int32)
Deletes all documents of a specified portal and search type (used for re-index operation).
Declaration
void DeleteAllDocuments(int portalId, int searchTypeId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | |
System.Int32 | searchTypeId |
Remarks
This is an Internal interface and should not be used outside of Core.
DeleteSearchDocument(SearchDocument)
Delete a Search Document from the Search Index. REQUIRES: searchDocument to have PortalId, UniqueKey, SearchTypeId properties set.
Declaration
void DeleteSearchDocument(SearchDocument searchDocument)
Parameters
Type | Name | Description |
---|---|---|
SearchDocument | searchDocument |
Remarks
This is an Internal interface and should not be used outside of Core.
DeleteSearchDocumentsByModule(Int32, Int32, Int32)
Delete all search documents related to a particular module.
Declaration
void DeleteSearchDocumentsByModule(int portalId, int moduleId, int moduleDefId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | |
System.Int32 | moduleId | |
System.Int32 | moduleDefId |
Remarks
This is an Internal interface and should not be used outside of Core.
GetSearchContentSourceList(Int32)
Get a List of Search Content Source that participate in Search.
Declaration
IEnumerable<SearchContentSource> GetSearchContentSourceList(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId |
Returns
Type | Description |
---|---|
IEnumerable<SearchContentSource> | A sequence of SearchContentSource instances. |
Remarks
This is an Internal interface and should not be used outside of Core.
GetSearchDocumentTypeDisplayName(SearchResult)
Get Friendly Display Name for the Search Result.
Declaration
string GetSearchDocumentTypeDisplayName(SearchResult searchResult)
Parameters
Type | Name | Description |
---|---|---|
SearchResult | searchResult |
Returns
Type | Description |
---|---|
System.String | The display name or |
Remarks
SearchTypeId is used primarily to obtain this value. Multiple SearchTypeId can map to same Display Name, e.g. Tab, Module, Html/Module all map to Pages. For SearchTypeId=module, ModuleDefinitionId is also used. Module's display name is used unless an entry is found in ~/DesktopModules/Admin/SearchResults/App_LocalResources/SearchableModules.resx for the Module_[MODULENAME].txt is found.
GetSearchStatistics()
Returns current search indexes general information.
Declaration
SearchStatistics GetSearchStatistics()
Returns
Type | Description |
---|---|
SearchStatistics | A SearchStatistics instance or null. |
Remarks
This is an Internal interface and should not be used outside of Core.
OptimizeSearchIndex()
Optimize the search index files by compacting and removing previously deleted search documents.
The call will return immediately and the operation runs on a background thread.
Declaration
bool OptimizeSearchIndex()
Returns
Type | Description |
---|---|
System.Boolean | True is optimization was scheduled to run in the background, false otherwise. |
Remarks
This is a costly operation which consumes substantial CPU and I/O resources, therefore use it judiciously. If your site has a a single server that performs both indexing and searching, then you should consider running the optimize operation after hours or over the weekend so that it does not interfere with ongoing search activities.