.println("Remove " + count + " document from Index success !");
}
public static void reindex() {
int count = 0;
TubeModel tubeModel = new TubeModel();
tubeModel.setPage(1);
while (true) {
tubeModel.setLimit(488);
tubeModel.getTubes(false);
List<Tube> list = tubeModel.getListResult();
for (Tube tube : list) {
index(tube);
count++;
}
if (list.size() < 488) {
break;
}
tubeModel.setPage(tubeModel.getPage() + 1);
}
System.out.println("Index " + count
+ " document from Tube table success !");
}