Commands: Indexes: How to change index priority?

SetIndexPriority method allows you to change index priority for a given index.

Syntax

void SetIndexPriority(string name, IndexingPriority priority);

[Flags]
private enum IndexingPriority
{
	None = 0,
	Normal = 1,
	Disabled = 2,
	Idle = 4,
	Abandoned = 8,
	Error = 16,
	Forced = 512,
}
Parameters
name string name of an index to change priority for
priority IndexingPriority new index priority

Example

store.DatabaseCommands.SetIndexPriority("Orders/Totals", IndexingPriority.Disabled);