Browse Source

imports re-arrange

master
Indexea 2 years ago
parent
commit
7ea63c588d
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      elasticsearch/src/main/java/com/indexea/ideaseg/elasticsearch/IdeasegPlugin.java

+ 3
- 2
elasticsearch/src/main/java/com/indexea/ideaseg/elasticsearch/IdeasegPlugin.java View File

@@ -13,6 +13,7 @@ import org.elasticsearch.plugins.AnalysisPlugin;
import org.elasticsearch.plugins.Plugin;

import java.io.File;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.Map;
@@ -34,8 +35,8 @@ public class IdeasegPlugin extends Plugin implements AnalysisPlugin, PluginBase
home = Environment.PATH_HOME_SETTING.get(settings);
if (home == null)
throw new IllegalStateException(Environment.PATH_HOME_SETTING.getKey() + " is not configured");
Path pluginHome = java.nio.file.FileSystems.getDefault().getPath(home, "plugins", PLUGIN_NAME);
IdeasegIOAdapter.BASE_PATH = pluginHome.toString() + File.separator; //设置 HanLP 根目录
Path pluginHome = FileSystems.getDefault().getPath(home, "plugins", PLUGIN_NAME);
IdeasegIOAdapter.BASE_PATH = pluginHome + File.separator; //设置 HanLP 根目录
Predefine.HANLP_PROPERTIES_PATH = IdeasegIOAdapter.BASE_PATH + CONFIG_FILE_NAME;
}



Loading…
Cancel
Save