code: private void createIndex(String tableName, String indexName, String... fieldNames)
      {
          StringBuilder builder = new StringBuilder();
          builder.append("CREATE INDEX IF NOT EXISTS ");
          builder.append(indexName);
          builder.append(" ON ");
          builder.append(tableName);
          builder.append(Constants.OPEN_ROUND_BRACKET);
          for (String fieldName : fieldNames)
          {
              builder.append(fieldName);
              builder.append(Constants.COMMA);
          }
          builder.deleteCharAt(builder.length() - 1);
          builder.append(Constants.CLOSE_ROUND_BRACKET);
          StatementResult result = tableAPI.executeSync(builder.toString());
          if (!result.isSuccessful())
          {
              throw new SchemaGenerationException("Unable to CREATE Index with Index Name [" + indexName
                      + "] for table [" + tableName + "]");
          }
      }
docs: Creates the index.
  
  @param tableName
  the table name
  @param indexName
  the index name
  @param fieldName
  the field name