From 364ea1d88103d9f5fe8b519db05da3da9ce61031 Mon Sep 17 00:00:00 2001 From: ronger Date: Thu, 5 Jan 2023 10:21:41 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20lucene=20=E7=9B=AE=E5=BD=95=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/rymcu/forest/lucene/cfg/DefaultConfig.java | 2 +- src/main/java/com/rymcu/forest/lucene/dic/Dictionary.java | 2 +- .../com/rymcu/forest/lucene/util/ArticleIndexUtil.java | 2 +- .../java/com/rymcu/forest/lucene/util/LucenePath.java | 8 ++++---- .../com/rymcu/forest/lucene/util/PortfolioIndexUtil.java | 2 +- .../java/com/rymcu/forest/lucene/util/UserIndexUtil.java | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/rymcu/forest/lucene/cfg/DefaultConfig.java b/src/main/java/com/rymcu/forest/lucene/cfg/DefaultConfig.java index 92c2312..068143a 100644 --- a/src/main/java/com/rymcu/forest/lucene/cfg/DefaultConfig.java +++ b/src/main/java/com/rymcu/forest/lucene/cfg/DefaultConfig.java @@ -42,7 +42,7 @@ public class DefaultConfig implements Configuration { * 用户自定义字典路径 */ private static final String PATH_USER_DIC = - System.getProperty("user.dir") + "/lucene/userDic/userDic.dic"; + "lucene/userDic/userDic.dic"; /** * 配置属性——扩展字典 */ diff --git a/src/main/java/com/rymcu/forest/lucene/dic/Dictionary.java b/src/main/java/com/rymcu/forest/lucene/dic/Dictionary.java index 51fa7b2..0acb4c8 100644 --- a/src/main/java/com/rymcu/forest/lucene/dic/Dictionary.java +++ b/src/main/java/com/rymcu/forest/lucene/dic/Dictionary.java @@ -53,7 +53,7 @@ public class Dictionary { * 用户自定义词典路径 */ private static final String PATH_USER_DIC = - System.getProperty("user.dir") + "/lucene/userDic/userDic.dic"; + "lucene/userDic/userDic.dic"; /** * 配置对象 */ diff --git a/src/main/java/com/rymcu/forest/lucene/util/ArticleIndexUtil.java b/src/main/java/com/rymcu/forest/lucene/util/ArticleIndexUtil.java index eaeb772..aa1fc01 100644 --- a/src/main/java/com/rymcu/forest/lucene/util/ArticleIndexUtil.java +++ b/src/main/java/com/rymcu/forest/lucene/util/ArticleIndexUtil.java @@ -24,7 +24,7 @@ public class ArticleIndexUtil { * lucene索引保存目录 */ private static final String PATH = - System.getProperty("user.dir") + LucenePath.ARTICLE_INDEX_PATH; + LucenePath.ARTICLE_INDEX_PATH; /** * 删除所有运行中保存的索引 diff --git a/src/main/java/com/rymcu/forest/lucene/util/LucenePath.java b/src/main/java/com/rymcu/forest/lucene/util/LucenePath.java index d09ba56..4e4414a 100644 --- a/src/main/java/com/rymcu/forest/lucene/util/LucenePath.java +++ b/src/main/java/com/rymcu/forest/lucene/util/LucenePath.java @@ -10,7 +10,7 @@ public final class LucenePath { /** * lucene 目录 */ - public static final String INDEX_PATH = "/lucene/index"; + public static final String INDEX_PATH = "lucene/index"; /** * 文章 lucene 目录 @@ -21,7 +21,7 @@ public final class LucenePath { * 文章增量 lucene 目录 */ public static final String ARTICLE_INCREMENT_INDEX_PATH = - System.getProperty("user.dir") + ARTICLE_INDEX_PATH + "/index777"; + ARTICLE_INDEX_PATH + "/index777"; /** * 用户 lucene 目录 @@ -32,7 +32,7 @@ public final class LucenePath { * 用户增量 lucene 目录 */ public static final String USER_INCREMENT_INDEX_PATH = - System.getProperty("user.dir") + USER_PATH + "/index777"; + USER_PATH + "/index777"; /** * 作品集 lucene 目录 @@ -43,5 +43,5 @@ public final class LucenePath { * 作品集增量 lucene 目录 */ public static final String PORTFOLIO_INCREMENT_INDEX_PATH = - System.getProperty("user.dir") + PORTFOLIO_PATH + "/index777"; + PORTFOLIO_PATH + "/index777"; } diff --git a/src/main/java/com/rymcu/forest/lucene/util/PortfolioIndexUtil.java b/src/main/java/com/rymcu/forest/lucene/util/PortfolioIndexUtil.java index 7b3f84f..097692e 100644 --- a/src/main/java/com/rymcu/forest/lucene/util/PortfolioIndexUtil.java +++ b/src/main/java/com/rymcu/forest/lucene/util/PortfolioIndexUtil.java @@ -24,7 +24,7 @@ public class PortfolioIndexUtil { * lucene索引保存目录 */ private static final String PATH = - System.getProperty("user.dir") + StrUtil.SLASH + LucenePath.PORTFOLIO_PATH; + StrUtil.SLASH + LucenePath.PORTFOLIO_PATH; /** * 删除所有运行中保存的索引 diff --git a/src/main/java/com/rymcu/forest/lucene/util/UserIndexUtil.java b/src/main/java/com/rymcu/forest/lucene/util/UserIndexUtil.java index 9386324..2833e5e 100644 --- a/src/main/java/com/rymcu/forest/lucene/util/UserIndexUtil.java +++ b/src/main/java/com/rymcu/forest/lucene/util/UserIndexUtil.java @@ -25,7 +25,7 @@ public class UserIndexUtil { /** * lucene索引保存目录 */ - private static final String PATH = System.getProperty("user.dir") + StrUtil.SLASH + LucenePath.USER_PATH; + private static final String PATH = StrUtil.SLASH + LucenePath.USER_PATH; /** * 系统运行时索引保存目录