You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 5.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Commands: Indexes: How to change index priority?

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


void SetIndexPriority(string name, IndexingPriority priority);

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


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