see on GitHub

Operations : How to Change Index Priority

SetIndexesPriorityOperation allows you to change an index priority for a given index or indexes.


public SetIndexesPriorityOperation(string indexName, IndexPriority priority);
public SetIndexesPriorityOperation(Parameters parameters);

public enum IndexPriority
    Low = 0,
    Normal = 1,
    High = 2

public class Parameters
    public string[] IndexNames { get; set; }
    public IndexPriority Priority { get; set; }

name string name of an index to change priority for
priority IndexingPriority new index priority
parameters SetIndexesPriorityOperation.Parameters list of indexes + new index priority

Example I

store.Maintenance.Send(new SetIndexesPriorityOperation("Orders/Totals", IndexPriority.High));

Example II

store.Maintenance.Send(new SetIndexesPriorityOperation(new SetIndexesPriorityOperation.Parameters
    IndexNames = new []{ "Orders/Totals", "Orders/ByCompany" },
    Priority = IndexPriority.Low