Interface IIndexRebuilder
Interface for rebuilding search indexes.
Namespace: Umbraco.Cms.Infrastructure.Examine
Assembly: Umbraco.Infrastructure.dll
Syntax
public interface IIndexRebuilder
Methods
View SourceCanRebuild(string)
Checks if the specified index can be rebuilt.
Declaration
bool CanRebuild(string indexName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | indexName | The name of the index to check. |
Returns
| Type | Description |
|---|---|
| bool | Whether the index can be rebuilt. |
IsRebuildingAsync(string)
Checks if the specified index is currently being rebuilt.
Declaration
Task<bool> IsRebuildingAsync(string indexName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | indexName | The name of the index to check. |
Returns
| Type | Description |
|---|---|
| Task<bool> | Whether the index is currently being rebuilt. |
RebuildIndex(string, TimeSpan?, bool)
Rebuilds the specified index.
Declaration
[Obsolete("Use RebuildIndexesAsync() instead. Scheduled for removal in V19.")]
void RebuildIndex(string indexName, TimeSpan? delay = null, bool useBackgroundThread = true)
Parameters
| Type | Name | Description |
|---|---|---|
| string | indexName | The name of the index to rebuild. |
| TimeSpan? | delay | The delay before starting the rebuild. |
| bool | useBackgroundThread | Whether to use a background thread for the rebuild. |
RebuildIndexAsync(string, TimeSpan?, bool)
Rebuilds the specified index.
Declaration
Task<Attempt<IndexRebuildResult>> RebuildIndexAsync(string indexName, TimeSpan? delay = null, bool useBackgroundThread = true)
Parameters
| Type | Name | Description |
|---|---|---|
| string | indexName | The name of the index to rebuild. |
| TimeSpan? | delay | The delay before starting the rebuild. |
| bool | useBackgroundThread | Whether to use a background thread for the rebuild. |
Returns
| Type | Description |
|---|---|
| Task<Attempt<IndexRebuildResult>> | A task representing the asynchronous operation. |
RebuildIndexes(bool, TimeSpan?, bool)
Rebuilds all indexes, or only those that are empty.
Declaration
[Obsolete("Use RebuildIndexesAsync() instead. Scheduled for removal in V19.")]
void RebuildIndexes(bool onlyEmptyIndexes, TimeSpan? delay = null, bool useBackgroundThread = true)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | onlyEmptyIndexes | Whether to only rebuild empty indexes. |
| TimeSpan? | delay | The delay before starting the rebuild. |
| bool | useBackgroundThread | Whether to use a background thread for the rebuild. |
RebuildIndexesAsync(bool, TimeSpan?, bool)
Rebuilds all indexes, or only those that are empty.
Declaration
Task<Attempt<IndexRebuildResult>> RebuildIndexesAsync(bool onlyEmptyIndexes, TimeSpan? delay = null, bool useBackgroundThread = true)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | onlyEmptyIndexes | Whether to only rebuild empty indexes. |
| TimeSpan? | delay | The delay before starting the rebuild. |
| bool | useBackgroundThread | Whether to use a background thread for the rebuild. |
Returns
| Type | Description |
|---|---|
| Task<Attempt<IndexRebuildResult>> | A task representing the asynchronous operation. |