From d576d8ea8156b985de4cfdc77c4b0aad291a8fb7 Mon Sep 17 00:00:00 2001 From: XieChengzhi Date: Thu, 5 Dec 2024 16:57:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmindspore=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mindspore/src/main/java/App.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mindspore/src/main/java/App.java b/mindspore/src/main/java/App.java index 9d2c462..89481cf 100644 --- a/mindspore/src/main/java/App.java +++ b/mindspore/src/main/java/App.java @@ -18,6 +18,8 @@ public class App { private static final String INDEX_PREFIX = "mindspore_articles"; + public static Set idSet = new HashSet<>(); + public static void main(String[] args) { try { @@ -85,6 +87,7 @@ public static void updatePortal(String category, File indexFile) throws Exceptio if (escapeList != null && !escapeList.isEmpty() ) { for (Map escape : escapeList) { PublicClient.insert(escape, INDEX_PREFIX + "_" + escape.get("lang")); + idSet.add((String) escape.get("path")); } } else { System.out.println("parse null : " + paresFile.getPath()); @@ -105,8 +108,6 @@ public static void fileDate() throws Exception { System.out.println("begin to update document,开始更新"); - Set idSet = new HashSet<>(); - Collection listFiles = FileUtils.listFiles(indexFile, new String[]{"md", "html"}, true); for (File paresFile : listFiles) {