fix #2537 add elasticsearch.type
This commit is contained in:
parent
60ace8e8e5
commit
0afd9776dd
17 changed files with 3797 additions and 39 deletions
|
@ -449,4 +449,10 @@ public class Constants extends CoreLibConstants {
|
|||
public static final String XERCES_FEATURE_PREFIX = "http://apache.org/xml/features/";
|
||||
|
||||
public static final String LOAD_EXTERNAL_DTD_FEATURE = "nonvalidating/load-external-dtd";
|
||||
|
||||
public static final String FESEN_TYPE_CLOUD = "cloud";
|
||||
|
||||
public static final String FESEN_USERNAME = "fesen.username";
|
||||
|
||||
public static final String FESEN_PASSWORD = "fesen.password";
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@ public abstract class FessAdminAction extends FessBaseAction {
|
|||
.map(user -> user.hasRoles(fessConfig.getAuthenticationAdminRolesAsArray()) || user.hasRole(getActionRole())).orElse(false);
|
||||
runtime.registerData("editable", editable);
|
||||
runtime.registerData("editableClass", editable ? StringUtil.EMPTY : "disabled");
|
||||
runtime.registerData("fesenType", fessConfig.getFesenType());
|
||||
final String forumLink = systemHelper.getForumLink();
|
||||
if (StringUtil.isNotBlank(forumLink)) {
|
||||
runtime.registerData("forumLink", forumLink);
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright 2012-2021 CodeLibs Project and the Others.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
* either express or implied. See the License for the specific language
|
||||
* governing permissions and limitations under the License.
|
||||
*/
|
||||
package org.codelibs.fess.es.client;
|
||||
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.fesen.client.Client;
|
||||
import org.codelibs.fesen.client.HttpClient;
|
||||
import org.codelibs.fesen.common.settings.Settings;
|
||||
import org.codelibs.fesen.common.settings.Settings.Builder;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.crawler.client.FesenClient;
|
||||
import org.codelibs.fess.mylasta.direction.FessConfig;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
|
||||
public class CrawlerEngineClient extends FesenClient {
|
||||
protected Client createClient() {
|
||||
final Builder builder = Settings.builder().putList("http.hosts", address);
|
||||
final FessConfig fessConfig = ComponentUtil.getFessConfig();
|
||||
final String username = fessConfig.getFesenUsername();
|
||||
final String password = fessConfig.getFesenPassword();
|
||||
if (StringUtil.isNotBlank(username) && StringUtil.isNotBlank(password)) {
|
||||
builder.put(Constants.FESEN_USERNAME, username);
|
||||
builder.put(Constants.FESEN_PASSWORD, password);
|
||||
}
|
||||
return new HttpClient(builder.build(), null);
|
||||
}
|
||||
}
|
|
@ -52,6 +52,7 @@ import org.codelibs.core.lang.StringUtil;
|
|||
import org.codelibs.core.lang.ThreadUtil;
|
||||
import org.codelibs.curl.CurlResponse;
|
||||
import org.codelibs.fesen.FesenException;
|
||||
import org.codelibs.fesen.FesenStatusException;
|
||||
import org.codelibs.fesen.action.ActionFuture;
|
||||
import org.codelibs.fesen.action.ActionListener;
|
||||
import org.codelibs.fesen.action.ActionRequest;
|
||||
|
@ -127,6 +128,7 @@ import org.codelibs.fesen.common.xcontent.XContentType;
|
|||
import org.codelibs.fesen.index.query.InnerHitBuilder;
|
||||
import org.codelibs.fesen.index.query.QueryBuilder;
|
||||
import org.codelibs.fesen.index.query.QueryBuilders;
|
||||
import org.codelibs.fesen.rest.RestStatus;
|
||||
import org.codelibs.fesen.runner.FesenRunner;
|
||||
import org.codelibs.fesen.runner.FesenRunner.Configs;
|
||||
import org.codelibs.fesen.search.SearchHit;
|
||||
|
@ -244,29 +246,37 @@ public class SearchEngineClient implements Client {
|
|||
String httpAddress = System.getProperty(Constants.FESS_ES_HTTP_ADDRESS);
|
||||
if (StringUtil.isBlank(httpAddress)) {
|
||||
if (runner == null) {
|
||||
runner = new FesenRunner();
|
||||
final Configs config = newConfigs().clusterName(clusterName).numOfNode(1).useLogger();
|
||||
final String esDir = System.getProperty("fess.es.dir");
|
||||
if (esDir != null) {
|
||||
config.basePath(esDir);
|
||||
switch (fessConfig.getFesenType()) {
|
||||
case Constants.FESEN_TYPE_CLOUD:
|
||||
httpAddress = org.codelibs.fess.util.ResourceUtil.getFesenHttpUrl();
|
||||
break;
|
||||
default:
|
||||
runner = new FesenRunner();
|
||||
final Configs config = newConfigs().clusterName(clusterName).numOfNode(1).useLogger();
|
||||
final String esDir = System.getProperty("fess.es.dir");
|
||||
if (esDir != null) {
|
||||
config.basePath(esDir);
|
||||
}
|
||||
config.disableESLogger();
|
||||
runner.onBuild((number, settingsBuilder) -> {
|
||||
final File pluginDir = new File(esDir, "plugins");
|
||||
if (pluginDir.isDirectory()) {
|
||||
settingsBuilder.put("path.plugins", pluginDir.getAbsolutePath());
|
||||
} else {
|
||||
settingsBuilder.put("path.plugins", new File(System.getProperty("user.dir"), "plugins").getAbsolutePath());
|
||||
}
|
||||
if (settings != null) {
|
||||
settingsBuilder.putProperties(settings, s -> s);
|
||||
}
|
||||
});
|
||||
runner.build(config);
|
||||
|
||||
final int port = runner.node().settings().getAsInt("http.port", 9200);
|
||||
httpAddress = "http://localhost:" + port;
|
||||
logger.warn("Embedded Fesen is running. This configuration is not recommended for production use.");
|
||||
break;
|
||||
}
|
||||
config.disableESLogger();
|
||||
runner.onBuild((number, settingsBuilder) -> {
|
||||
final File pluginDir = new File(esDir, "plugins");
|
||||
if (pluginDir.isDirectory()) {
|
||||
settingsBuilder.put("path.plugins", pluginDir.getAbsolutePath());
|
||||
} else {
|
||||
settingsBuilder.put("path.plugins", new File(System.getProperty("user.dir"), "plugins").getAbsolutePath());
|
||||
}
|
||||
if (settings != null) {
|
||||
settingsBuilder.putProperties(settings, s -> s);
|
||||
}
|
||||
});
|
||||
runner.build(config);
|
||||
}
|
||||
final int port = runner.node().settings().getAsInt("http.port", 9200);
|
||||
httpAddress = "http://localhost:" + port;
|
||||
logger.warn("Embedded Fesen is running. This configuration is not recommended for production use.");
|
||||
}
|
||||
client = createHttpClient(fessConfig, httpAddress);
|
||||
|
||||
|
@ -332,6 +342,10 @@ public class SearchEngineClient implements Client {
|
|||
|
||||
protected Client createHttpClient(final FessConfig fessConfig, final String host) {
|
||||
final Builder builder = Settings.builder().putList("http.hosts", host).put("processors", fessConfig.availableProcessors());
|
||||
if (StringUtil.isNotBlank(fessConfig.getFesenUsername()) && StringUtil.isNotBlank(fessConfig.getFesenPassword())) {
|
||||
builder.put(Constants.FESEN_USERNAME, fessConfig.getFesenUsername());
|
||||
builder.put(Constants.FESEN_PASSWORD, fessConfig.getFesenPassword());
|
||||
}
|
||||
return new HttpClient(builder.build(), null);
|
||||
}
|
||||
|
||||
|
@ -382,12 +396,20 @@ public class SearchEngineClient implements Client {
|
|||
final boolean uploadConfig) {
|
||||
final FessConfig fessConfig = ComponentUtil.getFessConfig();
|
||||
|
||||
final String fesenType = fessConfig.getFesenType();
|
||||
if (uploadConfig) {
|
||||
waitForConfigSyncStatus();
|
||||
sendConfigFiles(index);
|
||||
switch (fesenType) {
|
||||
case Constants.FESEN_TYPE_CLOUD:
|
||||
// nothing
|
||||
break;
|
||||
default:
|
||||
waitForConfigSyncStatus();
|
||||
sendConfigFiles(index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
final String indexConfigFile = indexConfigPath + "/" + index + ".json";
|
||||
final String indexConfigFile = getResourcePath(indexConfigPath, fesenType, "/" + index + ".json");
|
||||
try {
|
||||
String source = FileUtil.readUTF8(indexConfigFile);
|
||||
String dictionaryPath = System.getProperty("fess.dictionary.path", StringUtil.EMPTY);
|
||||
|
@ -413,6 +435,14 @@ public class SearchEngineClient implements Client {
|
|||
return false;
|
||||
}
|
||||
|
||||
protected String getResourcePath(final String basePath, final String type, final String path) {
|
||||
final String target = basePath + "/_" + type + path;
|
||||
if (ResourceUtil.getResourceNoException(target) != null) {
|
||||
return target;
|
||||
}
|
||||
return basePath + path;
|
||||
}
|
||||
|
||||
public void addMapping(final String index, final String docType, final String indexName) {
|
||||
final FessConfig fessConfig = ComponentUtil.getFessConfig();
|
||||
|
||||
|
@ -421,7 +451,7 @@ public class SearchEngineClient implements Client {
|
|||
final ImmutableOpenMap<String, MappingMetadata> indexMappings = getMappingsResponse.mappings().get(indexName);
|
||||
if (indexMappings == null || !indexMappings.containsKey("properties")) {
|
||||
String source = null;
|
||||
final String mappingFile = indexConfigPath + "/" + index + "/" + docType + ".json";
|
||||
final String mappingFile = getResourcePath(indexConfigPath, fessConfig.getFesenType(), "/" + index + "/" + docType + ".json");
|
||||
try {
|
||||
source = FileUtil.readUTF8(mappingFile);
|
||||
} catch (final Exception e) {
|
||||
|
@ -436,12 +466,13 @@ public class SearchEngineClient implements Client {
|
|||
logger.warn("Failed to create {}/{} mapping.", indexName, docType);
|
||||
}
|
||||
|
||||
final String dataPath = indexConfigPath + "/" + index + "/" + docType + ".bulk";
|
||||
final String dataPath = getResourcePath(indexConfigPath, fessConfig.getFesenType(), "/" + index + "/" + docType + ".bulk");
|
||||
if (ResourceUtil.isExist(dataPath)) {
|
||||
insertBulkData(fessConfig, indexName, dataPath);
|
||||
}
|
||||
split(fessConfig.getAppExtensionNames(), ",").of(stream -> stream.filter(StringUtil::isNotBlank).forEach(name -> {
|
||||
final String bulkPath = indexConfigPath + "/" + index + "/" + docType + "_" + name + ".bulk";
|
||||
final String bulkPath =
|
||||
getResourcePath(indexConfigPath, fessConfig.getFesenType(), "/" + index + "/" + docType + "_" + name + ".bulk");
|
||||
if (ResourceUtil.isExist(bulkPath)) {
|
||||
insertBulkData(fessConfig, indexName, bulkPath);
|
||||
}
|
||||
|
@ -480,7 +511,7 @@ public class SearchEngineClient implements Client {
|
|||
protected void createAlias(final String index, final String createdIndexName) {
|
||||
final FessConfig fessConfig = ComponentUtil.getFessConfig();
|
||||
// alias
|
||||
final String aliasConfigDirPath = indexConfigPath + "/" + index + "/alias";
|
||||
final String aliasConfigDirPath = getResourcePath(indexConfigPath, fessConfig.getFesenType(), "/" + index + "/alias");
|
||||
try {
|
||||
final File aliasConfigDir = ResourceUtil.getResourceAsFile(aliasConfigDirPath);
|
||||
if (aliasConfigDir.isDirectory()) {
|
||||
|
@ -594,8 +625,19 @@ public class SearchEngineClient implements Client {
|
|||
} catch (final Exception e) {
|
||||
cause = e;
|
||||
}
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Failed to access to Fesen:{}", i, cause);
|
||||
if (cause instanceof FesenStatusException) {
|
||||
final RestStatus status = ((FesenStatusException) cause).status();
|
||||
switch (status) {
|
||||
case UNAUTHORIZED:
|
||||
logger.warn("[{}] Unauthorized access: {}", i, System.getProperty(Constants.FESS_ES_HTTP_ADDRESS), cause);
|
||||
break;
|
||||
default:
|
||||
logger.debug("[{}][{}] Failed to access to Fesen ({})", i, status, System.getProperty(Constants.FESS_ES_HTTP_ADDRESS),
|
||||
cause);
|
||||
break;
|
||||
}
|
||||
} else if (logger.isDebugEnabled()) {
|
||||
logger.debug("[{}] Failed to access to Fesen ({})", i, System.getProperty(Constants.FESS_ES_HTTP_ADDRESS), cause);
|
||||
}
|
||||
ThreadUtil.sleep(1000L);
|
||||
}
|
||||
|
|
|
@ -15,8 +15,13 @@
|
|||
*/
|
||||
package org.codelibs.fess.helper;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.curl.Curl.Method;
|
||||
import org.codelibs.curl.CurlRequest;
|
||||
import org.codelibs.fess.mylasta.direction.FessConfig;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
import org.codelibs.fess.util.ResourceUtil;
|
||||
|
||||
public class CurlHelper {
|
||||
|
@ -38,6 +43,15 @@ public class CurlHelper {
|
|||
}
|
||||
|
||||
public CurlRequest request(final Method method, final String path) {
|
||||
return new CurlRequest(method, ResourceUtil.getFesenHttpUrl() + path);
|
||||
final CurlRequest request = new CurlRequest(method, ResourceUtil.getFesenHttpUrl() + path);
|
||||
final FessConfig fessConfig = ComponentUtil.getFessConfig();
|
||||
final String username = fessConfig.getFesenUsername();
|
||||
final String password = fessConfig.getFesenPassword();
|
||||
if (StringUtil.isNotBlank(username) && StringUtil.isNotBlank(password)) {
|
||||
final String value = username + ":" + password;
|
||||
final String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(value.getBytes(StandardCharsets.UTF_8));
|
||||
request.header("Authorization", basicAuth);
|
||||
}
|
||||
return request;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class IndexingHelper {
|
|||
final FessConfig fessConfig = ComponentUtil.getFessConfig();
|
||||
if (fessConfig.isResultCollapsed()) {
|
||||
docList.forEach(doc -> {
|
||||
doc.put("content_minhash", doc.get(fessConfig.getIndexFieldContent()));
|
||||
doc.put(fessConfig.getIndexFieldContentMinhash(), doc.get(fessConfig.getIndexFieldContent()));
|
||||
});
|
||||
}
|
||||
final long execTime = System.currentTimeMillis();
|
||||
|
|
|
@ -102,6 +102,7 @@ public class SuggestHelper {
|
|||
.actionGet(fessConfig.getIndexHealthTimeout());
|
||||
|
||||
final SuggestSettingsBuilder settingsBuilder = SuggestSettings.builder();
|
||||
settingsBuilder.addInitialSettings("elasticsearch.type", fessConfig.getFesenType());
|
||||
settingsBuilder.bulkTimeout(fessConfig.getIndexBulkTimeout());
|
||||
settingsBuilder.clusterTimeout(fessConfig.getIndexHealthTimeout());
|
||||
settingsBuilder.indexTimeout(fessConfig.getIndexIndexTimeout());
|
||||
|
|
|
@ -25,9 +25,18 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|||
/** The key of the configuration. e.g. Fess */
|
||||
String DOMAIN_TITLE = "domain.title";
|
||||
|
||||
/** The key of the configuration. e.g. default */
|
||||
String ELASTICSEARCH_TYPE = "elasticsearch.type";
|
||||
|
||||
/** The key of the configuration. e.g. http://localhost:9201 */
|
||||
String ELASTICSEARCH_HTTP_URL = "elasticsearch.http.url";
|
||||
|
||||
/** The key of the configuration. e.g. */
|
||||
String ELASTICSEARCH_USERNAME = "elasticsearch.username";
|
||||
|
||||
/** The key of the configuration. e.g. */
|
||||
String ELASTICSEARCH_PASSWORD = "elasticsearch.password";
|
||||
|
||||
/** The key of the configuration. e.g. aes */
|
||||
String APP_CIPHER_ALGORISM = "app.cipher.algorism";
|
||||
|
||||
|
@ -1695,13 +1704,50 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|||
String getDomainTitle();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'elasticsearch.http.url'. <br>
|
||||
* The value is, e.g. http://localhost:9201 <br>
|
||||
* Get the value for the key 'elasticsearch.type'. <br>
|
||||
* The value is, e.g. default <br>
|
||||
* comment: Fesen
|
||||
* @return The value of found property. (NotNull: if not found, exception but basically no way)
|
||||
*/
|
||||
String getFesenType();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'elasticsearch.http.url'. <br>
|
||||
* The value is, e.g. http://localhost:9201 <br>
|
||||
* @return The value of found property. (NotNull: if not found, exception but basically no way)
|
||||
*/
|
||||
String getFesenHttpUrl();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'elasticsearch.username'. <br>
|
||||
* The value is, e.g. <br>
|
||||
* @return The value of found property. (NotNull: if not found, exception but basically no way)
|
||||
*/
|
||||
String getFesenUsername();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'elasticsearch.username' as {@link Integer}. <br>
|
||||
* The value is, e.g. <br>
|
||||
* @return The value of found property. (NotNull: if not found, exception but basically no way)
|
||||
* @throws NumberFormatException When the property is not integer.
|
||||
*/
|
||||
Integer getFesenUsernameAsInteger();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'elasticsearch.password'. <br>
|
||||
* The value is, e.g. <br>
|
||||
* @return The value of found property. (NotNull: if not found, exception but basically no way)
|
||||
*/
|
||||
String getFesenPassword();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'elasticsearch.password' as {@link Integer}. <br>
|
||||
* The value is, e.g. <br>
|
||||
* @return The value of found property. (NotNull: if not found, exception but basically no way)
|
||||
* @throws NumberFormatException When the property is not integer.
|
||||
*/
|
||||
Integer getFesenPasswordAsInteger();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'app.cipher.algorism'. <br>
|
||||
* The value is, e.g. aes <br>
|
||||
|
@ -6961,10 +7007,30 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|||
return get(FessConfig.DOMAIN_TITLE);
|
||||
}
|
||||
|
||||
public String getFesenType() {
|
||||
return get(FessConfig.ELASTICSEARCH_TYPE);
|
||||
}
|
||||
|
||||
public String getFesenHttpUrl() {
|
||||
return get(FessConfig.ELASTICSEARCH_HTTP_URL);
|
||||
}
|
||||
|
||||
public String getFesenUsername() {
|
||||
return get(FessConfig.ELASTICSEARCH_USERNAME);
|
||||
}
|
||||
|
||||
public Integer getFesenUsernameAsInteger() {
|
||||
return getAsInteger(FessConfig.ELASTICSEARCH_USERNAME);
|
||||
}
|
||||
|
||||
public String getFesenPassword() {
|
||||
return get(FessConfig.ELASTICSEARCH_PASSWORD);
|
||||
}
|
||||
|
||||
public Integer getFesenPasswordAsInteger() {
|
||||
return getAsInteger(FessConfig.ELASTICSEARCH_PASSWORD);
|
||||
}
|
||||
|
||||
public String getAppCipherAlgorism() {
|
||||
return get(FessConfig.APP_CIPHER_ALGORISM);
|
||||
}
|
||||
|
@ -9713,7 +9779,10 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|||
protected java.util.Map<String, String> prepareGeneratedDefaultMap() {
|
||||
java.util.Map<String, String> defaultMap = super.prepareGeneratedDefaultMap();
|
||||
defaultMap.put(FessConfig.DOMAIN_TITLE, "Fess");
|
||||
defaultMap.put(FessConfig.ELASTICSEARCH_TYPE, "default");
|
||||
defaultMap.put(FessConfig.ELASTICSEARCH_HTTP_URL, "http://localhost:9201");
|
||||
defaultMap.put(FessConfig.ELASTICSEARCH_USERNAME, "");
|
||||
defaultMap.put(FessConfig.ELASTICSEARCH_PASSWORD, "");
|
||||
defaultMap.put(FessConfig.APP_CIPHER_ALGORISM, "aes");
|
||||
defaultMap.put(FessConfig.APP_CIPHER_KEY, "___change__me___");
|
||||
defaultMap.put(FessConfig.APP_DIGEST_ALGORISM, "sha256");
|
||||
|
|
|
@ -338,7 +338,12 @@ public interface FessProp {
|
|||
}
|
||||
|
||||
default boolean isResultCollapsed() {
|
||||
return getSystemPropertyAsBoolean(Constants.RESULT_COLLAPSED_PROPERTY, false);
|
||||
switch (getFesenType()) {
|
||||
case Constants.FESEN_TYPE_CLOUD:
|
||||
return false;
|
||||
default:
|
||||
return getSystemPropertyAsBoolean(Constants.RESULT_COLLAPSED_PROPERTY, false);
|
||||
}
|
||||
}
|
||||
|
||||
default void setLoginLinkEnabled(final boolean value) {
|
||||
|
@ -2071,4 +2076,6 @@ public interface FessProp {
|
|||
return !split(getPasswordInvalidAdminPasswords(), "\n")
|
||||
.get(stream -> stream.map(String::trim).filter(StringUtil::isNotEmpty).anyMatch(s -> s.equals(password)));
|
||||
}
|
||||
|
||||
String getFesenType();
|
||||
}
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
"http://dbflute.org/meta/lastadi10.dtd">
|
||||
<components>
|
||||
<component name="esClient"
|
||||
class="org.codelibs.fess.crawler.client.FesenClient">
|
||||
class="org.codelibs.fess.es.client.CrawlerEngineClient">
|
||||
</component>
|
||||
</components>
|
||||
|
|
|
@ -9,7 +9,10 @@
|
|||
domain.title = Fess
|
||||
|
||||
# Elasticsearch
|
||||
elasticsearch.type=default
|
||||
elasticsearch.http.url=http://localhost:9201
|
||||
elasticsearch.username=
|
||||
elasticsearch.password=
|
||||
|
||||
# Cryptographer
|
||||
app.cipher.algorism=aes
|
||||
|
|
1276
src/main/resources/fess_indices/_cloud/fess.json
Normal file
1276
src/main/resources/fess_indices/_cloud/fess.json
Normal file
File diff suppressed because one or more lines are too long
592
src/main/resources/fess_indices/_cloud/fess/doc.json
Normal file
592
src/main/resources/fess_indices/_cloud/fess/doc.json
Normal file
|
@ -0,0 +1,592 @@
|
|||
{
|
||||
"dynamic_templates": [
|
||||
{
|
||||
"lang_ar": {
|
||||
"match": "*_ar",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "arabic_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_bg": {
|
||||
"match": "*_bg",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "bulgarian_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_bn": {
|
||||
"match": "*_bn",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_ca": {
|
||||
"match": "*_ca",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "catalan_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_ca": {
|
||||
"match": "*_ckb-iq",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "sorani_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_cs": {
|
||||
"match": "*_cs",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "czech_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_da": {
|
||||
"match": "*_da",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "danish_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_de": {
|
||||
"match": "*_de",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "german_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_el": {
|
||||
"match": "*_el",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "greek_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_en": {
|
||||
"match": "*_en",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "english_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_en": {
|
||||
"match": "*_en-ie",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "irish_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_es": {
|
||||
"match": "*_es",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "spanish_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_et": {
|
||||
"match": "*_et",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_et": {
|
||||
"match": "*_eu",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "basque_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_fa": {
|
||||
"match": "*_fa",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "persian_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_fi": {
|
||||
"match": "*_fi",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "finnish_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_fr": {
|
||||
"match": "*_fr",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "french_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_gl": {
|
||||
"match": "*_gl",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "galician_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_gu": {
|
||||
"match": "*_gu",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_he": {
|
||||
"match": "*_he",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_hi": {
|
||||
"match": "*_hi",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_hr": {
|
||||
"match": "*_hr",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_hu": {
|
||||
"match": "*_hu",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "hungarian_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_hu": {
|
||||
"match": "*_hy",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "armenian_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_id": {
|
||||
"match": "*_id",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "indonesian_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_it": {
|
||||
"match": "*_it",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "italian_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_ja": {
|
||||
"match": "*_ja",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "japanese_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_ko": {
|
||||
"match": "*_ko",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "korean_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_lt": {
|
||||
"match": "*_lt",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "lithuanian_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_lv": {
|
||||
"match": "*_lv",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "latvian_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_mk": {
|
||||
"match": "*_mk",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_ml": {
|
||||
"match": "*_ml",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_nl": {
|
||||
"match": "*_nl",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "dutch_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_no": {
|
||||
"match": "*_no",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "norwegian_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_pa": {
|
||||
"match": "*_pa",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_pl": {
|
||||
"match": "*_pl",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_pt": {
|
||||
"match": "*_pt",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "portuguese_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_pt-br": {
|
||||
"match": "*_pt-br",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "brazilian_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_ro": {
|
||||
"match": "*_ro",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "romanian_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_ru": {
|
||||
"match": "*_ru",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "russian_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_si": {
|
||||
"match": "*_si",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_sq": {
|
||||
"match": "*_sq",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_sv": {
|
||||
"match": "*_sv",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "swedish_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_ta": {
|
||||
"match": "*_ta",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_te": {
|
||||
"match": "*_te",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_th": {
|
||||
"match": "*_th",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "thai_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_tl": {
|
||||
"match": "*_tl",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_tr": {
|
||||
"match": "*_tr",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "turkish_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_uk": {
|
||||
"match": "*_uk",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_ur": {
|
||||
"match": "*_ur",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_vi": {
|
||||
"match": "*_vi",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_zh-cn": {
|
||||
"match": "*_zh-cn",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "simplified_chinese_analyzer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lang_zh-tw": {
|
||||
"match": "*_zh-tw",
|
||||
"mapping": {
|
||||
"type": "text",
|
||||
"analyzer": "empty_analyzer"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"anchor": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"boost": {
|
||||
"type": "float"
|
||||
},
|
||||
"click_count": {
|
||||
"type": "long"
|
||||
},
|
||||
"config_id": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"important_content": {
|
||||
"type": "text",
|
||||
"analyzer": "standard_analyzer",
|
||||
"search_analyzer": "standard_search_analyzer",
|
||||
"term_vector": "with_positions_offsets"
|
||||
},
|
||||
"content": {
|
||||
"type": "text",
|
||||
"analyzer": "standard_analyzer",
|
||||
"search_analyzer": "standard_search_analyzer",
|
||||
"term_vector": "with_positions_offsets"
|
||||
},
|
||||
"content_minhash": {
|
||||
"type": "keyword",
|
||||
"index": false
|
||||
},
|
||||
"content_minhash_bits": {
|
||||
"type": "keyword",
|
||||
"index": false
|
||||
},
|
||||
"content_length": {
|
||||
"type": "long"
|
||||
},
|
||||
"created": {
|
||||
"type": "date",
|
||||
"format": "date_optional_time"
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "date",
|
||||
"format": "date_optional_time"
|
||||
},
|
||||
"expires": {
|
||||
"type": "date",
|
||||
"format": "date_optional_time"
|
||||
},
|
||||
"digest": {
|
||||
"type": "text",
|
||||
"index": false
|
||||
},
|
||||
"doc_id": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"favorite_count": {
|
||||
"type": "long"
|
||||
},
|
||||
"filename": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"filetype": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"host": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"lang": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"last_modified": {
|
||||
"type": "date",
|
||||
"format": "date_optional_time"
|
||||
},
|
||||
"location": {
|
||||
"type": "geo_point"
|
||||
},
|
||||
"mimetype": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"parent_id": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"role": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"label": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"virtual_host": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"segment": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"site": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"title": {
|
||||
"type": "text",
|
||||
"analyzer": "standard_analyzer",
|
||||
"search_analyzer": "standard_search_analyzer",
|
||||
"term_vector": "with_positions_offsets"
|
||||
},
|
||||
"thumbnail": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"url": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
}
|
1707
src/main/resources/suggest_indices/_cloud/suggest_analyzer.json
Normal file
1707
src/main/resources/suggest_indices/_cloud/suggest_analyzer.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -84,7 +84,7 @@
|
|||
<div class="form-inline col-sm-9">
|
||||
<la:errors property="resultCollapsed"/>
|
||||
<div class="form-check">
|
||||
<la:checkbox styleId="resultCollapsed" styleClass="form-check-input" property="resultCollapsed"/>
|
||||
<la:checkbox styleId="resultCollapsed" styleClass="form-check-input" property="resultCollapsed" disabled="${fesenType=='cloud'}"/>
|
||||
<label for="resultCollapsed" class="form-check-label">
|
||||
<la:message key="labels.enabled"/>
|
||||
</label>
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<div class="form-inline col-sm-9">
|
||||
<la:errors property="resetDictionaries"/>
|
||||
<div class="form-check">
|
||||
<la:checkbox styleId="resetDictionaries" styleClass="form-check-input" property="resetDictionaries"/>
|
||||
<la:checkbox styleId="resetDictionaries" styleClass="form-check-input" property="resetDictionaries" disabled="${fesenType=='cloud'}"/>
|
||||
<label for="resetDictionaries" class="form-check-label">
|
||||
<la:message key="labels.enabled"/>
|
||||
</label>
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
<p><la:message key="labels.menu_design" /></p>
|
||||
</a></li></c:if>
|
||||
|
||||
<c:if test="${fe:permission('admin-dict-view')}">
|
||||
<c:if test="${fe:permission('admin-dict-view') and fesenType!='cloud'}">
|
||||
<li class="nav-item">
|
||||
<a href="${fe:url('/admin/dict/')}" class="nav-link <c:if test="${param.menuType=='dict'}">active</c:if>">
|
||||
<em class='fa fa-genderless nav-icon'></em>
|
||||
|
|
Loading…
Add table
Reference in a new issue