Commands: Indexes: How to change index priority?

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

Syntax

public void setIndexPriority(String name, IndexingPriority priority);

@UseSharpEnum
public static enum IndexingPriority {
  NONE(0),
  NORMAL(1),
  DISABLED(2),
  IDLE(4),
  ABANDONED(8),
  ERROR(16),
  FORCED(512);

  private int code;

  private IndexingPriority(int code) {
    this.code = code;
  }

  public int getCode() {
    return code;
  }
}
Parameters
name string name of an index to change priority for
priority IndexingPriority new index priority

Example

store.getDatabaseCommands().setIndexPriority("Orders/Totals", IndexingPriority.DISABLED);