src/main/java/io/redisearch/client/Client.java
@Deprecated
    @Override
    public boolean addHash(String docId, double score, boolean replace) {
        ArrayList<String> args = new ArrayList<>(4);
        args.add(indexName);
        args.add(docId);
        args.add(Double.toString(score));

        if (replace) {
            args.add(Keywords.REPLACE.name());
        }

        try (Jedis conn = connection()) {
            String resp = sendCommand(conn, commands.getAddHashCommand(), args.toArray(new String[args.size()])).getStatusCodeReply();
            return resp.equals("OK");
        }
    }
/**
     * Index a document already in redis as a HASH key.
     *
     * @param docId   the id of the document in redis. This must match an existing, unindexed HASH key
     * @param score   the document's index score, between 0 and 1
     * @param replace if set, and the document already exists, we reindex and update it
     * @return true on success
     * @deprecated does support starting from RediSearch 2.0
     */
Index a document already in redis as a HASH key.
@param docId   the id of the document in redis. This must match an existing, unindexed HASH key
@param score   the document's index score, between 0 and 1
@param replace if set, and the document already exists, we reindex and update it
@return true on success
@deprecated does support starting from RediSearch 2.0
Index a document already in redis as a HASH key . @param docId the id of the document in redis . This must match an existing unindexed HASH key @param score the document ' s index score between 0 and 1 @param replace if set and the document already exists we reindex and update it @return true on success @deprecated does support starting from RediSearch 2 . 0
@Deprecated
    @Override
    public boolean addHash(String docId, double score, boolean replace) {
        ArrayList<String> args = new ArrayList<>(4);
        args.add(indexName);
        args.add(docId);
        args.add(Double.toString(score));
        if (replace) {
            args.add(Keywords.REPLACE.name());
        }
        try (Jedis conn = connection()) {
            String resp = sendCommand(conn, commands.getAddHashCommand(), args.toArray(new String[args.size()])).getStatusCodeReply();
            return resp.equals("OK");
        }
    }
@ Deprecated @ Override public boolean addHash ( String docId , double score , boolean replace ) { ArrayList < String > args = new ArrayList < > ( 4 ) ; args . add ( indexName ) ; args . add ( docId ) ; args . add ( Double . toString ( score ) ) ; if ( replace ) { args . add ( Keywords . REPLACE . name ( ) ) ; } try ( Jedis conn = connection ( ) ) { String resp = sendCommand ( conn , commands . getAddHashCommand ( ) , args . toArray ( new String [ args . size ( ) ] ) ) . getStatusCodeReply ( ) ; return resp . equals ( "OK" ) ; } }
Index a document already in redis as a HASH key.
Index a document already in redis as a HASH key .