public static void removeAllDocument() {
int count = 0;
while (true) {
List<String> docIds = new ArrayList<String>();
// Return a set of document IDs.
ListRequest request = ListRequest.newBuilder()
.setReturningIdsOnly(true).build();
ListResponse<Document> response = INDEX.listDocuments(request);
if (response.getResults().isEmpty()) {
break;
}