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