protected static void addIndex(InteractionProtocol protocol, String name, String path, int replicationLevel) {
IDeployClient deployClient = new DeployClient(protocol);
if (name.trim().equals("*")) {
throw new IllegalArgumentException("Index with name " + name + " isn't allowed.");
}
if (deployClient.existsIndex(name)) {
throw new IllegalArgumentException("Index with name " + name + " already exists.");
}
try {
long startTime = System.currentTimeMillis();