src/main/java/io/redisearch/client/Client.java
@Override
    public boolean createIndex(Schema schema, IndexOptions options) {

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

        args.add(indexName);

        options.serializeRedisArgs(args);

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

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

        try (Jedis conn = connection()) {
            String rep = sendCommand(conn, commands.getCreateCommand(), args.toArray(new String[args.size()]))
                    .getStatusCodeReply();
            return rep.equals("OK");
        }
    }
/**
     * Create the index definition in redis
     *
     * @param schema  a schema definition, see {@link Schema}
     * @param options index option flags, see {@link IndexOptions}
     * @return true if successful
     */
Create the index definition in redis
@param schema  a schema definition, see  Schema
@param options index option flags, see  IndexOptions
@return true if successful
Create the index definition in redis @param schema a schema definition see Schema @param options index option flags see IndexOptions @return true if successful
@Override
    public boolean createIndex(Schema schema, IndexOptions options) {
        ArrayList<String> args = new ArrayList<>();
        args.add(indexName);
        options.serializeRedisArgs(args);
        args.add(Keywords.SCHEMA.name());
        for (Schema.Field f : schema.fields) {
            f.serializeRedisArgs(args);
        }
        try (Jedis conn = connection()) {
            String rep = sendCommand(conn, commands.getCreateCommand(), args.toArray(new String[args.size()]))
                    .getStatusCodeReply();
            return rep.equals("OK");
        }
    }
@ Override public boolean createIndex ( Schema schema , IndexOptions options ) { ArrayList < String > args = new ArrayList < > ( ) ; args . add ( indexName ) ; options . serializeRedisArgs ( args ) ; args . add ( Keywords . SCHEMA . name ( ) ) ; for ( Schema . Field f : schema . fields ) { f . serializeRedisArgs ( args ) ; } try ( Jedis conn = connection ( ) ) { String rep = sendCommand ( conn , commands . getCreateCommand ( ) , args . toArray ( new String [ args . size ( ) ] ) ) . getStatusCodeReply ( ) ; return rep . equals ( "OK" ) ; } }
Create the index definition in redis
 @param schema  a schema definition, see {@link Schema}
 @param options index option flags, see {@link IndexOptions}
 @return true if successful
Create the index definition in redis @param schema a schema definition see { @link Schema } @param options index option flags see { @link IndexOptions } @return true if successful