src/main/java/io/redisearch/client/Client.java
@Override
    public boolean alterIndex(Schema.Field ...fields) {

        ArrayList<String> args = new ArrayList<>();

        args.add(indexName);

        args.add(Keywords.SCHEMA.name());
        args.add(Keywords.ADD.name());

        for (Schema.Field f : fields) {
            f.serializeRedisArgs(args);
        }

        try (Jedis conn = connection()) {
            String rep = sendCommand(conn, commands.getAlterCommand(), args.toArray(new String[args.size()]))
                    .getStatusCodeReply();
            return rep.equals("OK");
        }
    }
/**
     * Alter index add fields
     *
     * @param fields list of fields
     * @return true if successful
     */
Alter index add fields
@param fields list of fields
@return true if successful
Alter index add fields @param fields list of fields @return true if successful
@Override
    public boolean alterIndex(Schema.Field ...fields) {
        ArrayList<String> args = new ArrayList<>();
        args.add(indexName);
        args.add(Keywords.SCHEMA.name());
        args.add(Keywords.ADD.name());
        for (Schema.Field f : fields) {
            f.serializeRedisArgs(args);
        }
        try (Jedis conn = connection()) {
            String rep = sendCommand(conn, commands.getAlterCommand(), args.toArray(new String[args.size()]))
                    .getStatusCodeReply();
            return rep.equals("OK");
        }
    }
@ Override public boolean alterIndex ( Schema . Field ... fields ) { ArrayList < String > args = new ArrayList < > ( ) ; args . add ( indexName ) ; args . add ( Keywords . SCHEMA . name ( ) ) ; args . add ( Keywords . ADD . name ( ) ) ; for ( Schema . Field f : fields ) { f . serializeRedisArgs ( args ) ; } try ( Jedis conn = connection ( ) ) { String rep = sendCommand ( conn , commands . getAlterCommand ( ) , args . toArray ( new String [ args . size ( ) ] ) ) . getStatusCodeReply ( ) ; return rep . equals ( "OK" ) ; } }
Alter index add fields
 @param fields list of fields
 @return true if successful
Alter index add fields @param fields list of fields @return true if successful