@@ -50,14 +50,19 @@ public class WenshuService {
Wenshu wenshu = parseLineByWenshu(line);
if (wenshu != null) {
successCount++;
- /*list.add(wenshu);
+ list.add(wenshu);
if (list.size() > 10_000) {
addLuceneIndex(list);
list.clear();
- }*/
+ }
}
in.close();
+
+ if (!list.isEmpty()) {
+ addLuceneIndex(list);
+ list.clear();
@AllArgsConstructor