Class IndexBuilder
Index Builder. Contains common methods needed during indexing process, does not actually build indexes.
Inheritance
Namespace: Mediachase.Search
Assembly: Mediachase.Search.dll
Version: 14.26.0Syntax
public class IndexBuilder : Object
Constructors
IndexBuilder(String, String, String)
Default constructor.
Declaration
public IndexBuilder(string directoryPath, string indexerName, string applicationName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | directoryPath | Location of the index files. |
| System.String | indexerName | Name of the indexer. |
| System.String | applicationName | Name of the application. |
Properties
ApplicationName
The application name.
Declaration
public string ApplicationName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
BuildDate
Gets or sets the build date.
Declaration
public DateTime BuildDate { get; set; }
Property Value
| Type | Description |
|---|---|
| System.DateTime | The build date. |
DirectoryPath
The configured base indexer path.
Declaration
public string DirectoryPath { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
This field is passed in to the constructor; this class does not get it directly from the configuration provider.
IndexerName
The configured Indexer name.
Declaration
public string IndexerName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
AddDocument(ISearchDocument)
Adds the document.
Declaration
public void AddDocument(ISearchDocument doc)
Parameters
| Type | Name | Description |
|---|---|---|
| ISearchDocument | doc | The doc. |
Commit()
Commit build index.
Declaration
public void Commit()
CommitAndClose()
Declaration
public void CommitAndClose()
DeleteAllContent()
Deletes all content from the search index.
Declaration
public void DeleteAllContent()
DeleteContent(String, String)
Delete existing content from the search index.
Declaration
public int DeleteContent(string field, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | field | The field. |
| System.String | value | The value. |
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetBuildConfig()
Gets the build config.
Declaration
public Build GetBuildConfig()
Returns
| Type | Description |
|---|---|
| Build |
ReadConfig()
Reads the build config from config file.
Declaration
protected virtual Build ReadConfig()
Returns
| Type | Description |
|---|---|
| Build |
SaveBuild(Status)
Saves the build.
Declaration
public void SaveBuild(Status status)
Parameters
| Type | Name | Description |
|---|---|---|
| Status | status | The status. |
SaveBuild(Status, DateTime)
Saves the build.
Declaration
public void SaveBuild(Status status, DateTime buildDateTime)
Parameters
| Type | Name | Description |
|---|---|---|
| Status | status | |
| System.DateTime | buildDateTime |
SaveConfig(Build)
Reads the build config from config file.
Declaration
protected virtual void SaveConfig(Build config)
Parameters
| Type | Name | Description |
|---|---|---|
| Build | config |