see on GitHub

Commands: Indexes: How to change index lock mode?

setIndexLock method allows you to change index lock mode for a given index.

Syntax

void setIndexLock(String name, IndexLockMode lockMode);

Parameters
name string name of an index to change lock mode for
lockMode IndexLockMode new index lock mode

Example

store
  .getDatabaseCommands()
  .setIndexLock("Orders/Totals", IndexLockMode.LOCKED_IGNORE);