Class SearchDocument
The document that will be stored in Search Index.
Inherited Members
Namespace: DotNetNuke.Services.Search.Entities
Assembly: DotNetNuke.dll
Syntax
public class SearchDocument : SearchDocumentToDelete
Remarks
Each document is one discrete unit of content to be indexed and is independent from other Documents.
Constructors
| Improve this Doc View SourceSearchDocument()
Initializes a new instance of the SearchDocument class.
Declaration
public SearchDocument()
Remarks
Each document is one discrete unit of content to be indexed and is independent from other Documents.
Properties
| Improve this Doc View SourceBody
Gets or sets content's Body.
Declaration
public string Body { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
HTML tags are stripped from this property, but certain HTML attribute values will be retain, ie. alt and title attribute values.
Description
Gets or sets content's Description.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Description should generally be no more than two sentences. This property is used by RSS Syndication. It is also used in search result when highlighted text is not found during searching. HTML tags are stripped from this property, but certain HTML attribute values will be retain, ie. alt and title attribute values.
IsActive
Gets or sets a value indicating whether flag to indicate if Content is Active or Not. Content will be deleted from Index when IsActive = false. Default is True.
Declaration
public bool IsActive { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Each document is one discrete unit of content to be indexed and is independent from other Documents.
ModifiedTimeUtc
Gets or sets time when Content was last modified (in Utc).
Declaration
public DateTime ModifiedTimeUtc { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
Remarks
Each document is one discrete unit of content to be indexed and is independent from other Documents.
Permissions
Gets or sets a string representation of roles and users who have view (or denied view) permissions.
Declaration
public string Permissions { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
The Permission property is same as how it�s implement internally in the Platform. Allow or Deny permission can be specified for RoleNamess and / or UserIds. A semicolon must be specified to separate two RoleName or UserId. "!Translator (en-US);![3];[5];Administrators; ContentEditorRole" ! -- identifies denied permission [n] -- identifies UserId Above example denies permission to Role �Translator (en-Us)� and UserId 3, but allows permission to Roles �Administrators� and �ContentEditorRole� and UserId.
Tags
Gets or sets tags can be specified as additional information.
Declaration
public IEnumerable<string> Tags { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<System.String> |
Remarks
Each document is one discrete unit of content to be indexed and is independent from other Documents.
Title
Gets or sets content's Title.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
HTML tags are stripped from this property, but certain HTML attribute values will be retain, ie. alt and title attribute values.
Url
Gets or sets url for the indexed item.
Declaration
public string Url { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Usually TabId or ModuleId is enough to generate Document Url in Search Result. However, Url field is used if present in SearchResult.
Methods
| Improve this Doc View SourceToString()
The document that will be stored in Search Index.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
Remarks
This is overriden to present current instance as JSON string.