Set Index Priority Operation

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

Setting the priority will affect the indexing thread priority at the operating system level:

Priority value Indexing thread priority
at OS level
Low Lowest
  • Having the Lowest priority at the OS level, indexes will run only when there's a capacity for them, when the system is not occupied with higher-priority tasks.
  • Requests to the database will complete faster.
    Use when querying the server is more important to you than indexing.
Normal (default) Below normal
  • Requests to the database are still preferred over the indexing process.
  • The indexing thread priority at the OS level is Below normal
    while Requests processes have a Normal priority.
High Normal
  • Requests and Indexing will have the same priority at the OS level.


public SetIndexesPriorityOperation(String indexName, IndexPriority priority) {
public SetIndexesPriorityOperation(SetIndexesPriorityOperation.Parameters parameters)

public enum IndexPriority {

public static class Parameters {
    private String[] indexNames;
    private IndexPriority priority;

    public String[] getIndexNames() {
        return indexNames;

    public void setIndexNames(String[] indexNames) {
        this.indexNames = indexNames;

    public IndexPriority getPriority() {
        return priority;

    public void setPriority(IndexPriority priority) {
        this.priority = priority;
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

    new SetIndexesPriorityOperation("Orders/Totals", IndexPriority.HIGH));

Example II

SetIndexesPriorityOperation.Parameters parameters = new SetIndexesPriorityOperation.Parameters();
parameters.setIndexNames(new String[]{ "Orders/Totals", "Orders/ByCompany" });

store.maintenance().send(new SetIndexesPriorityOperation(parameters));