src/main/java/io/redisearch/client/Client.java
@Override
    public boolean[] addDocuments(AddOptions options, Document... docs){
    	try (Jedis conn = connection()) {
	    	for(Document doc : docs) {
	    		addDocument(doc, options, conn);
	    	}
	    	List<Object> objects = conn.getClient().getMany(docs.length);
	    	boolean[] results = new boolean[docs.length];
	    	int i=0;
	    	for(Object obj : objects) {
	    		results[i++] = !(obj instanceof JedisDataException) && 
	    		SafeEncoder.encode((byte[]) obj).equals("OK");
	    	}
	    	return results;
    	}
    }
/**
     * Add a batch of documents to the index
     * @param options Options for the operation
     * @param docs The documents to add
     * @return true on success for each document 
     */
Add a batch of documents to the index
@param options Options for the operation
@param docs The documents to add
@return true on success for each document
Add a batch of documents to the index @param options Options for the operation @param docs The documents to add @return true on success for each document
@Override
    public boolean[] addDocuments(AddOptions options, Document... docs){
    	try (Jedis conn = connection()) {
	    	for(Document doc : docs) {
	    		addDocument(doc, options, conn);
	    	}
	    	List<Object> objects = conn.getClient().getMany(docs.length);
	    	boolean[] results = new boolean[docs.length];
	    	int i=0;
	    	for(Object obj : objects) {
	    		results[i++] = !(obj instanceof JedisDataException) && 
	    		SafeEncoder.encode((byte[]) obj).equals("OK");
	    	}
	    	return results;
    	}
    }
@ Override public boolean [ ] addDocuments ( AddOptions options , Document ... docs ) { try ( Jedis conn = connection ( ) ) { for ( Document doc : docs ) { addDocument ( doc , options , conn ) ; } List < Object > objects = conn . getClient ( ) . getMany ( docs . length ) ; boolean [ ] results = new boolean [ docs . length ] ; int i = 0 ; for ( Object obj : objects ) { results [ i ++ ] = ! ( obj instanceof JedisDataException ) && SafeEncoder . encode ( ( byte [ ] ) obj ) . equals ( "OK" ) ; } return results ; } }
Add a batch of documents to the index
 @param options Options for the operation
 @param docs The documents to add
 @return true on success for each document
Add a batch of documents to the index @param options Options for the operation @param docs The documents to add @return true on success for each document