contentMap = response.getContentAsMap();
+ if (!Constants.TRUE.equalsIgnoreCase(contentMap.get("acknowledged").toString())) {
+ throw new DictionaryException("Failed to update " + dictFile.getPath());
+ }
+ } catch (IOException e) {
+ throw new DictionaryException("Failed to update " + dictFile.getPath(), e);
+ }
+
+ }).orElse(() -> {
+ throw new DictionaryException(dictFile.getPath() + " does not exist.");
+ });
}
public InputStream getContentInputStream(DictionaryFile extends DictionaryItem> dictFile) {
try {
- return Curl.get(esUrl + "/_configsync/file").param("path", dictFile.getPath()).execute().getContentAsStream();
+ return Curl.get(getUrl() + "/_configsync/file").param("path", dictFile.getPath()).execute().getContentAsStream();
} catch (IOException e) {
throw new DictionaryException("Failed to access " + dictFile.getPath(), e);
}
}
- public String getEsUrl() {
- return esUrl;
- }
-
- public void setEsUrl(String esUrl) {
- this.esUrl = esUrl;
- }
-
public void addCreator(DictionaryCreator creator) {
creatorList.add(creator);
}
+ protected String getUrl() {
+ return crawlerProperties.getProperty(Constants.ELASTICSEARCH_WEB_URL_PROPERTY, Constants.ELASTICSEARCH_WEB_URL);
+ }
}
diff --git a/src/main/java/org/codelibs/fess/helper/SuggestHelper.java b/src/main/java/org/codelibs/fess/helper/SuggestHelper.java
index 476094a3a..95598d3ce 100644
--- a/src/main/java/org/codelibs/fess/helper/SuggestHelper.java
+++ b/src/main/java/org/codelibs/fess/helper/SuggestHelper.java
@@ -22,6 +22,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import org.codelibs.core.lang.StringUtil;
@@ -42,6 +43,7 @@ public class SuggestHelper {
public String badwordFileDir = "./solr/core1/conf/";
+ @PostConstruct
public void init() {
final Thread th = new Thread(() -> {
// TODO replace with Elasticsearch
diff --git a/src/main/java/org/codelibs/fess/mylasta/action/FessHtmlPath.java b/src/main/java/org/codelibs/fess/mylasta/action/FessHtmlPath.java
index fd3647e78..3bcb073ac 100644
--- a/src/main/java/org/codelibs/fess/mylasta/action/FessHtmlPath.java
+++ b/src/main/java/org/codelibs/fess/mylasta/action/FessHtmlPath.java
@@ -20,9 +20,6 @@ public interface FessHtmlPath {
/** The path of the HTML: /admin/boostdocumentrule/index.jsp */
HtmlNext path_AdminBoostdocumentrule_IndexJsp = new HtmlNext("/admin/boostdocumentrule/index.jsp");
- /** The path of the HTML: /admin/crawl/index.jsp */
- HtmlNext path_AdminCrawl_IndexJsp = new HtmlNext("/admin/crawl/index.jsp");
-
/** The path of the HTML: /admin/crawlingsession/confirm.jsp */
HtmlNext path_AdminCrawlingsession_ConfirmJsp = new HtmlNext("/admin/crawlingsession/confirm.jsp");
@@ -128,6 +125,9 @@ public interface FessHtmlPath {
/** The path of the HTML: /admin/fileconfig/index.jsp */
HtmlNext path_AdminFileconfig_IndexJsp = new HtmlNext("/admin/fileconfig/index.jsp");
+ /** The path of the HTML: /admin/general/index.jsp */
+ HtmlNext path_AdminGeneral_IndexJsp = new HtmlNext("/admin/general/index.jsp");
+
/** The path of the HTML: /admin/group/confirm.jsp */
HtmlNext path_AdminGroup_ConfirmJsp = new HtmlNext("/admin/group/confirm.jsp");
diff --git a/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java b/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java
index fb077800f..18d8a17e4 100644
--- a/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java
+++ b/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java
@@ -3613,6 +3613,9 @@ public class FessLabels extends ActionMessages {
/** The key of the message: Toggle navigation */
public static final String LABELS_admin_toggle_navi = "{labels.admin_toggle_navi}";
+ /** The key of the message: Search Server URL */
+ public static final String LABELS_es_http_url = "{labels.es_http_url}";
+
/** The key of the message: */
public static final String LABELS_LABEL_TYPE_IDS = "{labels.labelTypeIds}";
diff --git a/src/main/resources/app.xml b/src/main/resources/app.xml
index 4abe69586..02cbe2cfd 100644
--- a/src/main/resources/app.xml
+++ b/src/main/resources/app.xml
@@ -8,7 +8,6 @@
-
@@ -280,8 +279,6 @@
-
-
@@ -326,4 +323,17 @@
-->
+
+
+ userDictCreator
+
+
+ synonymCreator
+
+
+
+
+
+
+
diff --git a/src/main/resources/fess_dict.xml b/src/main/resources/fess_dict.xml
deleted file mode 100644
index 7b672c9b2..000000000
--- a/src/main/resources/fess_dict.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "http://localhost:9201"
-
- userDictCreator
-
-
- synonymCreator
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/resources/fess_label.properties b/src/main/resources/fess_label.properties
index d19d75373..e98a881a5 100644
--- a/src/main/resources/fess_label.properties
+++ b/src/main/resources/fess_label.properties
@@ -1236,4 +1236,5 @@ labels.crud_title_details=Details
labels.crud_title_confirm=Confirmation
labels.admin_brand_title=Fess
labels.admin_dashboard_title=Fess Dashboard
-labels.admin_toggle_navi=Toggle navigation
\ No newline at end of file
+labels.admin_toggle_navi=Toggle navigation
+labels.es_http_url=Search Server URL
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/view/admin/crawl/index.jsp b/src/main/webapp/WEB-INF/view/admin/general/index.jsp
similarity index 97%
rename from src/main/webapp/WEB-INF/view/admin/crawl/index.jsp
rename to src/main/webapp/WEB-INF/view/admin/general/index.jsp
index 05240db7d..90f3f0db7 100644
--- a/src/main/webapp/WEB-INF/view/admin/crawl/index.jsp
+++ b/src/main/webapp/WEB-INF/view/admin/general/index.jsp
@@ -10,7 +10,7 @@
-
+
@@ -43,6 +43,10 @@
<%-- Form Fields --%>
+
+
+
+