public FindByIndexOptions useIndex(String designDocument, String indexName) {
        assertNotNull(designDocument, "designDocument");
        assertNotNull(indexName, "indexName");
        JsonArray index = new JsonArray();
        index.add(new JsonPrimitive(designDocument));
        index.add(new JsonPrimitive(indexName));
        this.useIndex = index;
        return this;
    }
public FindByIndexOptions useIndex ( String designDocument , String indexName ) { assertNotNull ( designDocument , "designDocument" ) ; assertNotNull ( indexName , "indexName" ) ; JsonArray index = new JsonArray ( ) ; index . add ( new JsonPrimitive ( designDocument ) ) ; index . add ( new JsonPrimitive ( indexName ) ) ; this . useIndex = index ; return this ; }
Specify a specific index to run the query against

@param designDocument set the design document to use
@param indexName set the index name to use
@return this to set additional options